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 402593 - deinterleave gives corrupt output
deinterleave gives corrupt output
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.9
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-30 20:52 UTC by Michael Sheldon
Modified: 2008-05-21 06:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testsplit.py (1.36 KB, text/x-python)
2007-01-30 20:52 UTC, Michael Sheldon
Details
Example ogg output (23.49 KB, application/ogg)
2007-01-30 20:55 UTC, Michael Sheldon
Details
Log of Gst:*:3 for testsplit.py for 12 channels, cvs 18.05.2008 (351.34 KB, application/octet-stream)
2008-05-18 14:57 UTC, Peteris Krisjanis
Details
Log of Gst:*:3 for testsplit.py for 12 channels, cvs 18.05.2008 (with suggested fix) (370.51 KB, application/octet-stream)
2008-05-18 16:03 UTC, Peteris Krisjanis
Details
testsplit.py (1.78 KB, text/plain)
2008-05-19 08:11 UTC, Sebastian Dröge (slomo)
Details

Description Michael Sheldon 2007-01-30 20:52:10 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.
Comment 1 Michael Sheldon 2007-01-30 20:52:36 UTC
Created attachment 81544 [details]
testsplit.py
Comment 2 Michael Sheldon 2007-01-30 20:55:27 UTC
Created attachment 81545 [details]
Example ogg output
Comment 3 Michael Sheldon 2007-01-30 20:58:31 UTC
GST_DEBUG=5 log output can be found at (too large for bugzilla attachment):

 http://www.mikeasoft.com/~mike/log.gz
Comment 4 Peteris Krisjanis 2007-01-30 21:47:47 UTC
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.
Comment 5 Tim-Philipp Müller 2007-01-31 00:10:08 UTC
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?
Comment 6 Tim-Philipp Müller 2007-03-02 13:23:15 UTC
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)

Comment 7 Peteris Krisjanis 2007-03-04 22:10:19 UTC
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...
Comment 8 Sebastian Dröge (slomo) 2008-05-14 07:42:15 UTC
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.
Comment 9 Sebastian Dröge (slomo) 2008-05-16 13:24:46 UTC
It might also make sense to add a queue and audioconvert after each src pad of deinterleave btw...
Comment 10 Peteris Krisjanis 2008-05-18 14:55:31 UTC
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;
Comment 11 Peteris Krisjanis 2008-05-18 14:57:05 UTC
Created attachment 111098 [details]
Log of Gst:*:3 for testsplit.py for 12 channels, cvs 18.05.2008
Comment 12 Peteris Krisjanis 2008-05-18 16:03:06 UTC
Created attachment 111103 [details]
Log of Gst:*:3 for testsplit.py for 12 channels, cvs 18.05.2008 (with suggested fix)
Comment 13 Sebastian Dröge (slomo) 2008-05-19 08:11:48 UTC
Created attachment 111134 [details]
testsplit.py
Comment 14 Sebastian Dröge (slomo) 2008-05-21 06:38:41 UTC
Ok, according to Peteris everything works now in CVS :)