[x264-devel] Optimized multiple rendition encoding
Eran Kornblau
eran.kornblau at kaltura.com
Thu Dec 1 08:10:56 CET 2016
>
> -----Original Message-----
> From: x264-devel [mailto:x264-devel-bounces at videolan.org] On Behalf Of BugMaster
> Sent: Saturday, November 12, 2016 10:36 AM
> To: Mailing list for x264 developers <x264-devel at videolan.org>
> Subject: Re: [x264-devel] Optimized multiple rendition encoding
>
> If you currently use 1-pass ABR for your encodings you still can use this method. Only difference would be that you would use result of 1-st pass (which should be done with `--pass 1 --slow-firstpass`) as end result for this bitrate. This way you will make same number of passes (bitrates) as you currently do and N-1 of them wouldn't need lookahead (slicetype decisions, AQ, MBTree) at the little cost of IO (writting/reading stats-files) and probably would have better quality then simple 1-pass ABR for all.
>
Hi BugMaster,
We ran a simple test before we implement this solution - we took some test video and encoded it once with one pass, and once with two pass.
The second pass of the two pass transcode took exactly the same time as the one pass transcode, we did not see any performance gain.
I'm pasting the full ffmpeg command lines below, please let me know if we missed anything.
In addition, we tried to use the log file of the first pass to transcode a different rendition (different frame size + bitrate) and it didn't work,
we got this error -
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
One last question - is there some documentation about the structure of the pass log file ?
Thank you,
Eran
Single pass
ffmpeg -threads 1 -i /web//content/r71v1/entry/data/626/96/1_ggai8rmh_1_ikbva2qt_11.mov -c:v libx264 -subq 7 -qcomp 0.6 -qmin 10 -qmax 50 -qdiff 4 -bf 16 -coder 1 -refs 6 -x264opts b-pyramid:weightb:mixed-refs:8x8dct:no-fast-pskip=0:stitchable -vprofile high -pix_fmt yuv420p -b:v 4000k -s 1920x800 -r 24 -g 48 -aspect 1920:800 -c:a libfdk_aac -filter_complex 'aresample=async=1:min_hard_comp=0.100000:first_pts=0' -b:a 128k -ar 44100 -ac 2 -map_chapters -1 -map_metadata -1 -f mp4 -flags +loop+mv4 -cmp 256 -partitions +parti4x4+partp8x8+partb8x8 -trellis 1 -refs 6 -me_range 16 -keyint_min 1 -sc_threshold 80 -i_qfactor 0.71 -bt 1200k -maxrate 4000k -bufsize 8000k -rc_eq 'blurCplx^(1-qComp)' -me_method umh -subq 9 -vsync 1 -threads 4 -y /tmp/tmp_convert_583f1e999d36d_1pass
Two pass
ffmpeg -threads 1 -i /web//content/r71v1/entry/data/626/96/1_ggai8rmh_1_ikbva2qt_11.mov -c:v libx264 -subq 7 -qcomp 0.6 -qmin 10 -qmax 50 -qdiff 4 -bf 16 -coder 1 -refs 6 -x264opts b-pyramid:weightb:mixed-refs:8x8dct:no-fast-pskip=0:stitchable -vprofile high -pix_fmt yuv420p -b:v 4000k -s 1920x800 -r 24 -g 48 -aspect 1920:800 -c:a libfdk_aac -filter_complex 'aresample=async=1:min_hard_comp=0.100000:first_pts=0' -b:a 128k -ar 44100 -ac 2 -map_chapters -1 -map_metadata -1 -f mp4 -flags +loop+mv4 -cmp 256 -partitions +parti4x4+partp8x8+partb8x8 -trellis 1 -refs 6 -me_range 16 -keyint_min 1 -sc_threshold 80 -i_qfactor 0.71 -bt 1200k -maxrate 4000k -bufsize 8000k -rc_eq 'blurCplx^(1-qComp)' -me_method umh -subq 9 -vsync 1 -threads 4 -an -passlogfile /tmp/tmp_convert_583f1e999d36d.2pass.log -pass 1 -fastfirstpass 1 -y /dev/null
ffmpeg -threads 1 -i /web//content/r71v1/entry/data/626/96/1_ggai8rmh_1_ikbva2qt_11.mov -c:v libx264 -subq 7 -qcomp 0.6 -qmin 10 -qmax 50 -qdiff 4 -bf 16 -coder 1 -refs 6 -x264opts b-pyramid:weightb:mixed-refs:8x8dct:no-fast-pskip=0:stitchable -vprofile high -pix_fmt yuv420p -b:v 4000k -s 1920x800 -r 24 -g 48 -aspect 1920:800 -c:a libfdk_aac -filter_complex 'aresample=async=1:min_hard_comp=0.100000:first_pts=0' -b:a 128k -ar 44100 -ac 2 -map_chapters -1 -map_metadata -1 -f mp4 -flags +loop+mv4 -cmp 256 -partitions +parti4x4+partp8x8+partb8x8 -trellis 1 -refs 6 -me_range 16 -keyint_min 1 -sc_threshold 80 -i_qfactor 0.71 -bt 1200k -maxrate 4000k -bufsize 8000k -rc_eq 'blurCplx^(1-qComp)' -me_method umh -subq 9 -vsync 1 -threads 4 -passlogfile /tmp/tmp_convert_583f1e999d36d.2pass.log -pass 2 -y /tmp/tmp_convert_583f1e999d36d_2pass
>
>
More information about the x264-devel
mailing list