GNOME Bugzilla – Bug 706624
audioconvert: Converts S32LE to S8 although S16LE would be possible too
Last modified: 2013-08-24 08:31:58 UTC
Windows 7, x32 Gstreamer 1.0.9 for Windows While playing any video file (mostly mkv) that i found on my PC sound is corrupted, very noisy, like stuck at max possible level. Changing volume flag from 1.0 to 10.0 does not make any difference. gst-0.1 works ok, vlc no problem too with the same files. Example: > gst-launch-1.0.exe playbin uri=file:///D:/Movie/bunny_bumping.mkv volume=1.0 Compiled the same in console app (1 example): <...> pipeline = gst_parse_launch ("playbin uri=file:///D:/foo_bar.mkv", NULL); <...> Console output is WITH ERRORS for all played files: Pipeline is PREROLLING ... No accelerated IMDCT transform found distribute latency... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstAudioSinkClock ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecode Bin:decodebin0/GstMatroskaDemux:matroskademux0: GStreamer encountered a general stream error. Additional debug info: matroska-demux.c(4660): gst_matroska_demux_loop (): /GstPlayBin:playbin0/GstURID ecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstMatroskaDemux:matroskademux0: stream stopped, reason error Execution ended after 253143157937 ns. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ... Thank You.
sounds like a bug I had : https://bugzilla.gnome.org/show_bug.cgi?id=705477 You can try the patch Sebastian Dröge sent me and see if sound is better.The link is in one of the last posts.
Could you make a GST_DEBUG=matroska*:6,*ebml*:6 debug log please and attach it (zipped, ideally). Also, could you point me to one of such files?
Can you run (before and after testing with the dll from the other bug) with -v? I.e. gst-launch-1.0.exe -v playbin uri=file://....... Also can you make one of the files available that breaks this way?
Created attachment 252843 [details] gst-launch-1.0.exe -v playbin uri=file:///C:/Users/Tomas/Desktop/h264_1080p_hp_4.1_10mbps_dts_unstyled_subs_monsters.mkv
Test files: http://www.auby.no/files/video_tests/ Noisy audio output: > gst-launch-1.0.exe playbin uri=file:///C:/Users/Tomas/Desktop/h264_1080p_hp_4.1_10mbps_dts_unstyled_subs_monsters.mkv BTW.: works fine with Matrix file. Output from: > gst-launch-1.0.exe -v playbin uri=file:///C:/Users/Tomas/Desktop/h264_1080p_hp_4.1_10mbps_dts_unstyled_subs_monsters.mkv gst_launch_-v.zip Output from GST_DEBUG=matroska*:6,*ebml*:6. There is no video output, only log (expected?): > gst-launch-1.0.exe playbin uri=file:///C:/Users/Tomas/Desktop/h264_1080p_hp_4.1_10mbps_dts_unstyled_subs_monsters.mkv 0:00:00.505487062 4128 078E83A8 DEBUG matroskademux matroska-demux.c :370:gst_matroska_demux_reset:<GstMatroskaDemux@0779DAC8> Resetting state 0:00:00.513472036 4128 078E83A8 DEBUG matroskademux matroska-demux.c :4869:gst_matroska_demux_sink_activate: going to pull mode 0:00:00.522146969 4128 079FF180 DEBUG matroskademux matroska-demux.c :4753:gst_matroska_demux_handle_sink_event:<matroskademux0> have event type caps : 078DEE20 on sink pad 0:00:00.532069340 4128 079FF180 LOG matroskademux matroska-demux.c :4554:gst_matroska_demux_loop:<matroskademux0> Offset 0, Element id 0x1a45dfa3, size 19, needed 5 0:00:00.540849205 4128 079FF180 LOG matroskademux matroska-demux.c :4245:gst_matroska_demux_parse_id:<matroskademux0> Parsing Element id 0x1a45dfa3 , size 19, prefix 5 0:00:00.548808655 4128 079FF180 LOG matroskademux matroska-demux.c :4113:gst_matroska_demux_take:<matroskademux0> taking 24 bytes for parsing 0:00:00.553717374 4128 079FF180 LOG ebmlread ebml-read.c:218: gst_ebml_peek_id_full:<matroskademux0> id 0x1a45dfa3 at offset 0x0 of length 19, prefix 5 0:00:00.559367911 4128 079FF180 LOG ebmlread ebml-read.c:228: gst_ebml_peek_id_full:<matroskademux0> current br 078F3A10; remaining 24 0:00:00.564701221 4128 079FF180 DEBUG matroskareadcommon matroska-read-co mmon.c:1151:gst_matroska_read_common_parse_header:0779DB80 id: 1a45dfa3 0:00:00.569763895 4128 079FF180 LOG ebmlread ebml-read.c:218: gst_ebml_peek_id_full:<matroskademux0> id 0x1a45dfa3 at offset 0x0 of length 19, prefix 5 0:00:00.575659948 4128 079FF180 LOG ebmlread ebml-read.c:228: gst_ebml_peek_id_full:<matroskademux0> current br 078F3A10; remaining 24 0:00:00.580903721 4128 079FF180 LOG ebmlread ebml-read.c:273: gst_ebml_read_master:<matroskademux0> pushing level 1 at offset 5 0:00:00.585479818 4128 079FF180 LOG ebmlread ebml-read.c:218: gst_ebml_peek_id_full:<matroskademux0> id 0x4282 at offset 0x5 of length 8, pref ix 3 0:00:00.590959384 4128 079FF180 LOG ebmlread ebml-read.c:228: gst_ebml_peek_id_full:<matroskademux0> current br 078F3A38; remaining 19 0:00:00.596220173 4128 079FF180 LOG ebmlread ebml-read.c:218: gst_ebml_peek_id_full:<matroskademux0> id 0x4282 at offset 0x5 of length 8, pref ix 3 0:00:00.601577791 4128 079FF180 LOG ebmlread ebml-read.c:228: gst_ebml_peek_id_full:<matroskademux0> current br 078F3A38; remaining 19 0:00:00.607251016 4128 079FF180 DEBUG matroskareadcommon matroska-read-co mmon.c:1224:gst_matroska_read_common_parse_header:0AADFCE8 EbmlDocType: matroska 0:00:00.612993521 4128 079FF180 LOG ebmlread ebml-read.c:218: gst_ebml_peek_id_full:<matroskademux0> id 0x4287 at offset 0x10 of length 1, pre fix 3 0:00:00.618479164 4128 079FF180 LOG ebmlread ebml-read.c:228: gst_ebml_peek_id_full:<matroskademux0> current br 078F3A38; remaining 8 0:00:00.623580326 4128 079FF180 LOG ebmlread ebml-read.c:218: gst_ebml_peek_id_full:<matroskademux0> id 0x4287 at offset 0x10 of length 1, pre fix 3 (And goes it on and on..) (In reply to comment #2) > Could you make a GST_DEBUG=matroska*:6,*ebml*:6 debug log please and attach it > (zipped, ideally). > > Also, could you point me to one of such files?
Dear Eric, can you explain more about patch? (In reply to comment #1) > sounds like a bug I had : https://bugzilla.gnome.org/show_bug.cgi?id=705477 > > You can try the patch Sebastian Dröge sent me and see if sound is better.The > link is in one of the last posts.
Same as bug #705477 then, let's repurpose this here as the underlying audioconvert bug. It shouldn't convert to S8 here at all. Could you provide a sample file?
I can't reproduce this here with these samples unfortunately... Can you also get a debug log with GST_DEBUG=directsound*:6 and attach it here?
GST_DEBUG=directsound*:6,audioconvert:6 actually... maybe there's something useful in there
Created attachment 252852 [details] Output from GST_DEBUG=directsound*:6,audioconvert:6.: > gst-launch-1.0.exe playbin uri=file:///C:/Users/Tomas/Desktop/h264_1080p_hp_4.1_10mbps_dts_unstyled_subs_monsters.mkv
Can you replace lib/gstreamer-1.0/libgstaudioconvert.dll with this one here? http://people.freedesktop.org/~slomo/libgstaudioconvert.dll It will output some more information (but leak memory). Then rerun and attach the output here again
With the new libgstaudioconvert.dll and the debug attach to follow: $ gst-launch-1.0.exe playbin uri=file:///C:/Users/Tomas/Desktop/h264_1080p_hp_4 .1_10mbps_dts_unstyled_subs_monsters.mkv 2>err.txt Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Redistribute latency... conv trying to fixate othercaps audio/x-raw, layout=(string)interleaved, rate=(i nt)48000, format=(string){ S8, S16LE }, channels=(int)[ 1, 2 ] based on caps aud io/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)48000, cha nnels=(int)6, channel-mask=(bitmask)0x000000000000003f conv now fixating audio/x-raw, layout=(string)interleaved, rate=(int)48000, form at=(string){ S8, S16LE }, channels=(int)[ 1, 2 ] conv step 0 audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(st ring){ S8, S16LE }, channels=(int)[ 1, 2 ] conv step 1 audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(st ring){ S8, S16LE }, channels=(int)2, channel-mask=(bitmask)0x0000000000000003 conv step 2 audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(st ring){ S8, S16LE }, channels=(int)2, channel-mask=(bitmask)0x0000000000000003 conv fixated othercaps to audio/x-raw, layout=(string)interleaved, rate=(int)480 00, format=(string)S8, channels=(int)2, channel-mask=(bitmask)0x0000000000000003 Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstAudioSinkClock conv trying to fixate othercaps audio/x-raw, layout=(string)interleaved, rate=(i nt)48000, format=(string){ S8, S16LE }, channels=(int)[ 1, 2 ] based on caps aud io/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)48000, cha nnels=(int)6, channel-mask=(bitmask)0x000000000000003f conv now fixating audio/x-raw, layout=(string)interleaved, rate=(int)48000, form at=(string){ S8, S16LE }, channels=(int)[ 1, 2 ] conv step 0 audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(st ring){ S8, S16LE }, channels=(int)[ 1, 2 ] conv step 1 audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(st ring){ S8, S16LE }, channels=(int)2, channel-mask=(bitmask)0x0000000000000003 conv step 2 audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(st ring){ S8, S16LE }, channels=(int)2, channel-mask=(bitmask)0x0000000000000003 conv fixated othercaps to audio/x-raw, layout=(string)interleaved, rate=(int)480 00, format=(string)S8, channels=(int)2, channel-mask=(bitmask)0x0000000000000003 Got EOS from element "playbin0". Execution ended after 60319939423 ns. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...
Created attachment 252876 [details] Output with the new dll
commit cebae4514a077d93f55053cce0d0d8a1ddc51488 Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Fri Aug 23 18:51:59 2013 +0200 audioconvert: If we have to lose precision, try to lose as less precision as possible https://bugzilla.gnome.org/show_bug.cgi?id=706624
Wait, what?.. Problem still exists - no difference which dll i use.
> Problem still exists - no difference which dll i use. That .dll was just for debugging purposes. The fix will be in the next release (1.0.10).
For now as a workaround you can use http://people.freedesktop.org/~slomo/libgstdirectsoundsink.dll , I could also provide a new audioconvert plugin with the fix if needed