My input is an uncompressed video captured from old Hi8 cassettes, mediainfo:
Format : RGB Codec ID : V_UNCOMPRESSED Codec ID/Info : Raw uncompressed video frames Duration : 1 h 32 min Width : 720 pixels Height : 576 pixels Display aspect ratio : 5:4 Frame rate mode : Constant Frame rate : 25.000 FPS Standard : PAL
I have looked at the sources I could find and tried to come up with the optimal settings for my encoding needs, while also trying out a few dozen combinations, and the best I could come up with looks like this:
ffmpeg -i in.mkv -vf yadif -c:v hevc_nvenc -preset slow -rc:v vbr_hq -cq:v 19 -b:v 2m -maxrate:v 3m -bufsize:v 1m -c:a copy out.mp4
The output's mediainfo is:
Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Format Range@L3@Main Codec ID : hev1 Codec ID/Info : High Efficiency Video Coding Duration : 20 s 0 ms Bit rate : 5 142 kb/s Width : 720 pixels Height : 576 pixels Display aspect ratio : 5:4 Frame rate mode : Constant Frame rate : 25.000 FPS Standard : PAL Chroma subsampling : 4:4:4 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.496 Stream size : 12.3 MiB (97%) Codec configuration box : hvcC
What I have found is that I can increase the
-b:v 2m -maxrate:v 3m -bufsize:v 1m options tenfold, and the output still stays the same. How can this be the case? I am thinking I messed up the settings gravely, in this case, could you please correct me and set me to the right ballpark? First I tried without the bitrate options and only
-rc:v vbr_hq -cq:v 19, but that resulted in terrible quality and smaller size, and then I found that I need to set the bitrate as well, unlike just the
-crf like I used to do with
-preset slow also doesn't change the result.
I have also tried
libx265, which I have used beforehand, but that's a 10-20x speed decrease, so I wouldn't want to use it for this 15+ hour project. One thing I see is that with that the chroma subsamplig is
4:2:2, instead of
4:4:4. Setting it to
4:2:0 actually increases the file size, what should I do with this?
Thank you in advance for any help, and please let me know if I should give more information in order to get the help I need.