View Single Post
Old 17th September 2020, 06:54   #2  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,905
You're right, H.264 per se doesn't allow 50p/60p in BDs as they're not standard, so the only way to get 50fps or 60fps and still following the specs would be to keep them interlaced.
On the other hand, this isn't true with H.265 as everything that is aired with HEVC in PAL land is 50p. For instance, movies that were originally 23.976p are speeded up + pitch adjusted by 4% to 25p and then frames are duplicated to get 50p.
In other words, you're probably gonna have more luck in terms of compatibility with a 50p H.265 than you would with a 50p H.264.
As to deinterlacing it yourself or leaving it as it is, I gotta say that you're right in saying that deinterlacers have become better and better; as a matter of fact, TVs are so powerful now that not only generally deal with interlaced contents in a pretty good way by bobbing them up to 50p/60p, but they're even able to detect if a stream is 25p and only flagged as 25i (and they generally interpolate it up to 50p).
So, all in all, the decision is yours; me, personally, I wouldn't deinterlace them just yet as pretty much everything is now able to deal with those in a pretty good way, however if you do wanna use QTGMC and its cleaning/deflickering effects at the expense of re-encoding it (and thus making the lossy of the lossy), I would go with H.265 10bit and something that very broadly looks like:

Code:
ffmpeg.exe -i "AVS Script.avs" -pix_fmt yuv420p16le -strict -1 -an -f yuv4mpegpipe - | 
x265.exe --y4m - --dither --preset medium --level 5.0 --tune fastdecode --no-high-tier --ref 4 --profile main10 --crf 18 --deblock -1:-1 
--min-luma 64 --max-luma 940 --chromaloc 0 --range limited --videoformat component --colorprim bt709 --transfer bt709 --colormatrix bt709 
--overscan show --no-open-gop --min-keyint 1 --keyint 50 --repeat-headers --rd 3 --vbv-maxrate 25000 --vbv-bufsize 25000  --wpp -o "raw_video.hevc"
This should work, assuming that what you're feeding from Avisynth is a 50p 4:2:0 (regular, not type2) in BT709.
You could also go for a two pass approach specifying the bitrate instead of --crf if you want.

Otherwise, if you wanna convert it from Linear BT709 SDR to Linear BT2020 SDR with something like:

Code:
ConvertYUVtoXYZ()
ConvertXYZtoYUV(Color=1, pColor=2)
you're gonna have to specify something like:

Code:
ffmpeg.exe -i "AVS Script.avs" -pix_fmt yuv420p16le -strict -1 -an -f yuv4mpegpipe - | 
x265.exe --y4m - --dither --preset medium --level 5.0 --tune fastdecode --no-high-tier --ref 4 --profile main10 --crf 18 --deblock -1:-1 
--min-luma 64 --max-luma 940 --chromaloc 2 --range limited --videoformat component --colorprim bt2020 --transfer bt2020-10 --colormatrix bt2020nc 
--overscan show --no-open-gop --min-keyint 1 --keyint 50 --repeat-headers --rd 3 --vbv-maxrate 25000 --vbv-bufsize 25000  --wpp -o "raw_video.hevc"
Of course, this only covers the compatibility settings; there are tons of psychovisual optimization in x265 that can be used to get a better result and that I didn't mention since they were out of the scope of this topic. Besides, since your content is supposed to be "future proof" I would say that you won't need --tune fastdecode as the hardware of the future is gonna be able to decode it anyway (I included it only 'cause you asked for the very best compatibility with everything). So... yeah, that's pretty much it about compatibility, I think. Don't go over --ref 4, set your keyint to 50, respect the level parameters, avoid open GOPs and include --repeat-headers. Other than that, you're good to go with the very maximum compatibility you can get for a 50p content and you can start adding other options to improve quality.


Cheers,
Frank

Last edited by FranceBB; 17th September 2020 at 07:00.
FranceBB is offline   Reply With Quote