Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
30th July 2019, 22:23 | #1 | Link |
Registered User
Join Date: Dec 2003
Posts: 253
|
translator needed: x264 to ffmpeg script
i've been using the scripting discussed here for a very long time:
https://forum.doom9.org/showthread.p...ighlight=babag i'd like to have the option to use ffmpeg now rather than x264 encoder as i use ffmpeg more anyway. i'm just not up to figuring this out. here is the scripting for x264: Code:
x264 --bluray-compat --bitrate 22000 --preset veryslow --tune film --weightp 0 / --bframes 3 --nal-hrd vbr --vbv-maxrate 40000 / --vbv-bufsize 30000 --level 4.1 --fps 24000/1001 / --keyint 24 --b-pyramid strict --slices 4 --aud / --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" / --sar 1:1 --ref 4 --qpmin 4 --pass 1 -o output_file.264 / input_16x9_ProResHQ.mov / && / x264 --bluray-compat --bitrate 22000 --preset veryslow / --tune film --weightp 0 --bframes 3 --nal-hrd vbr / --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 / --fps 24000/1001 --keyint 24 --b-pyramid strict --slices 4 / --aud --colorprim "bt709" --transfer "bt709" / --colormatrix "bt709" --sar 1:1 --ref 4 --qpmin 4 --pass 2 / -o output_file.264 input_16x9_ProResHQ.mov thanks very much, babag Last edited by BabaG; 30th July 2019 at 22:26. |
1st August 2019, 17:40 | #3 | Link | |
Registered User
Join Date: Dec 2003
Posts: 253
|
thanks, lypheo. i found this on the ffmpeg site:
Quote:
thanks again, babag |
|
1st August 2019, 18:00 | #4 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
I just googled it for you https://trac.ffmpeg.org/wiki/Encode/H.264
Code:
Example: ffmpeg -i input -c:v libx264 -preset slow -crf 22 -x264-params keyint=123:min-keyint=20 -c:a copy output.mkv Warning: Do not use the option x264opts, as it will eventually be removed. Use x264-params instead.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
1st August 2019, 18:22 | #5 | Link |
Registered User
Join Date: Dec 2003
Posts: 253
|
thanks, chaosking. that's actually the same page i got the warning quote from.
the script i originally posted produces a .264 file that loads into adobe encore directly without encore requiring transcoding. from everything i read online, that's something of a problem as many scripts produce files that encore wants to transcode. for that reason, i feel like i want to try to replicate the posted script, using ffmpeg, as directly as possible. still don't quite understand the process, though. getting the idea that using something like 'x264-params' followed by my x264 options separated by colons would be the process but haven't yet found direct examples of more than a couple of scenarios, none as complex as the above script. still looking. @chaosking are you suggesting, by posting the code in addition to the warning, that i should simply add all of my parameters, separated by colons, into the 'x264-params' part of that code? is that how it works? also, do i have it right that x264 has in some way been folded into ffmpeg now and it's that included x264 code that's being called with the 'x264-params' switch? thanks again, babag Last edited by BabaG; 1st August 2019 at 18:41. |
1st August 2019, 19:03 | #6 | Link |
Registered User
Join Date: Dec 2003
Posts: 253
|
ok, based on what i think i'm starting to see, here's a go at translating to ffmpeg:
Code:
ffmpeg -i input_16x9_ProResHQ.mov -c:v libx264 / -preset veryslow -crf 22 -x264-params bluray-compat: / bitrate 22000:preset veryslow:tune film:weightp 0: / bframes 3:nal-hrd vbr:vbv-maxrate 40000: / vbv-bufsize 30000:level 4.1:fps 24000/1001: / keyint 24:b-pyramid strict:slices 4:aud: / colorprim "bt709":transfer "bt709":colormatrix "bt709": / sar 1:1:ref 4:qpmin 4:pass 1 -o output_file.264 / && / ffmpeg -i input_16x9_ProResHQ.mov -c:v libx264 / -preset veryslow -crf 22 -x264-params bluray-compat: / bitrate 22000:preset veryslow:tune film:weightp 0: / bframes 3:nal-hrd vbr:vbv-maxrate 40000: / vbv-bufsize 30000:level 4.1:fps 24000/1001: / keyint 24:b-pyramid strict:slices 4:aud: / colorprim "bt709":transfer "bt709":colormatrix "bt709": / sar 1:1:ref 4:qpmin 4:pass 2 -o output_file.264 / also wondering if any of the x264 parameters should be moved to native ffmpeg switches as there are so many x264 parameters being called. guidance on that is appreciated. thanks for any corrections, babag Last edited by BabaG; 1st August 2019 at 19:12. |
2nd August 2019, 10:11 | #7 | Link |
brontosaurusrex
Join Date: Oct 2001
Posts: 2,392
|
you can also check the file itself.
Code:
mediainfo file.mp4 | grep -i encoding Encoding settings : cabac=1 / ref=5 / deblock=1:-1:-1 / analyse=0x3:0x113 / me=hex ...
__________________
certain other member Last edited by smok3; 2nd August 2019 at 10:14. |
Thread Tools | Search this Thread |
Display Modes | |
|
|