GStreamer saving video capture to file: intermittent freezes

marc3 at rechte.fr marc3 at rechte.fr
Wed Apr 15 23:24:20 PDT 2015


Thanks a lot Thiago for your knowledgable assitance. It is really a 
pleasure to work on Open Source software.

Le 2015-04-15 20:10, Thiago Santos a écrit :
> On 04/15/2015 06:22 AM, marc3 at rechte.fr wrote:
>> (continuation)
>> 
>> I discovered that when uploaded to youtube (and also to Google drive), 
>> the video plays OK !
> Do you have a link to this same file below on google drive or youtube?
>> 
>> You'll find it here unaltered: http://195.167.234.228/capture.mp4
> "gst-launch-1.0 filesrc ! qtdemux ! fakesink silent=false -v" to show
> something wrong in the timestamps. While the dts follow smoothly and
> the duration is constant, the pts jumps a few times and it matches the
> times that the video freezes on screen.
> 
> There is something wrong with pts/dts handling here.
> 
> Did you capture this using which version of gstreamer?
> 
Package is:
gstreamer1-1.4.5-1.fc21.x86_64

> Do you have a GST_DEBUG=6 log of this capture? It should help
> verifying that qtmux receives the correct pts/dts or if they are
> already wrong since the beginning.
> 
No I did not debug. I will do a second test with that environment 
variable set.

> Not sure if related yet, but there is
> https://bugzilla.gnome.org/show_bug.cgi?id=740575 that could have some
> impact here.
> 

>> This capture is from a Logitech C920 camera. It has among other 
>> features, a monitor stream. When I capture both streams (monitor sent 
>> to an X window, the other to a file), the problem disappears !
>> 
>> With this command the video is OK:
>> $ gst-launch-1.0 -v -e uvch264src device=/dev/video0 name=src 
>> auto-start=true \
>>     src.vidsrc ! queue ! 
>> video/x-h264,width=1280,height=720,framerate=30/1 ! h264parse ! mp4mux 
>> ! filesink location=capture.mp4 \
>>     src.vfsrc ! queue ! 
>> video/x-raw,format=\(string\)YUY2,width=320,height=240,framerate=10/1 
>> ! xvimagesink sync=false
> 
> Does the error still happen if you remove the vfsrc branch? Just 
> curious.
Yes the command that generated the faulty capture is:
gst-launch-1.0 -v -e uvch264src device=/dev/video0 name=src 
auto-start=true \
       src.vidsrc ! video/x-h264,width=1280,height=720,framerate=30/1 ! 
h264parse ! \
       mp4mux ! \
       filesink location=capture.mp4

Note that using v4l2 plugin (still with h264 cap) instead of uvch264 
produces the same problem:
gst-launch-1.0 -e v4l2src device=/dev/video0 ! 
video/x-h264,width=1280,height=720,framerate=30/1 ! \
       h264parse ! \
       mp4mux ! \
       filesink location=capture.mp4
> 
>> 
>> Marc
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list