GNOME Bugzilla – Bug 339488
lame plugin hangs
Last modified: 2006-04-24 21:25:17 UTC
The following pipeline correctly separates (& plays) the audio track from an AVI file: $ gst-launch-0.10 filesrc location="ben.avi" ! decodebin ! osssink If, instead of playing the audio I try to convert it to an MP3 using the lame plugin using the following pipeline, the command never finishes and no output file is created. $ gst-launch-0.10 filesrc location="ben.avi" ! decodebin ! lame ! filesink location="foo.mp3" The only output is " Setting pipeline to PAUSED ... Pipeline is PREROLLING ... " Running with -v gives the following: $ gst-launch-0.10 -v filesrc location="ben.avi" ! decodebin ! lame ! filesink location="foo.mp3" Setting pipeline to PAUSED ... /pipeline0/decodebin0/typefind.src: caps = video/x-msvideo Pipeline is PREROLLING ... /pipeline0/decodebin0/queue0.sink: caps = image/jpeg, framerate=(fraction)500000/33333, width=(int)320, height=(int)240 /pipeline0/decodebin0/jpegdec0.sink: caps = image/jpeg, framerate=(fraction)500000/33333, width=(int)320, height=(int)240 /pipeline0/decodebin0/jpegdec0.src: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)320, height=(int)240, framerate=(fraction)500000/33333 Versions below: ii libgstreamer0.10-0 0.10.4-1ubuntu1 Core GStreamer libraries and elements ii gstreamer0.10-plugins-ugly 0.10.3-0ubuntu1 GStreamer plugins from the "ugly" set ii gstreamer0.10-plugins-base 0.10.5-0ubuntu3 GStreamer plugins from the "base" set I'm not 100% convinced that this is a valid pipeline - but it seems that it should be, and cursory enquiries on #gstreamer suggested it should work.
Created attachment 64160 [details] Output of pipeline under GST_DEBUG=3
You probably need at least an audioconvert element in front of the lame element. What's the output of $ gst-launch-0.10 -v playbin uri=file:///path/to/file.avi ?
Created attachment 64231 [details] Output of gst-launch-0.10 -v playbin
Adding an audioconvert element before lame doesn't make any (noticeable) difference - the pipeline still hangs.
The .avi seems to contain 8-bit raw audio in mono with a somewhat unusual sample rate: /playbin0/decoder.src1: caps = audio/x-raw-int, endianness=(int)1234, channels=(int)1, width=(int)8, depth=(int)8, signed=(boolean)false, rate=(int)11024 Try adding an audioresample element as well: $ gst-launch-0.10 filesrc location="ben.avi" ! decodebin ! audioconvert ! audioresample ! lame ! filesink location="foo.mp3"
That works :) The outstanding question is is it a bug that it hangs without the resample, or is that just my bad for a sloppy pipeline?
It's not a bug, it's expected behaviour (I just didn't think of the possibilit of a non-standard samplerate, that's all).