Log in

View Full Version : Flash compatible x264 video?


superspurv
19th January 2009, 15:18
How can i use ffmpeg or mencoder to convert (any) video to flash compatible h264?

Commandline linux (ubuntu).

Dark Shikari
19th January 2009, 15:26
Linkage (http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/).

When using target bitrate mode:
First pass: -vpre fastfirstpass
Second pass: -vpre hq

When using constant quality mode:
Only one pass: -vpre hq

plonk420
20th January 2009, 04:53
does this have anything to do with putting the "index" or whatever at the beginning of the file (for http streaming)?

ie, like what the QTIndexSwapper AIR app does..

Dark Shikari
20th January 2009, 04:56
does this have anything to do with putting the "index" or whatever at the beginning of the file (for http streaming)?

ie, like what the QTIndexSwapper AIR app does..qt-faststart in ffmpeg.

plonk420
20th January 2009, 05:11
qt-faststart in ffmpeg.

ah, good to know. thanks! (i guess i wasn't paying attention somewhere while reading x264-in-flash threads :()

superspurv
20th January 2009, 08:27
I've got this working:

/usr/local/bin/ffmpeg -i INPUT.AVI -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre hq -s 524x393 -crf 24 -threads 0 TEMPFILE.MP4

and:

/usr/local/bin/qt-faststart TEMPFILE.MP4 VIDEO.FLV

(qt-faststart copiled and copied to /usr/local/bin)

The file VIDEO.FLV will now play while downloading i the JW FLV-player.

Dark Shikari
20th January 2009, 08:30
/usr/local/bin/qt-faststart TEMPFILE.MP4 VIDEO.FLV

(qt-faststart copiled and copied to /usr/local/bin)

The file VIDEO.FLV will now play while downloading i the JW FLV-player."VIDEO.FLV" is rather misleading when the file is an mp4, but if it makes you feel better... ;)

superspurv
20th January 2009, 08:50
"VIDEO.FLV" is rather misleading when the file is an mp4, but if it makes you feel better... ;)

It makes me feel better. :rolleyes: But there is one small error in my ffmpeg line: -s 524x393 should be 524x394 (frame size must be a multiple of 2)