Quote:
Originally Posted by DWB
Trying to get a better encode for mobile videos and am using -vcodec mpeg4 instead of -vcodec libx264.
If I encode the same video myself on Handbrake, I can tweak it and get crystal clear at 1/2 the bit rate. But I am a ffmpeg noob and am stumbling over the settings here.
This is the default ffmpeg setting:
Code:
-acodec libfaac -ab 96k -vcodec mpeg4 -b 800k -mbd 2 -cmp 2 -subcmp 2
I can get the same video to look great at around 400k or so on Handbrake. But even at 800k here, it still breaks up some. I want to reduce bitrate and improve quality. How can I do this in ffmpeg? There is so much information online that I'm drowning in it, and most of it seems to be for libx264.
Here are some additional settings I use in Handbrake that I don't know how to incorporate into ffmpeg, but would like to:
Code:
ref=3:bframes=3:subq=6:mixed-refs=0:weightb=0:8x8dct=0:trellis=0:b-adapt=2
Thanks to anyone who can demystify ffmpeg mobile encoding for me . 
|
What version of ffmpeg are you using?
We're currently using the latest source build so I can't comment on older versions because they don't have the same optionss/flags.
you can follow these instructions for building from source on debian/ubuntu:
https://ffmpeg.org/trac/ffmpeg/wiki/...mpilationGuide
Here's the script we use for encoding mp4's, as well as the ffmpeg settings:
Quote:
for i in ./convert/*_members.mp4
do
original=`basename $i`
prefix="${original%%_members.mp4}"
ffmpeg -i "$i" -s hd720 -vcodec libx264 -b:v 2300k -minrate 2300k -maxrate 2300k -bufsize 1050k -f flv -acodec libfaac -b:a 192k -ac 2 -ar 44100 -preset slow -crf 22 -threads 0 -f mp4 ./transfer/"${prefix}"_2300k.mp4
ffmpeg -i "$i" -s hd720 -vcodec libx264 -b:v 1200k -minrate 1200k -maxrate 1200k -bufsize 550k -f flv -acodec libfaac -b:a 128k -ac 2 -ar 44100 -preset slow -crf 22 -threads 0 -f mp4 ./transfer/"${prefix}"_1200k.mp4
done
for i in ./convert/*_trailer.mp4
do
filename=`basename $i`
ffmpeg -i "$i" -s hd720 -vcodec libx264 -b:v 1200k -minrate 1200k -maxrate 1200k -bufsize 550k -f flv -acodec libfaac -b:a 128k -ac 2 -ar 44100 -preset slow -crf 22 -threads 0 -f mp4 ./transfer/"${filename}"
done
|