RocketR
RocketR

Reputation: 3776

Encoding SWF to video with Melt

I'm doing a project which requires converting SWF movies to H.264 video on server-side, to be able to play them both in Flash player and on iPhone/iPad. And I really got stuck.

I'm using Melt from http://www.mltframework.org/ and this is my command-line:

melt movie.swf -consumer avformat:video.mp4 r=30 s=640x360 f=mp4 acodec=aac ab=128k ar=48000 vcodec=libx264 b=1000k an=1

It does play in Flash player, but fails to play on iDevices. I googled for iPhone video requirements and it seems my video files do satisfy them(frame size, framerate and bitrate). What settings should I change to make it play?

Upvotes: 0

Views: 656

Answers (1)

RocketR
RocketR

Reputation: 3776

I've spent a lot of time in google but managed to gather all the pieces, so these are parameters that work for iPhone:

r=30 s=640x360 f=mp4 acodec=aac ab=128k ar=48000 vcodec=libx264 level=30 b=1024k flags=+loop+mv4 cmp=256 partitions=+parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 me_method=hex subq=7 trellis=1 refs=1 bf=0 flags2=+mixed_refs-wpred-dct8x8 coder=0 wpredp=0 me_range=16 g=250 keyint_min=25 sc_threshold=40 i_qfactor=0.71 qmin=10 qmax=51 qdiff=4 maxrate=10M bufsize=10M an=1 threads=0

Also, I use faac -w to convert audio to appropriate format and MP4Box to join video and sound.

Upvotes: 1

Related Questions