user13418553
user13418553

Reputation:

Why does the same gstreamer command does work on WIndows but not on linux?

I try to capture a video from a webcam and save it after appr. 10 seconds (splitmuxsink) I have tried the same gstreamer cmd at Windows(10) and on Linux (yocto), but it does only work on windows. Windows machine is a regular laptop, Linux machine is a Raspy 3 At Linux the file get created after start, but doesn't grow in size and does not split after certain time..

c:\gstreamer\1.0\x86\bin>gst-launch-1.0.exe  -v souphttpsrc location=http://192.168.1.245:8080/video ! multipartdemux ! image/jpeg, framerate=25/1 ! jpegparse  ! splitmuxsink location=file%02d.mkv max-size-time=10000000000 muxer=matroskamux
gst-launch-1.0  -v souphttpsrc location=http://192.168.1.245:8080/video ! multipartdemux ! image/jpeg, framerate=25/1 ! jpegparse  ! splitmuxsink location=file%02d.mkv max-size-time=10000000000 muxer=matroskamux

I also tried to captue a singe jpg file, that worked at both systems similar.

gst-launch-1.0.exe  -v souphttpsrc location=http://192.168.1.245:8080/shot.jpg  ! filesink location=capture1.jpg

Versions of gstreamer: c:\gstreamer\1.0\x86\bin>gst-launch-1.0 --gst-version GStreamer Core Library version 1.15.90

root@raspberrypi3:~# gst-launch-1.0 --gst-version GStreamer Core Library version 1.14.4

The output is also quite similar, but at linux I have a output like /GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0: max-size-buffers = 13 /GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0: max-size-buffers = 14 all the time.... Is this output slowing everything so much down that it does not work?

Windows:

c:\gstreamer\1.0\x86\bin>gst-launch-1.0.exe  -v souphttpsrc location=http://192.168.1.245:8080/video ! multipartdemux ! image/jpeg, framerate=25/1 ! jpegparse  ! splitmuxsink location=file%02d.mkv max-size-time=10000000000 muxer=matroskamux
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstFileSink:sink: async = false
Got context from element 'souphttpsrc0': gst.soup.session=context, session=(SoupSession)NULL, force=(boolean)false;
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1: caps = image/jpeg, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = image/jpeg, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstJpegParse:jpegparse0.GstPad:sink: caps = image/jpeg, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = image/jpeg
/GstPipeline:pipeline0/GstJpegParse:jpegparse0.GstPad:src: caps = image/jpeg, parsed=(boolean)true, format=(string)I420, width=(int)1280, height=(int)720, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0.GstGhostPad:video.GstProxyPad:proxypad0: caps = image/jpeg, parsed=(boolean)true, format=(string)I420, width=(int)1280, height=(int)720, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0.GstPad:sink: caps = image/jpeg, parsed=(boolean)true, format=(string)I420, width=(int)1280, height=(int)720, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0.GstGhostPad:video: caps = image/jpeg, parsed=(boolean)true, format=(string)I420, width=(int)1280, height=(int)720, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0.GstPad:src: caps = image/jpeg, parsed=(boolean)true, format=(string)I420, width=(int)1280, height=(int)720, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstMatroskaMux:matroskamux0.GstMatroskamuxPad:video_0: caps = image/jpeg, parsed=(boolean)true, format=(string)I420, width=(int)1280, height=(int)720, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstMatroskaMux:matroskamux0.GstMatroskamuxPad:video_0: caps = NULL
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstFileSink:sink: location = file00.mkv
Pipeline is PREROLLED ...
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstMatroskaMux:matroskamux0.GstMatroskamuxPad:video_0: caps = image/jpeg, parsed=(boolean)true, format=(string)I420, width=(int)1280, height=(int)720, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstMatroskaMux:matroskamux0.GstPad:src: caps = video/x-matroska
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstFileSink:sink.GstPad:sink: caps = video/x-matroska
Setting pipeline to PLAYING ...
New clock: GstSystemClock

Linux:

root@raspberrypi3:~# gst-launch-1.0  -v souphttpsrc location=http://192.168.1.245:8080/video ! multipartdemux ! image/jpeg, framerate=25/1 ! jpegparse  ! splitmuxsink location=file%02d.mkv max-size-time=10000000000 muxer=matroskamux
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstFileSink:sink: async = false
Got context from element 'souphttpsrc0': gst.soup.session=context, session=(SoupSession)NULL, force=(boolean)false;
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1: caps = image/jpeg, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = image/jpeg, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstJpegParse:jpegparse0.GstPad:sink: caps = image/jpeg, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = image/jpeg
/GstPipeline:pipeline0/GstJpegParse:jpegparse0.GstPad:src: caps = image/jpeg, parsed=(boolean)true, format=(string)I420, width=(int)1280, height=(int)720, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0.GstGhostPad:video.GstProxyPad:proxypad0: caps = image/jpeg, parsed=(boolean)true, format=(string)I420, width=(int)1280, height=(int)720, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0.GstPad:sink: caps = image/jpeg, parsed=(boolean)true, format=(string)I420, width=(int)1280, height=(int)720, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0.GstPad:src: caps = image/jpeg, parsed=(boolean)true, format=(string)I420, width=(int)1280, height=(int)720, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0.GstPad:src: caps = image/jpeg, parsed=(boolean)true, format=(string)I420, width=(int)1280, height=(int)720, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstMatroskaMux:matroskamux0.GstMatroskamuxPad:video_0: caps = image/jpeg, parsed=(boolean)true, format=(string)I420, width=(int)1280, height=(int)720, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstMatroskaMux:matroskamux0.GstMatroskamuxPad:video_0: caps = NULL
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstFileSink:sink: location = file00.mkv
Pipeline is PREROLLED ...
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstMatroskaMux:matroskamux0.GstMatroskamuxPad:video_0: caps = image/jpeg, parsed=(boolean)true, format=(string)I420, width=(int)1280, height=(int)720, framerate=(fraction)25/1
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0: max-size-buffers = 6
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0: max-size-buffers = 7
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0: max-size-buffers = 8
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0: max-size-buffers = 9
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0: max-size-buffers = 10
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0: max-size-buffers = 11
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0: max-size-buffers = 12
/GstPipeline:pipeline0/GstSplitMuxSink:splitmuxsink0/GstQueue:queue0: max-size-buffers = 13
[...]

Upvotes: 0

Views: 1705

Answers (2)

user13418553
user13418553

Reputation:

I found out after trying several things:

  • GSteamer debug info is not realy usable because for me its too much info....

I got my example working with the following:

  • If I remove "jpegparse" and "framerate=25/1"

  • And add "do-timestamp=true" and reduce the size of the image "image/jpeg,width=640,height=480"

it does work.

Fiddling around with Gstreamer is IMO after 3 weeks of testing it not very user-friendly, but indeed its a very powerful tool.

gst-launch-1.0 -v souphttpsrc location=http://192.168.1.133:8080/video  do-timestamp=true ! multipartdemux ! image/jpeg,width=640,height=480 ! splitmuxsink location=FILE%02d.mkv max-size-time=10000000000 muxer=matroskamux

Upvotes: 0

divhart
divhart

Reputation: 370

Looking at splitmuxsink source it seems that the max-size-buffers = <N> logs come from growing the internal queues when they are full.
It is a bit hard to guess why, without further information, so I would recommend you to set GST_DEBUG=5 (or some other level) to get more output. Maybe check that you can write to your filesystem fast enough if you are working with high bitrates or use a intermediate location that is mounted in RAM (like /tmp often is).

Upvotes: 0

Related Questions