To compare to original, I am simply running:Īnd finally running a file compare between like frames from source to compresses/uncompressed. (I have tried some variations as well, such as "preset lossless" with no change) For libx265, which works but is slow:įfmpeg -i framed.bmp -r 30 -c:v libx265 -x265-params lossless=1 movie.mkvįor hevc_nvenc, which quickly creates a good looking file, but appears to not truly be lossless:įfmpeg -i framed.bmp -r 30 -c:v hevc_nvenc -preset 10 -an movie.mkv Using the h264_nvenc or hevc_nvenc encoders with the "lossless" preset is very fast, creates smaller files, and while the results look very good to the eye, when extracting frames to bmp's and comparing to source I can see they are not identical. I can prove they are truly lossless by exploding the resulting mkv to bmp's and then comparing to the original source. \input.mkv -c:v h264nvenc -profile:v high444p -pixelformat yuva444p16le -preset lossless -b:v 1M output. ffmpeg -hwaccel cuda -hwacceldevice 0 -hwacceloutputformat cuda -extrahwframes 14 -i. ![]() Using ffmpeg's libx264 or libx265 encoders with the "lossless" setting works fine, but naturally takes some time to encode. Then I tried to transcode a video in mkv format with encoding H.265 (hevc) into h.264 using h264nvenc. While working on a video conversion project, I've been storing some footage in lossless x264 and/or h264 encoded mkv files because they end up being about 10-15% smaller that storing frames as PNG's or using other lossless compression methods.
0 Comments
Leave a Reply. |