dickon
Posts: 468
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

omxmotion

Wed Apr 01, 2015 12:06 pm

This may be of interest to some.

I've been interested in OpenMAX and the Pi's camera module for a while now, and finally got around to doing something with them both. Using the H.264 encoder's motion vector output, I've knocked up a simple motion detection and capture program. It's a bit basic, but seems to work.

Currently, it supports a 'heatmap' of regions to monitor, 64-128 frames (as compiled out of the box) of pre-trigger recording, variable length post-motion recording, variable bitrate output, and the ability to dump the last 65536 frames of motion vectors as PNGs (which is useful for debugging). At 16Mb/s, it uses around 40% CPU on an un-overclocked Pi model B (original 256MB version) in around 14MB RAM. It's limited to 1920x1088 ATM (as I can't see where to crop the camera's output image).

There does appear to be a bug somewhere, in that some frames appear to be slightly corrupted. Not sure what's going on there, but I'll probably spot it at some point. Might be something to do with the abuse of H.264, but I'm not seeing any errors on playback.

It's available at https://github.com/dickontoo/omxmotion. Any questions, shout.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7259
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: omxmotion

Wed Apr 01, 2015 2:06 pm

Brave man going for IL. OK it is allegedly open, except for all the proposals that got accepted but never rolled into the spec, but it really is a pig to work with in any form. A quick look at the Android codec handling (OMXCodec.cpp) would give an idea on all the quirks that Google had to accept to get it to work with different manufacturers' kit. Full credit to you for getting something going, just don't expect much support.

Just reading your code:

Code: Select all

/* The clock doesn't bloody work for some reason. Ignore this bit. */
When recording you're not waiting for a start event, you just want to know what the wall time is for each frame. If present, then audio is normally used to sync the wall clock to sampling rate. Setup is normally set the clock to stopped, get all the components ready to run, then start the clock. The components get told of the clock state update and will start running (IIRC that is all in the IL spec). As you don't appear to be using the buffer timestamps, then it has no impact, and a timestamp has limited use in this case anyway.
Video has no reference clock - it would be running off the same STC as the wall clock.

nFrameHeight can be any multiple of 2. nSliceHeight needs to be a multiple of 16.
nFrameWidth can also be any multiple of 2, but nStride has constraints (multiple of 32 generally for most YUV formats). As you've found, set it to 0 and the component should set it appropriately for you.

Cropping the output image? ie change field of view, or are you after a totally different resolution somewhere?
FOV can be controlled through OMX_IndexConfigCommonDigitalZoom for a straight centred zoom (and then reduce the output resolution if you want a crop), OMX_IndexConfigInputCropPercentages for an arbitrary crop (and again alter output resolution). Either case will affect the whole encode path, so your motion vectors will be looking at a different portion of the image.
The hardware can't produce multiple arbitrary resolutions, so I'm afraid you can't easily get a totally different resolution.

Corrupted frames? What form of corruption? I'm assuming it's not just the all zero motion vectors you get off the I-frame prediction at whatever your intra-I rate is.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

dickon
Posts: 468
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: omxmotion

Wed Apr 01, 2015 2:27 pm

Yeah, but I'd already spent some time looking into it for my transcoder, omxtx (there's a thread on that at http://www.raspberrypi.org/forums/viewforum.php?f=70), so I knew what I was getting into. OpenMAX is a pig to use, what with its tri-state bools, Hungarian notation, and lack of type safety by passing void *s around all the time, but it isn't *too* terrible once you get used to it, assuming you're targeting one specific implementation of it. I'd already given up attempting to make anything platform-independent. I mean, there's a perfectly good OMX_Init() function, but Broadcom insist on a bcm_host_init() first, too...

The things that got me on this one were details like needing the camera preview port running before anything useful came out of the video port (I can't see this documented anywhere), and having to set the preview port to identical settings to the video port (which I have spotted).

I need to crop the output image to 1920x1080, down from 1920x1088, as asking the camera for 1080 errors.

Corruption seems to be slightly damaged slices. Not sure what's going on there. It may be PTS problems; I suspect they're shot.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7259
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: omxmotion

Wed Apr 01, 2015 2:48 pm

dickon wrote:Yeah, but I'd already spent some time looking into it for my transcoder, omxtx (there's a thread on that at viewforum.php?f=70), so I knew what I was getting into.
I did know you'd done omxtx before (I actually looked into optimising things on the GPU side, but got no significant speedup), so fair enough sticking with IL.
dickon wrote:The things that got me on this one were details like needing the camera preview port running before anything useful came out of the video port (I can't see this documented anywhere), and having to set the preview port to identical settings to the video port (which I have spotted).
Hmm, the preview port shouldn't need to be enabled, hence why that isn't documented! You've got me worried now, though there used to be a regression test that was just encoding so things shouldn't be too broken.
There is a half need to have either preview or video port enabled when capturing stills, as the stills port doesn't allow the AGC and AWB loops to run.
dickon wrote:I need to crop the output image to 1920x1080, down from 1920x1088, as asking the camera for 1080 errors.
nFrameHeight = 1080;
nSliceHeight = 1088;
Consider nStride and nSliceHeight to define the size of the buffer, and nFrameWidth and nFrameHeight to define the size of the active image within that buffer.
dickon wrote:Corruption seems to be slightly damaged slices. Not sure what's going on there. It may be PTS problems; I suspect they're shot.
PTS shouldn't matter as long as the codec knows the framerate in order to allow it to run rate control sensibly. Bizarrely it uses the framerate set in the encode output port PortDefinition, not input - never have understood that one, except it does allow you to do tricks for rate control and slow-motion by ignoring source timestamps.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

dickon
Posts: 468
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: omxmotion

Wed Apr 01, 2015 3:18 pm

I did know you'd done omxtx before (I actually looked into optimising things on the GPU side, but got no significant speedup), so fair enough sticking with IL.
That I didn't know -- thanks :-)
Hmm, the preview port shouldn't need to be enabled, hence why that isn't documented! You've got me worried now, though there used to be a regression test that was just encoding so things shouldn't be too broken.
Tying it to a NUL sink seems to make it work. I found some other code around which did that, added it, and magically started getting frames from the camera when I expected I would.
nFrameHeight = 1080;
nSliceHeight = 1088;
Consider nStride and nSliceHeight to define the size of the buffer, and nFrameWidth and nFrameHeight to define the size of the active image within that buffer.
Ah! Ta. That's one problem sorted.
Bizarrely it uses the framerate set in the encode output port PortDefinition, not input - never have understood that one, except it does allow you to do tricks for rate control and slow-motion by ignoring source timestamps.
I'd always assumed it was because you configure the behaviour of the codec on the output port, and merely tell it what it's got to play with on its input.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7259
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: omxmotion

Wed Apr 01, 2015 3:43 pm

dickon wrote:
I did know you'd done omxtx before (I actually looked into optimising things on the GPU side, but got no significant speedup), so fair enough sticking with IL.
That I didn't know -- thanks :-)
The codecs use an an internal YUV format which can be passed around if tunneled components both claim to support them. The encoder needs an extra reference frame as well as the main image, so encoder and decoder won't do the magic.
I was trying to see if I passed the full res across and just derived the extra image whether that was faster than the conversions to and from YUV planar, and producing the derived image. Turned out that the Videocore processor was mainly idle anyway in the omxtx case - the hardware blocks doing most of the heavy lifting. Reducing the conversion load would have saved a little power, but almost all the power saving magic is disabled on the Pi anyway. It was a fun exercise though :-)
dickon wrote:Tying it to a NUL sink seems to make it work. I found some other code around which did that, added it, and magically started getting frames from the camera when I expected I would.
Nullsink was used for stills use cases where they didn't want the preview up but needed AGC and AWB to do sensible stuff. You've got the video port running which should mean all that stuff would happen anyway. Another thing for me to look at.
dickon wrote:
Bizarrely it uses the framerate set in the encode output port PortDefinition, not input - never have understood that one, except it does allow you to do tricks for rate control and slow-motion by ignoring source timestamps.
I'd always assumed it was because you configure the behaviour of the codec on the output port, and merely tell it what it's got to play with on its input.
Possibly. It's just one of the many little gems in the firmware - it does attempt to copy the framerate from input to output on SetParameter(PortDefintion), but only if the output was set to 0. The default is 30fps though, so that nearly never happens. Just one of many quirks we just got used to whilst at Broadcom, but that doesn't help the Pi community now :(

Other amusement - we were contemporaries at York (Electronics/Goodricke for me). I vaguely remember your name from then though I don't think our paths really crossed. My spare time was mainly up at URY on the techie side. Small world isn't it :)
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

dickon
Posts: 468
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: omxmotion

Wed Apr 01, 2015 6:02 pm

6by9 wrote: The codecs use an an internal YUV format which can be passed around if tunneled components both claim to support them. The encoder needs an extra reference frame as well as the main image, so encoder and decoder won't do the magic.
I was trying to see if I passed the full res across and just derived the extra image whether that was faster than the conversions to and from YUV planar, and producing the derived image. Turned out that the Videocore processor was mainly idle anyway in the omxtx case - the hardware blocks doing most of the heavy lifting. Reducing the conversion load would have saved a little power, but almost all the power saving magic is disabled on the Pi anyway. It was a fun exercise though :-)
Interesting. I was wondering if the proprietary tunneling stuff had anything like that in it, but didn't think to ask.
6by9 wrote: Other amusement - we were contemporaries at York (Electronics/Goodricke for me). I vaguely remember your name from then though I don't think our paths really crossed. My spare time was mainly up at URY on the techie side. Small world isn't it :)
Very, although I don't remember any student with the name '6by9' :-)

(Physics/Wentworth for me -- fun times...)

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7259
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: omxmotion

Wed Apr 01, 2015 7:14 pm

dickon wrote:Very, although I don't remember any student with the name '6by9' :-)

(Physics/Wentworth for me -- fun times...)
Oops. Dave Stevenson.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

dickon
Posts: 468
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: omxmotion

Wed Apr 01, 2015 9:41 pm

6by9 wrote:
dickon wrote:Very, although I don't remember any student with the name '6by9' :-)

(Physics/Wentworth for me -- fun times...)
Oops. Dave Stevenson.
Mmm, sorry. Never did have any memory for names. I suspect people only remember me because mine's unusual.

MasterC
Posts: 5
Joined: Sun Aug 16, 2015 4:58 am

Re: omxmotion

Sun Aug 16, 2015 5:07 am

Hi!

So, I realize this conversation is way outside my comfort zone, but I'd be interested to find out why you chose to go the route you did instead of something like:

* using the existing motion software to trigger either a script, or a wait inside of a script
* kill motion (or properly stop the process)
* fire up raspivid
* stop raspivid
* repeat loop

I started to go down the above steps as a workaround to, well, essentially doing it right like you did. And now I'm wondering why you chose the path you did instead of hacking it together since you're clearly capable of doing it either way.

Thanks!
-Chad

spikedrba
Posts: 75
Joined: Fri Feb 28, 2014 2:19 am

Re: omxmotion

Sun Aug 16, 2015 3:12 pm

MasterC wrote:Hi!
* using the existing motion software to trigger either a script, or a wait inside of a script
* kill motion (or properly stop the process)
* fire up raspivid
* stop raspivid
* repeat loop
fwiw I've gone through this and performances are horrible. In general anything using the Motion software is sluggish at best. The branch with mmal is a bit better, but still unable to push more than 10 fps at high res ime.

What you propose would result in huge gaps, in part just to shut down and startup things up, to the point that if an object is moving fast enough by the time raspivid is up and running stuff might be already gone.

dickon
Posts: 468
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: omxmotion

Mon Aug 17, 2015 11:30 am

Basically, what he said. And note that if you're going to use something like raspivid to record something, you're going to have to do some motion detection anyway, as otherwise you don't know when to stop.

I did look at using motion to do the donkey work, by feeding it a scaled-down and sampled image feed, but I discovered that motion isn't split into a handy frontend and libmotion backend, which is a shame. Seemed easier to do it myself.

User avatar
waveform80
Posts: 303
Joined: Mon Sep 23, 2013 1:28 pm
Location: Manchester, UK

Re: omxmotion

Sun Aug 23, 2015 11:05 pm

Not sure if it's relevant, but just in case: I bashed together a little picamera script a while back which involved performing motion detection using the H264 motion estimation vectors, plus circular buffer recording, disk recording, etc. It's here in a gist but I really ought to get around to bunging it into the docs in the next picamera release (when I find the time!).

Okay, it's not C, but then the GPU's doing all the serious work anyway (thank you firmware!) so what the hell :)

Dave.

Zuifer
Posts: 12
Joined: Mon Apr 16, 2018 11:02 pm

Re: omxmotion

Mon Apr 16, 2018 11:54 pm

Hello,

I hope it is Ok to reply to this old thread.
I would like to test your program, but it didnt compile.

Here is what i got:

Code: Select all

make
gcc -Wall -Wno-format -g -I/opt/vc/include/IL -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -L/usr/local/lib -I/usr/local/include -O3 -c omxmotion.c
In file included from /usr/include/stdio.h:27:0,
                 from omxmotion.h:28,
                 from omxmotion.c:39:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
omxmotion.c: In function ‘openoutput’:
omxmotion.c:332:2: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
  cc = st->codec;
  ^~
In file included from omxmotion.h:40:0,
                 from omxmotion.c:39:
/usr/include/arm-linux-gnueabihf/libavformat/avformat.h:893:21: note: declared here
     AVCodecContext *codec;
                     ^~~~~
omxmotion.c:343:16: error: ‘PIX_FMT_YUV420P’ undeclared (first use in this function)
  cc->pix_fmt = PIX_FMT_YUV420P;
                ^~~~~~~~~~~~~~~
omxmotion.c:343:16: note: each undeclared identifier is reported only once for each function it appears in
omxmotion.c:367:4: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
    oc->streams[i]->codec->flags
    ^~
In file included from omxmotion.h:40:0,
                 from omxmotion.c:39:
/usr/include/arm-linux-gnueabihf/libavformat/avformat.h:893:21: note: declared here
     AVCodecContext *codec;
                     ^~~~~
omxmotion.c:369:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
   if (oc->streams[i]->codec->sample_rate == 0)
   ^~
In file included from omxmotion.h:40:0,
                 from omxmotion.c:39:
/usr/include/arm-linux-gnueabihf/libavformat/avformat.h:893:21: note: declared here
     AVCodecContext *codec;
                     ^~~~~
omxmotion.c:370:4: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
    oc->streams[i]->codec->sample_rate = 48000; /* ish */
    ^~
In file included from omxmotion.h:40:0,
                 from omxmotion.c:39:
/usr/include/arm-linux-gnueabihf/libavformat/avformat.h:893:21: note: declared here
     AVCodecContext *codec;
                     ^~~~~
omxmotion.c: In function ‘startrecording’:
omxmotion.c:781:4: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
    avcodec_close(oc->streams[index]->codec);
    ^~~~~~~~~~~~~
In file included from omxmotion.h:40:0,
                 from omxmotion.c:39:
/usr/include/arm-linux-gnueabihf/libavformat/avformat.h:893:21: note: declared here
     AVCodecContext *codec;
                     ^~~~~
omxmotion.c: In function ‘main’:
omxmotion.c:1253:4: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
    avcodec_close(oc->streams[i]->codec);
    ^~~~~~~~~~~~~
In file included from omxmotion.h:40:0,
                 from omxmotion.c:39:
/usr/include/arm-linux-gnueabihf/libavformat/avformat.h:893:21: note: declared here
     AVCodecContext *codec;
                     ^~~~~
Makefile:14: die Regel für Ziel „omxmotion.o“ scheiterte
make: *** [omxmotion.o] Fehler 1

I did compile on the newest raspian.

Maybe you can help, because it seems your program is the only one which can stream and record by motion in h.264. Would a binary by you work?


Thanks

dickon
Posts: 468
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: omxmotion

Tue Apr 17, 2018 9:37 am

Compiling on a recentish Raspbian gets me a different error:

Code: Select all

[email protected]:~/omxmotion# make
gcc -Wall -Wno-format -g -I/opt/vc/include/IL -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -L/usr/local/lib -I/usr/local/include -O3 -c omxmotion.c
omxmotion.c: In function ‘openoutput’:
omxmotion.c:316:2: warning: implicit declaration of function ‘avformat_alloc_output_context2’ [-Wimplicit-function-declaration]
  r = avformat_alloc_output_context2(&oc, fmt, NULL, url);
  ^
gcc -Wall -Wno-format -g -I/opt/vc/include/IL -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -L/usr/local/lib -I/usr/local/include -O3 -c motion.c
gcc -Xlinker -R/opt/vc/lib -L/opt/vc/lib/ -Xlinker -L/usr/local/lib -Xlinker -R/usr/local/lib  -lavformat -lavcodec -lavutil -lopenmaxil -lbcm_host -lvcos -lpthread -lpng -lm -lx264 -lncurses -o omxmotion omxmotion.o motion.o
omxmotion.o: In function `openoutput':
/root/omxmotion/omxmotion.c:316: undefined reference to `avformat_alloc_output_context2'
collect2: error: ld returned 1 exit status
Makefile:17: recipe for target 'omxmotion' failed
make: *** [omxmotion] Error 1
which doesn't help you, either. Looks like there's been some breakage of libav* (surprise!) somewhere, which I don't have time to get into now. Patches welcome. A quick Google suggests that libavformat56 should still contain that function, yet the header in the package in Raspbian doesn't, and the library doesn't contain the symbol. It's also not immediately obvious to me what to replace it with. If anyone's any idea, let me know...

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7259
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: omxmotion

Tue Apr 17, 2018 10:10 am

This may be fallout from the libav vs ffmpeg fight in Debian.
In Wheezy they'd adopted libav as the one true library, and added a shim around ffmpeg commands and libraries.
In Stretch they've reverted to ffmpeg, but of course the two have diverged.
(I can't remember which way Jessie went).

A right royal mess, but not of our doing.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

dickon
Posts: 468
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: omxmotion

Tue Apr 17, 2018 10:32 am

I thought that might be it.

I wasn't blaming you; apologies if it came out like that.

ffmpeg's attitude is deeply unhelpful. 'The API isn't stable, so ship your own copies of libav* with all your programs, preferably statically-linked' is *really* annoying and completely fails to address the inevitable security issues.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7259
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: omxmotion

Tue Apr 17, 2018 10:50 am

dickon wrote:
Tue Apr 17, 2018 10:32 am
I thought that might be it.

I wasn't blaming you; apologies if it came out like that.
Don't worry, it hadn't. I was only distancing myself/RPT from the choice in case anyone was reading the thread back without the context.
dickon wrote:ffmpeg's attitude is deeply unhelpful. 'The API isn't stable, so ship your own copies of libav* with all your programs, preferably statically-linked' is *really* annoying and completely fails to address the inevitable security issues.
Yup, but libav's choice of shimming ffmpeg but deviating from the API also didn't help.
I was looking a while back at adding muxing support to raspivid and it became a horrid mess trying to find documentation for the APIs. To then to discover
that I'd been reading the docs for ffmpeg's implementation of libavcodec when libav's version was being shipped by Raspbian just made me give up :(
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

ethanol100
Posts: 585
Joined: Wed Oct 02, 2013 12:28 pm

Re: omxmotion

Thu Apr 19, 2018 12:06 pm

Zuifer wrote:

Code: Select all

...
omxmotion.c:343:16: error: ‘PIX_FMT_YUV420P’ undeclared (first use in this function)
  cc->pix_fmt = PIX_FMT_YUV420P;
                ^~~~~~~~~~~~~~~
You can try to change the line 343 of omxmotion.c to

Code: Select all

  cc->pix_fmt = AV_PIX_FMT_YUV420P;
I could compile omxmotion with this (had to install libx264-dev and libncurses5-dev), but this was on buster, not stretch....

dickon
Posts: 468
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: omxmotion

Thu Apr 19, 2018 7:37 pm

Did it work?

Zuifer
Posts: 12
Joined: Mon Apr 16, 2018 11:02 pm

Re: omxmotion

Sat May 05, 2018 6:11 pm

Hello,

Yes it did work. I had to install sudo apt-get install libavformat-dev , libx264-dev and libx264-dev.
It did compile.
But i can't get it to work or at least i don't if it is running.

Code: Select all

./omxmotion -r 25 -b 20 -d /~ -v -c rtsp://192.168.0.20:8554/stream
PNG filename: (null)
OMX_Init() completed at 978.
OMX_GetHandle(&clk, CLKNAME, &ctx, &genevents) completed at 979.
OMX_GetHandle(&cam, CAMNAME, &ctx, &genevents) completed at 980.
OMX_GetHandle(&enc, ENCNAME, &ctx, &encevents) completed at 981.
OMX_GetHandle(&nul, NULNAME, &ctx, &genevents) completed at 982.
Event 0 on 0x96e838
Clock 0x96e838 has completed the last command.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
Event 0 on 0x96e838
Clock 0x96e838 has completed the last command.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
Event 0 on 0x96e838
Clock 0x96e838 has completed the last command.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
Event 0 on 0x96e838
Clock 0x96e838 has completed the last command.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
Event 0 on 0x96e838
Clock 0x96e838 has completed the last command.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
Event 0 on 0x96e838
Clock 0x96e838 has completed the last command.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
Event 0 on 0x96e958
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortDisable, 70+i, ((void *)0)) completed at 994.
Camera 0x96e958 has completed the last command.
Waiting: 0
Event 0 on 0x96e958
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortDisable, 70+i, ((void *)0)) completed at 994.
Camera 0x96e958 has completed the last command.
Waiting: 0
Event 0 on 0x96e958
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortDisable, 70+i, ((void *)0)) completed at 994.
Camera 0x96e958 has completed the last command.
Waiting: 0
Event 0 on 0x96e958
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortDisable, 70+i, ((void *)0)) completed at 994.
Camera 0x96e958 has completed the last command.
Waiting: 0
Event 0 on 0x96ea50
Encoder 0x96ea50 has completed the last command.
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandPortDisable, 200, ((void *)0)) completed at 995.
Waiting: 0
Event 0 on 0x96ea50
Encoder 0x96ea50 has completed the last command.
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandPortDisable, 200+1, ((void *)0)) completed at 996.
Waiting: 0
Event 0 on 0x96eb20
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandPortDisable, 240, ((void *)0)) completed at 997.
NULL sink 0x96eb20 has completed the last command.
Waiting: 0
Event 0 on 0x96eb20
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandPortDisable, 240+1, ((void *)0)) completed at 998.
NULL sink 0x96eb20 has completed the last command.
Waiting: 0
Event 0 on 0x96eb20
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandPortDisable, 240+2, ((void *)0)) completed at 999.
NULL sink 0x96eb20 has completed the last command.
Waiting: 0
OMX_SetConfig(cam, OMX_IndexConfigRequestCallback, rcbt) completed at 1005.
OMX_SetParameter(cam, OMX_IndexParamCameraDeviceNumber, hu32) completed at 1008.
OMX_SetConfig(cam, OMX_IndexConfigPortCapturing, obool) completed at 1012.
OMX_GetParameter(cam, OMX_IndexParamPortDefinition, portdef) completed at 1015.
OMX_SetParameter(cam, OMX_IndexParamPortDefinition, portdef) completed at 1022.
OMX_GetParameter(cam, OMX_IndexParamPortDefinition, portdef) completed at 1024.
OMX_SetParameter(cam, OMX_IndexParamPortDefinition, portdef) completed at 1026.
OMX_SetParameter(cam, OMX_IndexParamCommonUseStcTimestamps, timestamp) completed at 1029.
Event 2130706433 on 0x96e958
Got an event of type 7f000001 on Camera 0x96e958 (d1: ffffffff, d2 7f000031)
OMX_GetParameter(cam, OMX_IndexParamCommonSensorMode, smt) completed at 1032.
Sensor mode: framerate 0 (0), oneshot: 1
OMX_SetParameter(cam, OMX_IndexParamCommonSensorMode, smt) completed at 1037.
OMX_GetConfig(cam, OMX_IndexConfigVideoFramerate, frt) completed at 1039.
Alleged framerate: 1638400 (190000)
OMX_SetConfig(cam, OMX_IndexConfigVideoFramerate, frt) completed at 1043.
((OMX_COMPONENTTYPE*)enc)->SetParameter( enc, OMX_IndexParamPortDefinition, portdef) completed at 1049.
Waiting: 0
((OMX_COMPONENTTYPE*)nul)->SetParameter( nul, OMX_IndexParamPortDefinition, portdef) completed at 1051.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SetParameter( enc, OMX_IndexParamPortDefinition, portdef) completed at 1055.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SetConfig( enc, OMX_IndexConfigBrcmVideoIntraPeriod, hu32) completed at 1061.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SetConfig( enc, OMX_IndexParamBrcmNALSSeparate, cbool) completed at 1063.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SetParameter( enc, OMX_IndexParamBrcmVideoAVCInlineVectorsEnable, obool) completed at 1067.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->GetParameter( enc, OMX_IndexParamVideoAvc, avc) completed at 1069.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SetParameter( enc, OMX_IndexParamVideoAvc, avc) completed at 1075.
Waiting: 0
OMX_SetupTunnel(cam, 70+1, enc, 200) completed at 1090.
Waiting: 0
OMX_SetupTunnel(cam, 70, nul, 240) completed at 1091.
Waiting: 0
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 80 is output, disabled
Wants 1 bufs, needs 1, size 48, enabled: 0, pop: 0, aligned 16, domain 3
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 73 is input, disabled
Wants 1 bufs, needs 1, size 48, enabled: 0, pop: 0, aligned 16, domain 3
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 71 is output, disabled
Wants 0 bufs, needs 0, size 3133440, enabled: 0, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 200 is input, disabled
Wants 0 bufs, needs 0, size 3133440, enabled: 0, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 201 is output, disabled
Wants 1 bufs, needs 1, size 3133440, enabled: 0, pop: 0, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		0
	SliceHeight:	0
	Bitrate:	20971520
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		7
	Colour:		0
Event 0 on 0x96e838
Clock 0x96e838 has completed the last command.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandStateSet, OMX_StateIdle, ((void *)0)) completed at 1102.
Waiting: 0
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandStateSet, OMX_StateIdle, ((void *)0)) completed at 1103.
Waiting: 0
Event 0 on 0x96ea50
Encoder 0x96ea50 has completed the last command.
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandStateSet, OMX_StateIdle, ((void *)0)) completed at 1104.
Waiting: 0
Event 0 on 0x96eb20
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandStateSet, OMX_StateIdle, ((void *)0)) completed at 1105.
NULL sink 0x96eb20 has completed the last command.
Waiting: 0
Event 0 on 0x96e958
Camera 0x96e958 has completed the last command.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortEnable, 80, ((void *)0)) completed at 1109.
Waiting: 0
Event 0 on 0x96e958
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortEnable, 70, ((void *)0)) completed at 1110.
Camera 0x96e958 has completed the last command.
Waiting: 0
Event 0 on 0x96e958
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortEnable, 70+1, ((void *)0)) completed at 1111.
Camera 0x96e958 has completed the last command.
Waiting: 0
Event 0 on 0x96ea50
Encoder 0x96ea50 has completed the last command.
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandPortEnable, 200, ((void *)0)) completed at 1113.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandPortEnable, 200+1, ((void *)0)) completed at 1114.
Waiting: 0
Event 0 on 0x96eb20
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandPortEnable, 240, ((void *)0)) completed at 1115.
NULL sink 0x96eb20 has completed the last command.
Waiting: 0
OMX_GetParameter(h, OMX_IndexParamPortDefinition, portdef) completed at 566.
Allocated a buffer of 3133440 bytes
Event 0 on 0x96ea50
Encoder 0x96ea50 has completed the last command.
((OMX_COMPONENTTYPE*)h)->UseBuffer( h, end, port, ((void *)0), portdef->nBufferSize, buf) completed at 579.
Waiting: 0
OMX_GetParameter(h, OMX_IndexParamPortDefinition, portdef) completed at 566.
OMX_GetParameter(h, OMX_IndexParamPortDefinition, portdef) completed at 566.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 240 is input, enabled
Wants 0 bufs, needs 0, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 73 is input, disabled
Wants 1 bufs, needs 1, size 48, enabled: 0, pop: 0, aligned 16, domain 3
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 71 is output, enabled
Wants 0 bufs, needs 0, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 200 is input, enabled
Wants 0 bufs, needs 0, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 201 is output, enabled
Wants 1 bufs, needs 1, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		0
	SliceHeight:	0
	Bitrate:	20971520
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		7
	Colour:		0
OMX_SendCommand(cam, OMX_CommandStateSet, OMX_StateExecuting, NULL) completed at 1132.
OMX_SendCommand(nul, OMX_CommandStateSet, OMX_StateExecuting, NULL) completed at 1133.
Event 0 on 0x96eb20
NULL sink 0x96eb20 has completed the last command.
Event 0 on 0x96ea50
Encoder 0x96ea50 has completed the last command.
OMX_SendCommand(enc, OMX_CommandStateSet, OMX_StateExecuting, NULL) completed at 1134.
Event 0 on 0x96e958
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Camera 0x96e958 has completed the last command.
Port 71 is output, enabled
Wants 0 bufs, needs 0, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
Event 3 on 0x96ea50
Encoder 0x96ea50 port 201 settings changed.
Got buffer 0x96ec80 filled (len 29)
OMX_FillThisBuffer(enc, ctx.encbufs) completed at 1142.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 201 is output, enabled
Wants 1 bufs, needs 1, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		0
	SliceHeight:	0
	Bitrate:	20971520
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		7
	Colour:		0
Got buffer 0x96ec80 filled (len 5724)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 1143)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 834)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 2275)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 4820)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 6038)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 8916)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 13739)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 23209)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 49395)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 62917)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64328)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64205)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64590)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 63822)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 63927)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64326)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 63851)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64525)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64182)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 63677)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64165)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64123)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64292)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64330)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64162)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64271)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64242)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 63824)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64280)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64023)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64576)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64408)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64604)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 63916)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64673)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 63791)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64092)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64057)
Got buffer 0x96ec80 filled (len 32912)
Got buffer 0x96ec80 filled (len 64444)
Got buffer 0x96ec80 filled (len 32912)

Code: Select all

./omxmotion -r 25 -b 20 -d /~ -v -c udp://@224.0.0.40:5554
PNG filename: (null)
OMX_Init() completed at 978.
OMX_GetHandle(&clk, CLKNAME, &ctx, &genevents) completed at 979.
OMX_GetHandle(&cam, CAMNAME, &ctx, &genevents) completed at 980.
OMX_GetHandle(&enc, ENCNAME, &ctx, &encevents) completed at 981.
OMX_GetHandle(&nul, NULNAME, &ctx, &genevents) completed at 982.
Event 0 on 0x334838
Clock 0x334838 has completed the last command.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
Event 0 on 0x334838
Clock 0x334838 has completed the last command.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
Event 0 on 0x334838
Clock 0x334838 has completed the last command.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
Event 0 on 0x334838
Clock 0x334838 has completed the last command.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
Event 0 on 0x334838
Clock 0x334838 has completed the last command.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
Event 0 on 0x334838
Clock 0x334838 has completed the last command.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
Event 0 on 0x334958
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortDisable, 70+i, ((void *)0)) completed at 994.
Camera 0x334958 has completed the last command.
Waiting: 0
Event 0 on 0x334958
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortDisable, 70+i, ((void *)0)) completed at 994.
Camera 0x334958 has completed the last command.
Waiting: 0
Event 0 on 0x334958
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortDisable, 70+i, ((void *)0)) completed at 994.
Camera 0x334958 has completed the last command.
Waiting: 0
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortDisable, 70+i, ((void *)0)) completed at 994.
Event 0 on 0x334958
Camera 0x334958 has completed the last command.
Waiting: 0
Event 0 on 0x334a50
Encoder 0x334a50 has completed the last command.
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandPortDisable, 200, ((void *)0)) completed at 995.
Waiting: 0
Event 0 on 0x334a50
Encoder 0x334a50 has completed the last command.
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandPortDisable, 200+1, ((void *)0)) completed at 996.
Waiting: 0
Event 0 on 0x334b20
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandPortDisable, 240, ((void *)0)) completed at 997.
NULL sink 0x334b20 has completed the last command.
Waiting: 0
Event 0 on 0x334b20
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandPortDisable, 240+1, ((void *)0)) completed at 998.
NULL sink 0x334b20 has completed the last command.
Waiting: 0
Event 0 on 0x334b20
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandPortDisable, 240+2, ((void *)0)) completed at 999.
NULL sink 0x334b20 has completed the last command.
Waiting: 0
OMX_SetConfig(cam, OMX_IndexConfigRequestCallback, rcbt) completed at 1005.
OMX_SetParameter(cam, OMX_IndexParamCameraDeviceNumber, hu32) completed at 1008.
OMX_SetConfig(cam, OMX_IndexConfigPortCapturing, obool) completed at 1012.
OMX_GetParameter(cam, OMX_IndexParamPortDefinition, portdef) completed at 1015.
OMX_SetParameter(cam, OMX_IndexParamPortDefinition, portdef) completed at 1022.
OMX_GetParameter(cam, OMX_IndexParamPortDefinition, portdef) completed at 1024.
Event 2130706433 on 0x334958
Got an event of type 7f000001 on Camera 0x334958 (d1: ffffffff, d2 7f000031)
OMX_SetParameter(cam, OMX_IndexParamPortDefinition, portdef) completed at 1026.
OMX_SetParameter(cam, OMX_IndexParamCommonUseStcTimestamps, timestamp) completed at 1029.
OMX_GetParameter(cam, OMX_IndexParamCommonSensorMode, smt) completed at 1032.
Sensor mode: framerate 0 (0), oneshot: 1
OMX_SetParameter(cam, OMX_IndexParamCommonSensorMode, smt) completed at 1037.
OMX_GetConfig(cam, OMX_IndexConfigVideoFramerate, frt) completed at 1039.
Alleged framerate: 1638400 (190000)
OMX_SetConfig(cam, OMX_IndexConfigVideoFramerate, frt) completed at 1043.
((OMX_COMPONENTTYPE*)enc)->SetParameter( enc, OMX_IndexParamPortDefinition, portdef) completed at 1049.
Waiting: 0
((OMX_COMPONENTTYPE*)nul)->SetParameter( nul, OMX_IndexParamPortDefinition, portdef) completed at 1051.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SetParameter( enc, OMX_IndexParamPortDefinition, portdef) completed at 1055.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SetConfig( enc, OMX_IndexConfigBrcmVideoIntraPeriod, hu32) completed at 1061.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SetConfig( enc, OMX_IndexParamBrcmNALSSeparate, cbool) completed at 1063.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SetParameter( enc, OMX_IndexParamBrcmVideoAVCInlineVectorsEnable, obool) completed at 1067.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->GetParameter( enc, OMX_IndexParamVideoAvc, avc) completed at 1069.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SetParameter( enc, OMX_IndexParamVideoAvc, avc) completed at 1075.
Waiting: 0
OMX_SetupTunnel(cam, 70+1, enc, 200) completed at 1090.
Waiting: 0
OMX_SetupTunnel(cam, 70, nul, 240) completed at 1091.
Waiting: 0
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 80 is output, disabled
Wants 1 bufs, needs 1, size 48, enabled: 0, pop: 0, aligned 16, domain 3
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 73 is input, disabled
Wants 1 bufs, needs 1, size 48, enabled: 0, pop: 0, aligned 16, domain 3
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 71 is output, disabled
Wants 0 bufs, needs 0, size 3133440, enabled: 0, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 200 is input, disabled
Wants 0 bufs, needs 0, size 3133440, enabled: 0, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 201 is output, disabled
Wants 1 bufs, needs 1, size 3133440, enabled: 0, pop: 0, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		0
	SliceHeight:	0
	Bitrate:	20971520
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		7
	Colour:		0
Event 0 on 0x334838
Clock 0x334838 has completed the last command.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandStateSet, OMX_StateIdle, ((void *)0)) completed at 1102.
Waiting: 0
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandStateSet, OMX_StateIdle, ((void *)0)) completed at 1103.
Waiting: 0
Event 0 on 0x334a50
Encoder 0x334a50 has completed the last command.
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandStateSet, OMX_StateIdle, ((void *)0)) completed at 1104.
Waiting: 0
Event 0 on 0x334b20
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandStateSet, OMX_StateIdle, ((void *)0)) completed at 1105.
NULL sink 0x334b20 has completed the last command.
Waiting: 0
Event 0 on 0x334958
Camera 0x334958 has completed the last command.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortEnable, 80, ((void *)0)) completed at 1109.
Waiting: 0
Event 0 on 0x334958
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortEnable, 70, ((void *)0)) completed at 1110.
Camera 0x334958 has completed the last command.
Waiting: 0
Event 0 on 0x334958
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortEnable, 70+1, ((void *)0)) completed at 1111.
Camera 0x334958 has completed the last command.
Waiting: 0
Event 0 on 0x334a50
Encoder 0x334a50 has completed the last command.
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandPortEnable, 200, ((void *)0)) completed at 1113.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandPortEnable, 200+1, ((void *)0)) completed at 1114.
Waiting: 0
Event 0 on 0x334b20
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandPortEnable, 240, ((void *)0)) completed at 1115.
NULL sink 0x334b20 has completed the last command.
Waiting: 0
OMX_GetParameter(h, OMX_IndexParamPortDefinition, portdef) completed at 566.
Allocated a buffer of 3133440 bytes
Event 0 on 0x334a50
Encoder 0x334a50 has completed the last command.
((OMX_COMPONENTTYPE*)h)->UseBuffer( h, end, port, ((void *)0), portdef->nBufferSize, buf) completed at 579.
Waiting: 0
OMX_GetParameter(h, OMX_IndexParamPortDefinition, portdef) completed at 566.
OMX_GetParameter(h, OMX_IndexParamPortDefinition, portdef) completed at 566.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 240 is input, enabled
Wants 0 bufs, needs 0, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 73 is input, disabled
Wants 1 bufs, needs 1, size 48, enabled: 0, pop: 0, aligned 16, domain 3
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 71 is output, enabled
Wants 0 bufs, needs 0, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 200 is input, enabled
Wants 0 bufs, needs 0, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 201 is output, enabled
Wants 1 bufs, needs 1, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		0
	SliceHeight:	0
	Bitrate:	20971520
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		7
	Colour:		0
OMX_SendCommand(cam, OMX_CommandStateSet, OMX_StateExecuting, NULL) completed at 1132.
OMX_SendCommand(nul, OMX_CommandStateSet, OMX_StateExecuting, NULL) completed at 1133.
Event 0 on 0x334b20
NULL sink 0x334b20 has completed the last command.
Event 0 on 0x334a50
Encoder 0x334a50 has completed the last command.
OMX_SendCommand(enc, OMX_CommandStateSet, OMX_StateExecuting, NULL) completed at 1134.
Event 0 on 0x334958
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Camera 0x334958 has completed the last command.
Port 71 is output, enabled
Wants 0 bufs, needs 0, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
Event 3 on 0x334a50
Encoder 0x334a50 port 201 settings changed.
Got buffer 0x334c80 filled (len 29)
OMX_FillThisBuffer(enc, ctx.encbufs) completed at 1142.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 201 is output, enabled
Wants 1 bufs, needs 1, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		0
	SliceHeight:	0
	Bitrate:	20971520
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		7
	Colour:		0
Got buffer 0x334c80 filled (len 5715)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 1061)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 692)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 2042)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 4050)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 5092)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 7426)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 9750)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 14320)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 28412)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 36019)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37439)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37842)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37751)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37514)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37707)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 38000)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37860)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37722)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37778)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37654)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37928)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37773)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37423)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37390)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37490)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37518)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37671)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37644)
Got buffer 0x334c80 filled (len 32912)
Got buffer 0x334c80 filled (len 37851)
Got buffer 0x334c80 filled (len 32912)

try to play from another computer with:
vlc -v udp://192.168.0.20:8554/

Won't work.
Checked with open nmap for open ports, but no rtsp server running.

I don't know if is running and i am doing something wrong with the address. Are you using a broadcast address?
When i stream with vlc i use the address of the pi and a file afterwards like 192.168.0.20:8554/stream. I tried this too, but success.

Thanks

dickon
Posts: 468
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: omxmotion

Sun May 06, 2018 8:20 am

It's a multicast address. Ensure that you're not using wifi -- multicast *really* breaks wifi under most conditions -- and use the same address on omxmotion's commandline as vlc's. ie,

Code: Select all

vlc -v udp://@224.0.0.40:5554
I never got around to doing anything with RTSP.

Zuifer
Posts: 12
Joined: Mon Apr 16, 2018 11:02 pm

Re: omxmotion

Mon May 07, 2018 7:07 pm

Hello dickon,

Thank you for your answer.
I only used this on wifi. :)
I tried it with the udp broadcast address for a while. I didn't break my wifi. Maybe it slowed down or lost packets. :)
But it didn't work.

Is there anything against using a localhost address or the target address? Is address format right with the @? I have seen this only when using pass like user:[email protected], but my knowledge is poor.

If i understand right you are streaming raw h.264.
What if i stream to local address to an rtsp server. I didn't look to much into how to do this, but vlc could incapsulate raspivid's stream. So what do you think about that?

The second possibility is piping. Is this possible with a simple -c -? Or is this not possible?

And the most interesting question is:
Is it running with the output i showed you? :)
You haven't told me.

Thanks

dickon
Posts: 468
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: omxmotion

Mon May 07, 2018 8:23 pm

I'm afraid I can't remember what state I left this code in -- I haven't actually used it in a while. It was mostly just another toy plaything that I knocked up because I could.

On the other hand, I do have a new Pi on order (to replace a P2 in the loft, as I want the Bluetooth), which will free up the one that's controlling the house to let me play with it again, when I have a little time (probably a couple of weeks).

The easiest way is to check it's working is with tcpdump. tcpdump the interface it's sending from, and you should see an awful lot of frames with the destination address of 224.0.0.$blah as that's the group it's sending to. With wifi, you may well find that it flat-out doesn't work: there are some very serious technical limitations to do with multicast and wifi that can be worked around, but you need to have a proper infrastructure and low-level control of your wifi APs that most consumer kit hasn't a hope of providing.

The '@' denotes multicast. The Wikipedia page is informative and worth a read if it's a new concept to you.

'-c -' should probably do it, but may conflict with the random output it tends to spit out. Use a named pipe if that's a problem; I can't remember.

Zuifer
Posts: 12
Joined: Mon Apr 16, 2018 11:02 pm

Re: omxmotion

Mon May 07, 2018 9:44 pm

Hello dickon,

Tried this:

./omxmotion -c - | cvlc -vvv stream:///dev/stdin --sout '#rtp{access=udp,sdp=rtsp://:8554/stream}' :demux=h264


and get:

Code: Select all

./omxmotion -c - | cvlc -vvv stream:///dev/stdin --sout '#rtp{access=udp,sdp=rtsp://:8554/stream}' :demux=h264
VLC media player 2.2.6 Umbrella (revision 2.2.6-0-g1aae78981c)
[00d70930] core libvlc debug: VLC media player - 2.2.6 Umbrella
[00d70930] core libvlc debug: Copyright © 1996-2017 the VideoLAN team
[00d70930] core libvlc debug: revision 2.2.6-0-g1aae78981c
[00d70930] core libvlc debug: configured with ./configure  '--build=arm-linux-gnueabihf' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-silent-rules' '--libdir=${prefix}/lib/arm-linux-gnueabihf' '--libexecdir=${prefix}/lib/arm-linux-gnueabihf' '--disable-maintainer-mode' '--disable-dependency-tracking' '--config-cache' '--disable-update-check' '--enable-fast-install' '--docdir=/usr/share/doc/vlc-data' '--with-binary-version=2.2.6-1~deb9u1+rpi1' '--enable-a52' '--enable-aa' '--enable-bluray' '--enable-bonjour' '--enable-caca' '--enable-chromaprint' '--enable-dbus' '--enable-dca' '--enable-directfb' '--enable-dvbpsi' '--enable-dvdnav' '--enable-faad' '--enable-flac' '--enable-fluidsynth' '--enable-freerdp' '--enable-freetype' '--enable-fribidi' '--enable-gles1' '--enable-gles2' '--enable-gnutls' '--enable-jack' '--enable-kate' '--enable-libass' '--enable-libmpeg2' '--enable-libxml2' '--enable-lirc' '--enable-live555' '--enable-mad' '--enable-mkv' '--enable-mod' '--enable-mpc' '--enable-mtp' '--enable-mux_ogg' '--enable-ncurses' '--enable-notify' '--enable-ogg' '--enable-opus' '--enable-pulse' '--enable-qt' '--enable-realrtsp' '--enable-samplerate' '--enable-sdl' '--enable-sdl-image' '--enable-sftp' '--enable-shine' '--enable-shout' '--enable-skins2' '--enable-sndio' '--enable-speex' '--enable-svg' '--enable-svgdec' '--enable-taglib' '--enable-theora' '--enable-twolame' '--enable-upnp' '--enable-vcdx' '--enable-vdpau' '--enable-vnc' '--enable-vorbis' '--enable-x264' '--enable-x265' '--enable-zvbi' '--with-kde-solid=/usr/share/solid/actions/' '--disable-decklink' '--disable-dxva2' '--disable-fdkaac' '--disable-gnomevfs' '--disable-goom' '--disable-gst-decode' '--disable-libtar' '--disable-mfx' '--disable-opencv' '--disable-projectm' '--disable-schroedinger' '--disable-telx' '--disable-vpx' '--disable-vsxu' '--disable-wasapi' '--enable-alsa' '--enable-atmo' '--enable-dc1394' '--enable-dv1394' '--enable-linsys' '--enable-omxil' '--enable-udev' '--enable-v4l2' '--enable-libva' '--enable-vcd' '--enable-smbclient' '--disable-oss' '--disable-crystalhd' '--disable-mmx' '--disable-sse' '--disable-neon' '--disable-altivec' '--enable-merge-ffmpeg' 'build_alias=arm-linux-gnueabihf' 'CFLAGS=-g -O2 -fdebug-prefix-map=/vlc-2.2.6=. -fstack-protector-strong -Wformat -Werror=format-security ' 'LDFLAGS=-Wl,-z,relro -Wl,--as-needed' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fdebug-prefix-map=/vlc-2.2.6=. -fstack-protector-strong -Wformat -Werror=format-security ' 'OBJCFLAGS=-g -O2 -fdebug-prefix-map=/vlc-2.2.6=. -fstack-protector-strong -Wformat -Werror=format-security' 'PKG_CONFIG_PATH=/vlc-2.2.6/ffmpeg/install/lib/pkgconfig'
[00d70930] core libvlc debug: searching plug-in modules
[00d70930] core libvlc debug: loading plugins cache file /usr/lib/arm-linux-gnueabihf/vlc/plugins/plugins.dat
[00d70930] core libvlc debug: recursively browsing `/usr/lib/arm-linux-gnueabihf/vlc/plugins'
[00d70930] core libvlc debug: saving plugins cache /usr/lib/arm-linux-gnueabihf/vlc/plugins/plugins.dat
[00d70930] core libvlc debug: plug-ins loaded: 449 modules
[00d70930] core libvlc debug: opening config file (/home/pi/.config/vlc/vlcrc)
[00d70930] core libvlc debug: translation test: code is "en_GB"
[00d70930] core libvlc debug: CPU has capabilities ARM_NEON FPU 
[00e09d90] core input debug: Creating an input for 'Media Library'
[00e09d90] core input debug: Input is a meta file: disabling unneeded options
[00e09d90] core input debug: using timeshift granularity of 50 MiB, in path '/tmp'
[00e09d90] core input debug: `file/xspf-open:///home/pi/.local/share/vlc/ml.xspf' gives access `file' demux `xspf-open' path `/home/pi/.local/share/vlc/ml.xspf'
[00e09d90] core input debug: creating demux: access='file' demux='xspf-open' location='/home/pi/.local/share/vlc/ml.xspf' file='/home/pi/.local/share/vlc/ml.xspf'
[00dfe058] core demux debug: looking for access_demux module matching "file": 16 candidates
[00dfe058] core demux debug: no access_demux modules matched
[00e09d90] core input debug: creating access 'file' location='/home/pi/.local/share/vlc/ml.xspf', path='/home/pi/.local/share/vlc/ml.xspf'
[00e01e58] core access debug: looking for access module matching "file": 25 candidates
[00e01e58] filesystem access debug: opening file `/home/pi/.local/share/vlc/ml.xspf'
[00e01e58] core access debug: using access module "filesystem"
[00e02608] core stream debug: Using stream method for AStream*
[00e02608] core stream debug: starting pre-buffering
[00e02608] core stream debug: received first data after 0 ms
[00e02608] core stream debug: pre-buffering done 296 bytes in 0s - 1431 KiB/s
[00e027c8] core stream debug: looking for stream_filter module matching "any": 9 candidates
[00e027c8] core stream debug: no stream_filter modules matched
[00e027c8] core stream debug: looking for stream_filter module matching "record": 9 candidates
[00e027c8] core stream debug: using stream_filter module "record"
[00e09d90] core input debug: creating demux: access='file' demux='xspf-open' location='/home/pi/.local/share/vlc/ml.xspf' file='/home/pi/.local/share/vlc/ml.xspf'
[00e172f0] core demux debug: looking for demux module matching "xspf-open": 67 candidates
[00e172f0] xspf demux debug: using XSPF playlist reader
[00e172f0] core demux debug: using demux module "playlist"
[00e17910] core demux meta debug: looking for meta reader module matching "any": 2 candidates
[00e17910] lua demux meta debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/reader
[00e17910] lua demux meta debug: Trying Lua scripts in /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/reader
[00e17910] lua demux meta debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/reader/filename.luac
[00e17910] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
[00e17910] core demux meta debug: no meta reader modules matched
[00e09d90] core input debug: `file/xspf-open:///home/pi/.local/share/vlc/ml.xspf' successfully opened
[00e191a0] core xml reader debug: looking for xml reader module matching "any": 1 candidates
[00e191a0] core xml reader debug: using xml reader module "xml"
[00e172f0] xspf demux debug: parsed 0 tracks successfully
[00e09d90] core input debug: EOF reached
[00e172f0] core demux debug: removing module "playlist"
[00e027c8] core stream debug: removing module "record"
[00e01e58] core access debug: removing module "filesystem"
[00e0b5a0] core playlist debug: creating audio output
[00e02608] core audio output debug: looking for audio output module matching "any": 6 candidates
[00e02608] pulse audio output debug: using library version 10.0.0
[00e02608] pulse audio output debug:  (compiled with version 10.0.0, protocol 32)
[00e02608] pulse audio output error: PulseAudio server connection failure: Connection refused
[00e02608] alsa audio output debug: Available ALSA PCM devices:
[00e02608] alsa audio output debug: Discard all samples (playback) or generate zero samples (capture) (null)
[00e02608] alsa audio output debug: bcm2835 ALSA, bcm2835 ALSA Default Audio Device (default:CARD=ALSA)
[00e02608] alsa audio output debug: bcm2835 ALSA, bcm2835 ALSA Default Audio Device (sysdefault:CARD=ALSA)
[00e02608] alsa audio output debug: bcm2835 ALSA, bcm2835 ALSA Direct sample mixing device (dmix:CARD=ALSA,DEV=0)
[00e02608] alsa audio output debug: bcm2835 ALSA, bcm2835 IEC958/HDMI Direct sample mixing device (dmix:CARD=ALSA,DEV=1)
[00e02608] alsa audio output debug: bcm2835 ALSA, bcm2835 ALSA Direct sample snooping device (dsnoop:CARD=ALSA,DEV=0)
[00e02608] alsa audio output debug: bcm2835 ALSA, bcm2835 IEC958/HDMI Direct sample snooping device (dsnoop:CARD=ALSA,DEV=1)
[00e02608] alsa audio output debug: bcm2835 ALSA, bcm2835 ALSA Direct hardware device without any conversions (hw:CARD=ALSA,DEV=0)
[00e02608] alsa audio output debug: bcm2835 ALSA, bcm2835 IEC958/HDMI Direct hardware device without any conversions (hw:CARD=ALSA,DEV=1)
[00e02608] alsa audio output debug: bcm2835 ALSA, bcm2835 ALSA Hardware device with all software conversions (plughw:CARD=ALSA,DEV=0)
[00e02608] alsa audio output debug: bcm2835 ALSA, bcm2835 IEC958/HDMI Hardware device with all software conversions (plughw:CARD=ALSA,DEV=1)
[00e02608] core audio output debug: using audio output module "alsa"
[00e0b5a0] core playlist debug: keeping audio output
[00e0b5a0] core playlist debug: adding item `stdin' ( stream:///dev/stdin )
[73c00518] core input debug: Creating an input for 'stdin'
[00e22df8] core interface debug: looking for interface module matching "hotkeys,none": 19 candidates
[00e22df8] core interface debug: using interface module "hotkeys"
[00e2e4d8] core interface debug: looking for interface module matching "globalhotkeys,none": 19 candidates
[00e0b5a0] core playlist debug: meta ok for (null), need to fetch art
[00e2e4d8] core interface debug: no interface modules matched
[00e2e4d8] core interface error: no suitable interface module
[00d70930] core libvlc error: interface "globalhotkeys,none" initialization failed
[00e2e4d8] core interface debug: looking for interface module matching "dbus,none": 19 candidates
[73c00ea8] core art finder debug: looking for meta fetcher module matching "any": 1 candidates
[00e2e4d8] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[00e2e4d8] core interface debug: no interface modules matched
[00e2e4d8] core interface error: no suitable interface module
[00d70930] core libvlc error: interface "dbus,none" initialization failed
[00e2e4d8] core interface debug: looking for interface module matching "dummy": 19 candidates
[00e2e4d8] dummy interface: using the dummy interface module...
[00e2e4d8] core interface debug: using interface module "dummy"
[00e0b5a0] core playlist debug: processing request item: null, node: Playlist, skip: 0
[00e0b5a0] core playlist debug: rebuilding array of current - root Playlist
[00e0b5a0] core playlist debug: rebuild done - 1 items, index -1
[00e0b5a0] core playlist debug: starting playback of the new playlist item
[00e0b5a0] core playlist debug: resyncing on stdin
[00e0b5a0] core playlist debug: stdin is at 0
[00e0b5a0] core playlist debug: creating new input thread
[73900510] core input debug: Creating an input for 'stdin'
[00e0b5a0] core playlist debug: requesting art for stdin
[737004e0] core art finder debug: looking for meta fetcher module matching "any": 1 candidates
[73800700] core stream output debug: using sout chain=`rtp{access=udp,sdp=rtsp://:8554/stream}'
[73800700] core stream output debug: stream=`rtp'
[73800940] core stream out debug: looking for sout stream module matching "rtp": 22 candidates
[73800940] core stream out warning: option access is unknown
[73800940] core stream out debug: set config option: sout-rtp-sdp to rtsp://:8554/stream
[73c00ea8] lua art finder debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/fetcher
[73c00ea8] lua art finder debug: Trying Lua scripts in /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/fetcher
[73c00ea8] lua art finder debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/fetcher/tvrage.luac
[73800940] stream_out_rtp stream out debug: RTSP stream at /stream
[73800940] core stream out debug: net: listening to * port 8554
[737004e0] lua art finder debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/fetcher
[737004e0] lua art finder debug: Trying Lua scripts in /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/fetcher
[737004e0] lua art finder debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/fetcher/tvrage.luac
[73800940] core stream out debug: using sout stream module "stream_out_rtp"
[73900510] core input debug: using timeshift granularity of 50 MiB, in path '/tmp'
[73900510] core input debug: `stream:///dev/stdin' gives access `stream' demux `' path `/dev/stdin'
[73900510] core input debug: specified demux `h264'
[73900510] core input debug: creating demux: access='stream' demux='h264' location='/dev/stdin' file='/dev/stdin'
[73c00ea8] lua art finder debug: skipping script (unmatched scope) /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/fetcher/tvrage.luac
[73c00ea8] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher
[73c00ea8] core art finder debug: no meta fetcher modules matched
[00e0b5a0] core playlist debug: searching art for stdin
[73c05fb8] core art finder debug: looking for art finder module matching "any": 2 candidates
[73802a08] core demux debug: looking for access_demux module matching "stream": 16 candidates
[737004e0] lua art finder debug: skipping script (unmatched scope) /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/fetcher/tvrage.luac
[737004e0] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher
[737004e0] core art finder debug: no meta fetcher modules matched
[00d70930] core libvlc debug: searching art for stdin
[73705da0] core art finder debug: looking for art finder module matching "any": 2 candidates
[73802a08] core demux debug: no access_demux modules matched
[73900510] core input debug: creating access 'stream' location='/dev/stdin', path='/dev/stdin'
[73802b80] core access debug: looking for access module matching "stream": 25 candidates
[73802b80] filesystem access debug: opening file `/dev/stdin'
[73c05fb8] lua art finder debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/art
[73c05fb8] lua art finder debug: Trying Lua scripts in /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art
[73c05fb8] lua art finder debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/00_musicbrainz.luac
[73802b80] core access debug: using access module "filesystem"
[73802c50] core stream debug: Using stream method for AStream*
[73705da0] lua art finder debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/art
[73705da0] lua art finder debug: Trying Lua scripts in /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art
[73705da0] lua art finder debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/00_musicbrainz.luac
[73802c50] core stream debug: starting pre-buffering
[73c05fb8] lua art finder debug: skipping script (unmatched scope) /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/00_musicbrainz.luac
[73c05fb8] lua art finder debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/01_googleimage.luac
[73705da0] lua art finder debug: skipping script (unmatched scope) /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/00_musicbrainz.luac
[73705da0] lua art finder debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/01_googleimage.luac
[73c05fb8] lua art finder debug: skipping script (unmatched scope) /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/01_googleimage.luac
[73c05fb8] lua art finder debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/02_frenchtv.luac
[73705da0] lua art finder debug: skipping script (unmatched scope) /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/01_googleimage.luac
[73705da0] lua art finder debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/02_frenchtv.luac
[73c05fb8] lua art finder debug: skipping script (unmatched scope) /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/02_frenchtv.luac
[73c05fb8] lua art finder debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/03_lastfm.luac
[73705da0] lua art finder debug: skipping script (unmatched scope) /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/02_frenchtv.luac
[73705da0] lua art finder debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/03_lastfm.luac
[73c05fb8] lua art finder debug: skipping script (unmatched scope) /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/03_lastfm.luac
[73c05fb8] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
[73c05fb8] core art finder debug: no art finder modules matched
[00e0b5a0] core playlist debug: art not found for stdin
[73705da0] lua art finder debug: skipping script (unmatched scope) /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/art/03_lastfm.luac
[73705da0] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
[73705da0] core art finder debug: no art finder modules matched
[00d70930] core libvlc debug: art not found for stdin
OMX_Init() completed at 978.
OMX_GetHandle(&clk, CLKNAME, &ctx, &genevents) completed at 979.
OMX_GetHandle(&cam, CAMNAME, &ctx, &genevents) completed at 980.
OMX_GetHandle(&enc, ENCNAME, &ctx, &encevents) completed at 981.
OMX_GetHandle(&nul, NULNAME, &ctx, &genevents) completed at 982.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortDisable, 70+i, ((void *)0)) completed at 994.
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortDisable, 70+i, ((void *)0)) completed at 994.
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortDisable, 70+i, ((void *)0)) completed at 994.
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortDisable, 70+i, ((void *)0)) completed at 994.
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandPortDisable, 200, ((void *)0)) completed at 995.
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandPortDisable, 200+1, ((void *)0)) completed at 996.
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandPortDisable, 240, ((void *)0)) completed at 997.
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandPortDisable, 240+1, ((void *)0)) completed at 998.
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandPortDisable, 240+2, ((void *)0)) completed at 999.
OMX_SetConfig(cam, OMX_IndexConfigRequestCallback, rcbt) completed at 1005.
OMX_SetParameter(cam, OMX_IndexParamCameraDeviceNumber, hu32) completed at 1008.
OMX_SetConfig(cam, OMX_IndexConfigPortCapturing, obool) completed at 1012.
OMX_GetParameter(cam, OMX_IndexParamPortDefinition, portdef) completed at 1015.
OMX_SetParameter(cam, OMX_IndexParamPortDefinition, portdef) completed at 1022.
OMX_GetParameter(cam, OMX_IndexParamPortDefinition, portdef) completed at 1024.
OMX_SetParameter(cam, OMX_IndexParamPortDefinition, portdef) completed at 1026.
OMX_SetParameter(cam, OMX_IndexParamCommonUseStcTimestamps, timestamp) completed at 1029.
OMX_GetParameter(cam, OMX_IndexParamCommonSensorMode, smt) completed at 1032.
OMX_SetParameter(cam, OMX_IndexParamCommonSensorMode, smt) completed at 1037.
OMX_GetConfig(cam, OMX_IndexConfigVideoFramerate, frt) completed at 1039.
OMX_SetConfig(cam, OMX_IndexConfigVideoFramerate, frt) completed at 1043.
((OMX_COMPONENTTYPE*)enc)->SetParameter( enc, OMX_IndexParamPortDefinition, portdef) completed at 1049.
((OMX_COMPONENTTYPE*)nul)->SetParameter( nul, OMX_IndexParamPortDefinition, portdef) completed at 1051.
((OMX_COMPONENTTYPE*)enc)->SetParameter( enc, OMX_IndexParamPortDefinition, portdef) completed at 1055.
((OMX_COMPONENTTYPE*)enc)->SetConfig( enc, OMX_IndexConfigBrcmVideoIntraPeriod, hu32) completed at 1061.
((OMX_COMPONENTTYPE*)enc)->SetConfig( enc, OMX_IndexParamBrcmNALSSeparate, cbool) completed at 1063.
((OMX_COMPONENTTYPE*)enc)->SetParameter( enc, OMX_IndexParamBrcmVideoAVCInlineVectorsEnable, obool) completed at 1067.
((OMX_COMPONENTTYPE*)enc)->GetParameter( enc, OMX_IndexParamVideoAvc, avc) completed at 1069.
((OMX_COMPONENTTYPE*)enc)->SetParameter( enc, OMX_IndexParamVideoAvc, avc) completed at 1075.
OMX_SetupTunnel(cam, 70+1, enc, 200) completed at 1090.
OMX_SetupTunnel(cam, 70, nul, 240) completed at 1091.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandStateSet, OMX_StateIdle, ((void *)0)) completed at 1102.
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandStateSet, OMX_StateIdle, ((void *)0)) completed at 1103.
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandStateSet, OMX_StateIdle, ((void *)0)) completed at 1104.
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandStateSet, OMX_StateIdle, ((void *)0)) completed at 1105.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortEnable, 80, ((void *)0)) completed at 1109.
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortEnable, 70, ((void *)0)) completed at 1110.
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortEnable, 70+1, ((void *)0)) completed at 1111.
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandPortEnable, 200, ((void *)0)) completed at 1113.
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandPortEnable, 200+1, ((void *)0)) completed at 1114.
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandPortEnable, 240, ((void *)0)) completed at 1115.
OMX_GetParameter(h, OMX_IndexParamPortDefinition, portdef) completed at 566.
((OMX_COMPONENTTYPE*)h)->UseBuffer( h, end, port, ((void *)0), portdef->nBufferSize, buf) completed at 579.
OMX_GetParameter(h, OMX_IndexParamPortDefinition, portdef) completed at 566.
OMX_GetParameter(h, OMX_IndexParamPortDefinition, portdef) completed at 566.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
OMX_SendCommand(cam, OMX_CommandStateSet, OMX_StateExecuting, NULL) completed at 1132.
OMX_SendCommand(nul, OMX_CommandStateSet, OMX_StateExecuting, NULL) completed at 1133.
OMX_SendCommand(enc, OMX_CommandStateSet, OMX_StateExecuting, NULL) completed at 1134.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
OMX_FillThisBuffer(enc, ctx.encbufs) completed at 1142.
[73802c50] core stream debug: received first data after 2176 ms
[73802c50] core stream debug: pre-buffering done 1024 bytes in 2s - 0 KiB/s
[73802e10] core stream debug: looking for stream_filter module matching "any": 9 candidates
[73802e10] core stream debug: no stream_filter modules matched
[73802e10] core stream debug: looking for stream_filter module matching "record": 9 candidates
[73802e10] core stream debug: using stream_filter module "record"
[73900510] core input debug: creating demux: access='stream' demux='h264' location='/dev/stdin' file='/dev/stdin'
[73802ed0] core demux debug: looking for demux module matching "h264": 67 candidates
[73802ed0] h264 demux error: this doesn't look like a H264 ES stream, continuing anyway
[73802ed0] h264 demux debug: using 25.00 fps
[73803578] core demux packetizer debug: looking for packetizer module matching "any": 23 candidates
[73803578] core demux packetizer debug: using packetizer module "packetizer_h264"
[73802ed0] core demux debug: using demux module "h264"
[73900510] core input debug: starting in async mode
[7380d170] core demux meta debug: looking for meta reader module matching "any": 2 candidates
[7380d170] lua demux meta debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/reader
[7380d170] lua demux meta debug: Trying Lua scripts in /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/reader
[7380d170] lua demux meta debug: Trying Lua playlist script /usr/lib/arm-linux-gnueabihf/vlc/lua/meta/reader/filename.luac
[7380d170] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
[7380d170] core demux meta debug: no meta reader modules matched
[73900510] core input debug: `stream:///dev/stdin' successfully opened
[matroska @ 0x6d7004f0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, matroska, to '(null)/2018-05-07T23:01:23.mkv':
  Metadata:
    encoder         : Lavf57.56.101
    Stream #0:0: Video: h264 (libx264) (High) (H264 / 0x34363248), yuv420p, 1920x1080, q=-1--1, 2097 kb/s, 25 fps, 25 tbr, 1k tbn, 25 tbc
[73900510] core input debug: EOF reached
[00e0b5a0] core playlist debug: finished input
[73802ed0] core demux debug: removing module "h264"
[73802b80] core access debug: object waitpipe triggered
[73803578] core demux packetizer debug: removing module "packetizer_h264"
[73802e10] core stream debug: removing module "record"
[73802b80] core access debug: removing module "filesystem"
[00e0b5a0] core playlist debug: dead input
[73800700] core stream output debug: destroying useless sout
[73800940] core stream out debug: destroying chain... (name=rtp)
[73800940] core stream out debug: removing module "stream_out_rtp"
[73801f28] core http host debug: HTTP host removed
[73800940] core stream out debug: destroying chain done
[00e0b5a0] core playlist debug: changing item without a request (current 0/1)
[00e0b5a0] core playlist debug: nothing to play
^C[00d70930] core libvlc debug: removing all interfaces
[00d70930] core libvlc debug: exiting
[00e2e4d8] core interface debug: removing module "dummy"
[00e22df8] core interface debug: removing module "hotkeys"
[00e0b5a0] core playlist debug: destroying
[00e0b5a0] core playlist debug: deactivating the playlist
[00e02608] core audio output debug: removing module "alsa"
[00e236a0] core playlist export debug: saving Media Library to file /home/pi/.local/share/vlc/ml.xspf.tmp18366
[00e236a0] core playlist export debug: looking for playlist export module matching "export-xspf": 4 candidates
[00e236a0] core playlist export debug: using playlist export module "export"
[00e236a0] core playlist export debug: removing module "export"






No stream playable. Maybe the problem you mentioned.





I tried
./omxmotion -c udp://@224.0.0.40:5554

and looked with wireshark for packets – nothing. But it's over wifi so it won't work anyway.
Looked with netstat – nothing

my output was:

Code: Select all

./omxmotion -c udp://@224.0.0.40:5554
PNG filename: (null)
OMX_Init() completed at 978.
OMX_GetHandle(&clk, CLKNAME, &ctx, &genevents) completed at 979.
OMX_GetHandle(&cam, CAMNAME, &ctx, &genevents) completed at 980.
OMX_GetHandle(&enc, ENCNAME, &ctx, &encevents) completed at 981.
OMX_GetHandle(&nul, NULNAME, &ctx, &genevents) completed at 982.
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortDisable, 80+i, ((void *)0)) completed at 991.
Waiting: 0
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortDisable, 70+i, ((void *)0)) completed at 994.
Waiting: 0
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortDisable, 70+i, ((void *)0)) completed at 994.
Waiting: 0
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortDisable, 70+i, ((void *)0)) completed at 994.
Waiting: 0
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortDisable, 70+i, ((void *)0)) completed at 994.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandPortDisable, 200, ((void *)0)) completed at 995.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandPortDisable, 200+1, ((void *)0)) completed at 996.
Waiting: 0
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandPortDisable, 240, ((void *)0)) completed at 997.
Waiting: 0
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandPortDisable, 240+1, ((void *)0)) completed at 998.
Waiting: 0
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandPortDisable, 240+2, ((void *)0)) completed at 999.
Waiting: 0
OMX_SetConfig(cam, OMX_IndexConfigRequestCallback, rcbt) completed at 1005.
OMX_SetParameter(cam, OMX_IndexParamCameraDeviceNumber, hu32) completed at 1008.
OMX_SetConfig(cam, OMX_IndexConfigPortCapturing, obool) completed at 1012.
OMX_GetParameter(cam, OMX_IndexParamPortDefinition, portdef) completed at 1015.
OMX_SetParameter(cam, OMX_IndexParamPortDefinition, portdef) completed at 1022.
OMX_GetParameter(cam, OMX_IndexParamPortDefinition, portdef) completed at 1024.
OMX_SetParameter(cam, OMX_IndexParamPortDefinition, portdef) completed at 1026.
OMX_SetParameter(cam, OMX_IndexParamCommonUseStcTimestamps, timestamp) completed at 1029.
OMX_GetParameter(cam, OMX_IndexParamCommonSensorMode, smt) completed at 1032.
Sensor mode: framerate 0 (0), oneshot: 1
OMX_SetParameter(cam, OMX_IndexParamCommonSensorMode, smt) completed at 1037.
OMX_GetConfig(cam, OMX_IndexConfigVideoFramerate, frt) completed at 1039.
Alleged framerate: 1638400 (190000)
OMX_SetConfig(cam, OMX_IndexConfigVideoFramerate, frt) completed at 1043.
((OMX_COMPONENTTYPE*)enc)->SetParameter( enc, OMX_IndexParamPortDefinition, portdef) completed at 1049.
Waiting: 0
((OMX_COMPONENTTYPE*)nul)->SetParameter( nul, OMX_IndexParamPortDefinition, portdef) completed at 1051.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SetParameter( enc, OMX_IndexParamPortDefinition, portdef) completed at 1055.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SetConfig( enc, OMX_IndexConfigBrcmVideoIntraPeriod, hu32) completed at 1061.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SetConfig( enc, OMX_IndexParamBrcmNALSSeparate, cbool) completed at 1063.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SetParameter( enc, OMX_IndexParamBrcmVideoAVCInlineVectorsEnable, obool) completed at 1067.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->GetParameter( enc, OMX_IndexParamVideoAvc, avc) completed at 1069.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SetParameter( enc, OMX_IndexParamVideoAvc, avc) completed at 1075.
Waiting: 0
OMX_SetupTunnel(cam, 70+1, enc, 200) completed at 1090.
Waiting: 0
OMX_SetupTunnel(cam, 70, nul, 240) completed at 1091.
Waiting: 0
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 80 is output, disabled
Wants 1 bufs, needs 1, size 48, enabled: 0, pop: 0, aligned 16, domain 3
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 73 is input, disabled
Wants 1 bufs, needs 1, size 48, enabled: 0, pop: 0, aligned 16, domain 3
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 71 is output, disabled
Wants 0 bufs, needs 0, size 3133440, enabled: 0, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 200 is input, disabled
Wants 0 bufs, needs 0, size 3133440, enabled: 0, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 201 is output, disabled
Wants 1 bufs, needs 1, size 3133440, enabled: 0, pop: 0, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		0
	SliceHeight:	0
	Bitrate:	2097152
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		7
	Colour:		0
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandStateSet, OMX_StateIdle, ((void *)0)) completed at 1102.
Waiting: 0
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandStateSet, OMX_StateIdle, ((void *)0)) completed at 1103.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandStateSet, OMX_StateIdle, ((void *)0)) completed at 1104.
Waiting: 0
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandStateSet, OMX_StateIdle, ((void *)0)) completed at 1105.
Waiting: 0
((OMX_COMPONENTTYPE*)clk)->SendCommand( clk, OMX_CommandPortEnable, 80, ((void *)0)) completed at 1109.
Waiting: 0
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortEnable, 70, ((void *)0)) completed at 1110.
Waiting: 0
((OMX_COMPONENTTYPE*)cam)->SendCommand( cam, OMX_CommandPortEnable, 70+1, ((void *)0)) completed at 1111.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandPortEnable, 200, ((void *)0)) completed at 1113.
Waiting: 0
((OMX_COMPONENTTYPE*)enc)->SendCommand( enc, OMX_CommandPortEnable, 200+1, ((void *)0)) completed at 1114.
Waiting: 0
((OMX_COMPONENTTYPE*)nul)->SendCommand( nul, OMX_CommandPortEnable, 240, ((void *)0)) completed at 1115.
Waiting: 0
OMX_GetParameter(h, OMX_IndexParamPortDefinition, portdef) completed at 566.
Allocated a buffer of 3133440 bytes
((OMX_COMPONENTTYPE*)h)->UseBuffer( h, end, port, ((void *)0), portdef->nBufferSize, buf) completed at 579.
Waiting: 0
OMX_GetParameter(h, OMX_IndexParamPortDefinition, portdef) completed at 566.
OMX_GetParameter(h, OMX_IndexParamPortDefinition, portdef) completed at 566.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 240 is input, enabled
Wants 0 bufs, needs 0, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 73 is input, disabled
Wants 1 bufs, needs 1, size 48, enabled: 0, pop: 0, aligned 16, domain 3
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 71 is output, enabled
Wants 0 bufs, needs 0, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 200 is input, enabled
Wants 0 bufs, needs 0, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 201 is output, enabled
Wants 1 bufs, needs 1, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		0
	SliceHeight:	0
	Bitrate:	2097152
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		7
	Colour:		0
OMX_SendCommand(cam, OMX_CommandStateSet, OMX_StateExecuting, NULL) completed at 1132.
OMX_SendCommand(nul, OMX_CommandStateSet, OMX_StateExecuting, NULL) completed at 1133.
OMX_SendCommand(enc, OMX_CommandStateSet, OMX_StateExecuting, NULL) completed at 1134.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 71 is output, enabled
Wants 0 bufs, needs 0, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		1920
	SliceHeight:	1088
	Bitrate:	0
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		0
	Colour:		20
Encoder 0x1153a50 port 201 settings changed.
OMX_FillThisBuffer(enc, ctx.encbufs) completed at 1142.
OMX_GetParameter(handle, OMX_IndexParamPortDefinition, portdef) completed at 154.
Port 201 is output, enabled
Wants 1 bufs, needs 1, size 3133440, enabled: 1, pop: 1, aligned 16, domain 1
Video type is currently:
	MIME:		(null)
	Native:		(nil)
	Width:		1920
	Height:		1080
	Stride:		0
	SliceHeight:	0
	Bitrate:	2097152
	Framerate:	1638400 (190000); (25.000000)
	Error hiding:	0
	Codec:		7
	Colour:		0
So just to clear things up. The -c address has to be a udp broadcast? No way streaming at localhost?

Doesn't look good. So no luck for me finding a solution which stream+record+motiondetect. :)
Webcam interface is great, but no streaming in h.264. Your solution seems the only one with raw stream. So i will look further in the forum.


Thanks for your time.

Return to “Camera board”