[FFmpeg-user] finetuning x264 encoding between superfast and veryfast

Olivier Langlois olivier at trillion01.com
Thu Mar 13 22:31:58 CET 2014


Hi,

I need real-time h.264 encoding. With my HW, I can achieve that with 
superfast but with veryfast preset, the encoder isn't able to encode at 
a rate of 30 fps.

I want to get the most of what my hardware can give by finding the exact 
point between these 2 presets where the encoder is still Real-Time.

By being a neophyte in h.264 encoding and before testing by shooting in 
the dark, I'm seeking advices on which options could be added on top of 
veryfast preset to get the best encoding improvement for the amount of 
available free computation resources that I have.

                                   - superfast:
                                     --no-mbtree --me dia --no-mixed-refs
                                     --partitions i8x8,i4x4 --rc-lookahead 0
                                     --ref 1 --subme 1 --trellis 0 
--weightp 1
                                   - veryfast:
                                     --no-mixed-refs --rc-lookahead 10
                                     --ref 1 --subme 2 --trellis 0 
--weightp 1

Here is my current cmdline:

ffmpeg -f rawvideo -video_size 1920x1080 -pixel_format bgra -framerate 
30 -i /dev/stdin \
  -c:v libx264 -preset superfast -profile:v main -level 4.1 -pix_fmt 
yuv420p \
  -x264opts keyint=60:bframes=2:ref=1 -maxrate 6000k -bufsize 12000k \
  out.mkv

thank you for the suggestions



More information about the ffmpeg-user mailing list