GNOME Bugzilla – Bug 697617
gst-libav renders incorrectly in multithread mode
Last modified: 2013-04-23 12:13:08 UTC
gst-launch-1.0 filesrc location=big_buck_bunny_480p_h264.mov ! qtdemux name=qt qt.video_0 ! avdec_h264 max-threads=4 ! autovideosink The above command produces incorrect frame(see the screenshot in attachment) for the famous "big buck bunny". While with ffplay(from libav), it works fine in multithread mode: ffplay -threads 4 big_buck_bunny_480p_h264.mov -------- More information(on a dual core CPU): $ gst-inspect-1.0 avdec_h264 Factory Details: Rank: primary (256) Long-name: libav H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 decoder Klass: Codec/Decoder/Video Description: libav h264 decoder Author: Wim Taymans <wim.taymans@gmail.com>, Ronald Bultje <rbultje@ronald.bitfreak.net>, Edward Hervey <bilboed@bilboed.com> Plugin Details: Name: libav Description: All libav codecs and formats (local snapshot) Filename: /usr/lib64/gstreamer-1.0/libgstlibav.so Version: 1.0.6 License: GPL Source module: gst-libav Binary package: libav Origin URL: http://www.libav.org $ gst-inspect-1.0 qtdemux Factory Details: Rank: primary (256) Long-name: QuickTime demuxer Klass: Codec/Demuxer Description: Demultiplex a QuickTime file into audio and video streams Author: David Schleef <ds@schleef.org>, Wim Taymans <wim@fluendo.com> Plugin Details: Name: isomp4 Description: ISO base media file format support (mp4, 3gpp, qt, mj2) Filename: /usr/lib64/gstreamer-1.0/libgstisomp4.so Version: 1.0.6 License: LGPL Source module: gst-plugins-good Source release date: 2013-03-22 Binary package: Fedora GStreamer-plugins-good package Origin URL: http://download.fedoraproject.org
Created attachment 241022 [details] Screen shot of the incorrect rendered frame
Could you provide a link to the exact input file used?
http://kino3d.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_h264.mov
Thanks & sigh, maybe we should just disable multi-threaded decoding entirely in 1.0.x - it works fine with the newer libav in git master.
For 1.0.x, it seems be caused by setting threads to FF_THREAD_SLICE type(See #697690).
Marking as blocker for 1.0.7 for now - we should try to fix it somehow, and if it's by simply disabling multi-threaded decoding at all (and let people know it works fine in git master). I don't know if even setting it to FF_THREAD_FRAME fixes it completely, I believe Sebastian mentioned some remaining issues on Windows.
I tried setting the threading to 0 and it still happens. Unfortunately this is only 0.10 as the only stream I have to reproduce this is a GDP stream... and muxing it to anything else makes the crash go away. Program received signal SIGSEGV, Segmentation fault.
+ Trace 231825
Thread 140737333872384 (LWP 6011)
So this is probably a different problem, completely unrelated to the threading in libav
See https://bugzilla.gnome.org/show_bug.cgi?id=698546 and this is a) a completely different problem and b) fixes in 1.0 already. So what should we do here now?
commit fb8156d26ca82b4102115b659395eafb8ad9cf1a Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Tue Apr 23 14:12:23 2013 +0200 avviddec: Disable SLICE based threaded decoding It causes artifacts in libav 0.8 and seems to be broken. https://bugzilla.gnome.org/show_bug.cgi?id=698649 commit ad6562eadd0ef9279781505b2c3e6ea6933edc6c Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Tue Apr 23 14:10:54 2013 +0200 avviddec: Enable FRAME based threaded decoding if upstream is not live If upstream is live we don't want FRAME based threaded decoding as it adds latency.