[gst-devel] problem negotiating pipeline: avi to mp4 conversion

Zaheer Merali zaheermerali at gmail.com
Mon Sep 10 21:59:15 CEST 2007


On 9/10/07, Stefan Kost <ensonic at hora-obscura.de> wrote:
> Tanim Islam wrote:
> > Hi, I am having a problem converting from avi to mp4 format. I have all the
> > necessary plugins (ffmpeg gstreamer pack, etc.). I wish to make my
> > video "ipod-friendly," so i want to convert the video to 320x240 at 29.97
> > fps. Here is my pipeline.
> >
> > gst-launch filesrc location=$name.avi ! decodebin name=decoder
> > decoder. ! 'video/x-raw-yuv,format=(fourcc)I420,framerate=29.97/1,width=320,height=240' !
> > ffmpegcolorspace ! ffenc_mpeg4 bitrate=640000 ! queue ! ffmux_mp4 name=mux !
> > filesink location=$name.mp4 decoder. ! audioconvert ! faac bitrate=64000 !
> > queue ! mux.
>
> Can you try
> gst-launch filesrc location=$name.avi ! decodebin name=decoder decoder. !
> video/x-raw-yuv,format='(fourcc)'I420,framerate=(fraction)'2997/100',width=320,height=240
> ! ffmpegcolorspace ! ffenc_mpeg4 bitrate=640000 ! queue ! ffmux_mp4 name=mux !
> filesink location=$name.mp4 decoder. ! audioconvert ! faac bitrate=64000 !
> queue ! mux.
>
> Stefan
>
>

Hi

You need to add: videoscale ! videorate after the decoder so:

gst-launch filesrc location=$name.avi ! decodebin name=decoder
decoder. ! videoscale ! videorate !
video/x-raw-yuv,framerate=(fraction)'2997/100',width=320,height=240 !
ffmpegcolorspace ! ffenc_mpeg4 bitrate=640000 ! queue ! ffmux_mp4
name=mux ! filesink location=$name.mp4 decoder. ! audioconvert ! faac
bitrate=64000 ! queue ! mux.

This will scale and adjust the framerate.

Zaheer




More information about the gstreamer-devel mailing list