[Ffmpeg-devel] ffmpeg MP4/H264 Help Please
Andrei Verovski aka MacGuru
andreil1
Sun Nov 5 12:45:20 CET 2006
Hi !
I have posted this question to ffmpeg-user list, but there seem to be very few
people. So I have decided to listen the truth from the originators of this
amazing piece of software. Sorry to bother you, guys, but the ffmpeg in-depth
information resources are really scarce.
Anyone can suggest me what is the best option to convert QuickTime MOVs, DVD
VOBs, and 1200-1900 kbps MP4 (too high rate for so small motion), containing
low-motion video with a lot of color images, so colors must be preserved to
reasonably highest-quality variable-rate MP4/H264, compatible with QuickTime
Player?
Since this is basically a screen capture, files can be really very small (but
as I said before, preserving right colors is absolutely important, because
this is capture of onscreen Photoshop work).
Digging in ffmpeg docs and net I found 2 possible solutions:
1) -----------------------
ffmpeg -y -i "$1" -v 1 -vcodec h264 -crf 21 -refs 5
-loop 1 -deblockalpha 0 -deblockbeta 0 -parti4x4 1 -partp8x8 1 -partb8x8 1
-me umh -subq 6 -brdo 1 -me_range 21 -chroma 1 -slice 2 -bf 1
-bframebias 1 -b_strategy 1 -g 250 -keyint_min 25 -sc_threshold 40
-rc_eq 'blurCplx^(1-qComp)' -qcomp 0.60 -qmin 7 -qmax 35
-acodec aac -ab 64 -ar 48000 -ac 2 "$1.ffmpeg.mp4"
There were additional options, but I had to remove them after ffmpeg upgrade.
# ffmpeg-0.4.9-7.pm.svn20060918 - removed options:
# -max_qdiff 4 -i_quant_factor 0.71428572 -b_quant_factor
0.76923078 -rc_max_rate 0 -rc_buffer_size 0
Result: QuickTime MOVs compressed 3-7 times, VOBs around 2.5 - 3 times,
quality is very good, although images went darker. Sometimes produces files
with too high data rate (1700 kbps).
2) --- VisualHub video converter for Mac, high-quality setting
ffmpeg -y ?-i $1 -s -vcodec h264 ?-g 300 ?-qmin 23 ?-
b 2304.0 ?-bf 1 ?-loop 1 -sc_threshold 40 -partp4x4 1 -rc_eq ?
'blurCplx^(1-qComp)' -refs 3 ? -async 50 ?-acodec aac ?-ar 48000 -ac ?
2 -ab 64"$1.ffmpeg.mp4"
Result: files much smaller than script #1, especially VOBs (4.7 GB DVD went to
only 450 MB), but data rate for some titles is suspiciosly small (150 kbps at
720x480 resoslution).
So, the questions are:
1) Which script is better to produce variable rate MP4/H264? Is "-crf 21" more
or less equal to "-qmin 23" in terms of qualaity? Visally it very hard to tell
the difference.
2) Is it necessary to deinterlace VOBs?
3) How to resample existing constant-rate MP4/H264 to variable-rate MP4/H264
without visual loss/degradation of color information? Can ffmpeg understand,
that it do not have to change format and convert video, just discard unwanted
frames.
Thanks in advance for any suggestion.
More information about the ffmpeg-devel
mailing list