[gst-devel] Help with commandline gstreamer

LRN lrn1986 at gmail.com
Tue Oct 6 12:48:53 CEST 2009


Kaustubh Khade wrote:
> Hi,
>
> I'm looking for a command line argument to do the following
>
> 1. Read a .mpg file
> 2. Transcode the video component to mpeg4 (using ffenc_mpeg4)
> 3. Transcode the audio component to mp3
> 4. mux this to an AVI file.
>
> I know that I can use the following code to create a mp3 transcoded file
> using ffenc_libmp3lame (currently im just using a mp3 file as input.
> gst-launch filesrc location=Desktop/nana\ patekar.mp3 ! decodebin name= dec
> dec. ! queue ! audioconvert ! ffenc_libmp3lame ! filesink
> location=Desktop/nana.mp3
>
> I used this to get the video component in mpeg4 encoding in an AVI file.
> gst-launch filesrc location=Desktop/Rage\ Against\ The\ Machine\ -\ Killing\
> In\ The\ Name.mpg ! decodebin name= dec dec. ! queue ! ffenc_mpeg4 !
> filesink location=Desktop/Rage_gstreamer_v.avi
>
> I just dont know how to do it together.
>
> I want something that would take this file
> 'filesrc location=Desktop/Rage\ Against\ The\ Machine\ -\ Killing\ In\ The\
> Name.mpg'
>
> demux it and use the 'ffenc_mpeg4' and similarly 'audioconvert !
> ffenc_libmp3lame' and use 'avimux' to create an avi.
>
> Could someone help me out here?
>
> Kaustubh
>
>   
Something like this:
gst-launch-0.10 filesrc location=Desktop/Rage\ Against\ The\ Machine\ -\
Killing\ In\ The\ Name.mpg ! decodebin name=dec avimux name=avm dec.src0
! queue ! ffenc_mpeg4 ! avm.video_0 dec.src1 ! queue ! ffenc_libmp3lame
! avm.audio_0 avm.src ! filesink location=/Desktop/Rage_gstreamer_av.avi
(untested)
Assumes that src0 corresponds to video tracks and src1 to audio tracks
(which may or may not be the case, but usually it is).




More information about the gstreamer-devel mailing list