After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 706624 - audioconvert: Converts S32LE to S8 although S16LE would be possible too
audioconvert: Converts S32LE to S8 although S16LE would be possible too
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.0.9
Other Windows
: Normal normal
: 1.0.10
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-08-22 22:39 UTC by Tom
Modified: 2013-08-24 08:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst-launch-1.0.exe -v playbin uri=file:///C:/Users/Tomas/Desktop/h264_1080p_hp_4.1_10mbps_dts_unstyled_subs_monsters.mkv (4.00 KB, application/octet-stream)
2013-08-23 12:30 UTC, Tom
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 (21.10 KB, text/plain)
2013-08-23 13:19 UTC, Tom
Details
Output with the new dll (20.72 KB, text/plain)
2013-08-23 14:35 UTC, Tom
Details

Description Tom 2013-08-22 22:39:21 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.
Comment 1 Eric 2013-08-23 07:26:23 UTC
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.
Comment 2 Tim-Philipp Müller 2013-08-23 07:52:15 UTC
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?
Comment 3 Sebastian Dröge (slomo) 2013-08-23 08:19:09 UTC
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?
Comment 4 Tom 2013-08-23 12:30:34 UTC
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
Comment 5 Tom 2013-08-23 12:35:45 UTC
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?
Comment 6 Tom 2013-08-23 12:38:38 UTC
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.
Comment 7 Sebastian Dröge (slomo) 2013-08-23 12:58:19 UTC
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?
Comment 8 Sebastian Dröge (slomo) 2013-08-23 12:58:59 UTC
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?
Comment 9 Sebastian Dröge (slomo) 2013-08-23 13:03:50 UTC
GST_DEBUG=directsound*:6,audioconvert:6 actually... maybe there's something useful in there
Comment 10 Tom 2013-08-23 13:19:31 UTC
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
Comment 11 Sebastian Dröge (slomo) 2013-08-23 13:45:04 UTC
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
Comment 12 Tom 2013-08-23 14:33:59 UTC
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 ...
Comment 13 Tom 2013-08-23 14:35:52 UTC
Created attachment 252876 [details]
Output with the new dll
Comment 14 Sebastian Dröge (slomo) 2013-08-23 16:53:12 UTC
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
Comment 15 Tom 2013-08-23 17:25:33 UTC
Wait, what?..

Problem still exists - no difference which dll i use.
Comment 16 Tim-Philipp Müller 2013-08-23 20:24:03 UTC
> 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).
Comment 17 Sebastian Dröge (slomo) 2013-08-24 08:31:58 UTC
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