Log in

View Full Version : Which ffmpeg codec for encoding animation?


ror
30th May 2013, 05:44
Hi,

I'm using Python package to generate animation (moving geometrical objects) and ffmpeg is one of available option for encoding the results. I tried x264, and used these parameters after reading an article about encoding animation with x264:

-vcodec libx264
-preset placebo
-tune psnr
-rc-lookahead 250

However I'm not satisfied with the result, and I recall about those SWF animations produced by screen capturing programs that look so real, and fonts are rendered so realistically, like you are seeing your own screen.

Can I output something similar or is there any other codec in current ffmpeg distribution for Window that is suited better for animation then x264?

ror
30th May 2013, 06:55
This produced best result on my source:

-vcodec png

and filename extension set to .mov

ror
30th May 2013, 07:12
^^^ this is of course lossless hence better if filesize is acceptible

Emulgator
30th May 2013, 11:58
what about trying -crf 16 ? Or -crf 12 ? and letting go {placebo, psnr, rc-lookahead} ?

poisondeathray
30th May 2013, 14:53
with small fonts you're probably running into chroma subsampling issues with 4:2:0

you need either RGB or YUV444 for full color; libx264 in ffmpeg supports yuv444p but it is not supported in flash (only local computer playback)

-pix_fmt rgb24 or -pix_fmt yuv444p

ror
31st May 2013, 00:06
what about trying -crf 16 ? Or -crf 12 ? and letting go {placebo, psnr, rc-lookahead} ?

For some reason this argument couldn't be accepted, and I didn't find out why

with small fonts you're probably running into chroma subsampling issues with 4:2:0

you need either RGB or YUV444 for full color; libx264 in ffmpeg supports yuv444p but it is not supported in flash (only local computer playback)

-pix_fmt rgb24 or -pix_fmt yuv444p

Sorry, but this didn't enhance, it just produced file that had problems with mplayer and MPC - mplayer couldn't play it and MPC displayed it upside down.


Anyway, thanks guys for your suggestions. I decided not to use animation module and instead output vector keyframes and do transition in MX2008 to SWF vector movie.

Cheers