GNOME Bugzilla – Bug 402593
deinterleave gives corrupt output
Last modified: 2008-05-21 06:38:41 UTC
I use the attached script to take input from my Delta 44 sound card and split each channel in to a separate ogg file (12 in total). However the resulting oggs are corrupt. Steps to reproduce 1. Run testsplit.py with a Delta 44 or similar sound card 2. Listen to the output Output: Corrupted audio Expected output: Correct audio I've attached a level 5 debug log and example ogg.
Created attachment 81544 [details] testsplit.py
Created attachment 81545 [details] Example ogg output
GST_DEBUG=5 log output can be found at (too large for bugzilla attachment): http://www.mikeasoft.com/~mike/log.gz
I expierence same corruption, and I would like to add important detail that I can get such corrupted sound on four (!) channels out of twelve instead of one. So input is not only corrupted, it is not in fact splitted correctly. Out of 12, I have 2 channel pairs which has something recorded - first and second, eleven and twelve.
This is really something you guys need to figure out, I think, at least it's much easier for you and pretty painful to reproduce without hardware. I've written a simple test feeding generated data, and it seems to be split correctly, at least when feeding float data, haven't tried feeding integer data + audioconvert. There's one thing to note though, and that's that deinterleave seems to output channels on the pads in a reverse ordering if I'm not mistaken, so e.g. channel 0 - src7 channel 1 - src6 ... channel 6 - src1 channel 7 - src0 Maybe you guys could add some pad probes and dump the first buffer of incoming data and outgoing data to see what's happening?
The log has lots of these: WARN baseaudiosrc gstbaseaudiosrc.c:509:gst_base_audio_src_create:<alsasrc0> create DISCONT of 11907 samples at sample 317079 WARN vorbisenc vorbisenc.c:1130:gst_vorbis_enc_chain:<vorbisenc0> Buffer is discontinuous, flushing encoder and restarting (Discont from 0:00:05.020000000 to 0:00:05.540000000) WARN vorbisenc vorbisenc.c:1130:gst_vorbis_enc_chain:<vorbisenc10> Buffer is discontinuous, flushing encoder and restarting (Discont from 0:00:03.210000000 to 0:00:03.260000000) WARN vorbisenc vorbisenc.c:1130:gst_vorbis_enc_chain:<vorbisenc3> Buffer is discontinuous, flushing encoder and restarting (Discont from 0:00:04.230000000 to 0:00:04.360000000) WARN vorbisenc vorbisenc.c:1130:gst_vorbis_enc_chain:<vorbisenc8> Buffer is discontinuous, flushing encoder and restarting (Discont from 0:00:04.230000000 to 0:00:04.360000000) WARN vorbisenc vorbisenc.c:1130:gst_vorbis_enc_chain:<vorbisenc6> Buffer is discontinuous, flushing encoder and restarting (Discont from 0:00:03.210000000 to 0:00:03.260000000) WARN vorbisenc vorbisenc.c:1130:gst_vorbis_enc_chain:<vorbisenc0> Buffer is discontinuous, flushing encoder and restarting (Discont from 0:00:05.540000000 to 0:00:06.340000000) ... which looks exactly like the problem in bug #411520, so maybe not related to deinterleave at all, but rather to alsasrc or vorbisenc? Could you make a debug log with GST_DEBUG=*:2 and check that you still get the above warnings? (to make sure the disconts aren't due to the debugging using up all the cpu causing alsasrc to skip)
No, I run test script with --gst-debug-level=2 flag and still got the same error messages you mentioned here: root@pecisk-desktop:/usr/src/gstreamer/head/deinterleave# ./test.py --gst-debug-level=2 (test.py:7930): Gtk-WARNING **: Whoever translated default:LTR did so wrongly. Pipeline constructed... Recording. /bin0/deinterleave0.src0 (gst.Pad) /bin0/deinterleave0.src1 (gst.Pad) /bin0/deinterleave0.src2 (gst.Pad) /bin0/deinterleave0.src3 (gst.Pad) /bin0/deinterleave0.src4 (gst.Pad) /bin0/deinterleave0.src5 (gst.Pad) /bin0/deinterleave0.src6 (gst.Pad) /bin0/deinterleave0.src7 (gst.Pad) /bin0/deinterleave0.src8 (gst.Pad) /bin0/deinterleave0.src9 (gst.Pad) /bin0/deinterleave0.src10 (gst.Pad) /bin0/deinterleave0.src11 (gst.Pad) 0:00:00.625065000 7930 0x8421728 WARN baseaudiosrc gstbaseaudiosrc.c:576:gst_base_audio_src_create:<alsasrc0> create DISCONT of 5733 samples at sample 6174 0:00:00.625509000 7930 0x85700e8 WARN vorbisenc vorbisenc.c:1130:gst_vorbis_enc_chain:<vorbisenc1> Buffer is discontinuous, flushing encoder and restarting (Discont from 0:00:00.000000000 to 0:00:00.140000000) 0:00:00.675949000 7930 0x85976d0 WARN vorbisenc vorbisenc.c:1130:gst_vorbis_enc_chain:<vorbisenc5> Buffer is discontinuous, flushing encoder and restarting (Discont from 0:00:00.000000000 to 0:00:00.140000000) 0:00:00.727417000 7930 0x85c73d0 WARN vorbisenc vorbisenc.c:1130:gst_vorbis_enc_chain:<vorbisenc6> Buffer is discontinuous, flushing encoder and restarting (Discont from 0:00:00.000000000 to 0:00:00.140000000) etc...
Could you please check if this is still happening with latest CVS of deinterleave? I fixed some smaller bugs and cleaned everything a bit... so maybe it works now. When testing it with audiotestsrc and 8 channels everything works fine.
It might also make sense to add a queue and audioconvert after each src pad of deinterleave btw...
p.s. I commented out those lines you suggested (gst_audio_set_channel_positions calls), but it didn't change anything So, I did this step by step: 1. Modified script to have audioconvert after queue, otherwise queue could not link with vorbisenc and script failed; 2. After that I launched script with --gst-debug-level=3 3. Everything was cool, and no errors where issued. However, all ogg files where zero in size. I also tried to push some input from my guitar - no effect either;
Created attachment 111098 [details] Log of Gst:*:3 for testsplit.py for 12 channels, cvs 18.05.2008
Created attachment 111103 [details] Log of Gst:*:3 for testsplit.py for 12 channels, cvs 18.05.2008 (with suggested fix)
Created attachment 111134 [details] testsplit.py
Ok, according to Peteris everything works now in CVS :)