[gst-devel] converting between audio formats using GStreamer
cppb
cpp.begin at gmail.com
Sun Jan 31 19:36:57 CET 2010
hi,
I am a beginner and want to develop some apps using Python and GStreamer.
I am using the following pipeline to convert a wav file to mp3.
m = gst.parse_launch("filesrc location=~/music.wav ! decodebin
! audioconvert ! lame ! filesink location=~/music.mp3")
m.set_state(gst.STATE_PLAYING)
# the following prints a traceback
# d = m.get_duration(gst.FORMAT_TIME)
this creates mp3 file, but it is not complete. I tried time.sleep(seconds)
call in the above code. This helped at least write some data to the mp3 file
created.
for time.sleep() call, I tried different time intervals, but still it
doesn't create the file with full data as the original.
I don't want to use time.sleep() and want to know if there is a better way
to do this. Can anyone help?
Also tried the get_duration() method but it throws an error "query failed"
--
View this message in context: http://n4.nabble.com/converting-between-audio-formats-using-GStreamer-tp1458136p1458136.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list