[FFmpeg-user] How can I improve video quality and reduce system load simultaneously?

Roger Pack rogerdpack2 at gmail.com
Mon Nov 12 18:12:33 CET 2012


On Sun, Nov 11, 2012 at 11:09 PM, Boram Han <mlight3 at gmail.com> wrote:

> Hello.
>
> I've been some experimentation for finding suitable command that satisfied
> encoding speed and quality both, and I found this command options.
>
> ffmpeg -y -i input.avi -f custom_segment -acodec libfaac -ac 2 -ar 22050
> -vcodec libx264 -x264opts keyint=5:min-keyint=1 -b:v 1024k -subq 1 -refs 1
> -qcomp 0.6 -qmin 3 -qmax 51 -qdiff 4 -threads 1 -r 15 -async 1 test.m3u8
>

Full uncut command line and console output?


>
> * ffmpeg version is 0.10
>

Kind of old.


> * yasm is installed.
> * custom_segment works identically with segment options in ffmpeg. it is
> customized.
>

Is it generally useful? If so submit a patch :)


> * our segmented ts file's duration is limited 5 seconds.
> * this m3u8 will be played by ipad.
>
> When I start encode 20 files concurrently, the movie is being buffered too
> often to watch.
>

So I assume the files are being written "too slowly" so the clients get
ahead/caught up and have to wait for ffmpeg to catch up?


>
> Could I increase concurrent encoding numbers with high quality and no
> buffering by adjusting options?
>

Probably.
What comes to mind is libx264's "superfast" preset or the like.
http://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide may be useful
http://ffmpeg.org/trac/ffmpeg/wiki/StreamingGuide may be useful.


More information about the ffmpeg-user mailing list