transcode FLV (YouTube flash) to MP4 (ISO MPEG v4)

Jason Crain jason at bluetree.ath.cx
Sun Jul 20 20:51:09 UTC 2008


Sven wrote:
> Hi all
>
> How to I convert a FLV video to MP4 (for iPod and PSP). I downloaded 
> flv2mpeg4 from getdeb.net, but I doesn't support audio.
>
> regards
> Svev

The iPod has some very specific MP4 requirements.  I usually use 
mencoder and do it like this:
    # encode video
    mencoder in.avi -ovc x264 -x264encopts 
crf=25:vbv_maxrate=768:vbv_bufsize=244:nocabac:level_idc=13:subq=6:partitions=all:me=umh:frameref=5:subq=6:trellis=2:direct_pred=auto 
-vf scale=320:-2,expand=320:240,crop=320:240,harddup -oac pcm -srate 
8000 -af channels=1 -o out.avi -ofps 24000/1001
    # encode audio
    faac --tns --mpeg-vers 4 -o out.m4a
    # extract raw video with MP4Box
    MP4Box -aviraw video out.avi
    # combine audio and video with MP4Box
    MP4Box -new -fps 23.976 -add out_video.h264 -add out.m4a out.mp4

But I like doing things the hard way, so there may already be scripts 
that do all this automatically.




More information about the ubuntu-users mailing list