During these tests I stumbled over the fact that h264 can perform at amazing speeds - even in lossless mode!
Here are the results for SVT's "park joy" reference video (1080p50, yuv420) from Derf's collection:
With preset "ultrafast":
Code: Select all
$ ffmpeg -i park_joy_1080p50.y4m -y -threads 8 -an -g 1 -c:v libx264 -preset ultrafast -qp 0 h264-libx264.avi
To balance out the amazing encoding speed, it must be mentioned that the H.264-lossless file however is by far the largest (1.1 GiB), compared to Dirac (942 MiB), FFV1.3 (879 MiB) or JPEG2000-lossless (888 MiB).
Yet, the only comparable candidate regarding that speed was FFV1.3 (42 fps).
So I wanted to know how good H.264-lossless could compress to reach comparible speed/size ratio of FFV1.3.
According to the FFmpeg x264 FAQs, encoding h264 with preset "veryslow" should give the best results regarding size.
Well, the encoding speed was more in the range I expected: 9.2 fps, but still at 953 MiB.
Conclusion:
libx264 is able to encode losslessly at great speeds (75 fps), but doesn't compress as good as other lossless codecs. For HD material, it seems that FFV1 version 3 is currently still the only lossless codec which gets the best compression and can handle full HD faster than realtime (>40 fps).