0

For a while I have been using a build of ffmpeg from 2019:

ffmpeg version N-94150-g231d0c819f Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190621
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil      56. 30.100 / 56. 30.100
libavcodec     58. 53.101 / 58. 53.101
libavformat    58. 28.101 / 58. 28.101
libavdevice    58.  7.100 / 58.  7.100
libavfilter     7. 55.100 /  7. 55.100
libswscale      5.  4.101 /  5.  4.101
libswresample   3.  4.100 /  3.  4.100
libpostproc    55.  4.100 / 55.  4.100

I recently tried out this version:

ffmpeg version 2021-07-14-git-ca56299fb3-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.3.0 (Rev2, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil      57.  0.100 / 57.  0.100
libavcodec     59.  3.101 / 59.  3.101
libavformat    59.  4.100 / 59.  4.100
libavdevice    59.  0.100 / 59.  0.100
libavfilter     8.  0.103 /  8.  0.103
libswscale      6.  0.100 /  6.  0.100
libswresample   4.  0.100 /  4.  0.100
libpostproc    56.  0.100 / 56.  0.100

I decided to compare the output files I get when using each version of ffempg above:

ffmpeg -i inpath -y -c:v libx264 -x264-params "nal-hrd=cbr" -b:v 120M -minrate 120M -maxrate 120M -bufsize 2M -pix_fmt yuv420p out.mov

They look visually similar and are only a few bytes different in file size. However, the binaries are not identical and the compression isn't the same. For example, here is the pixelwise difference between the output .mov files from each version of ffmpeg using the same input file (with the brightness increased for visibility of the artifacts):

enter image description here

Looking at the difference in the header of the file binaries, I see this:

enter image description here

(this is not the only difference between the files, just in the header)

Apparently the older version is using "core 157" while the newer version is using "core 164." I can't find any information about these when I search them online. What is difference between these two codecs? Why aren't the artifacts identical given the input file and the settings are the same?

6
  • It's the same encoder - the version has been upgraded. There have been a few bug fixes and assembly optimizations.
    – Gyan
    Jul 20, 2021 at 4:22
  • If they are just optimizations and bug fixes, why does that affect the artifacts? Shouldn't they be the same? Or do the optimizations affect the the way it is encoded? Jul 21, 2021 at 2:59
  • Yes, bug fixes which alter the result of certain computations will alter the final result.
    – Gyan
    Jul 21, 2021 at 4:11
  • Use strings or mediainfo to extract the x264 version/config-options string. As for pixel differences, the default is --deterministic so different runs of the same version should be the same (not dependent on thread scheduling). But across different versions, the encoding choices it makes could differ due to a different order of looking at frames or something. Your binary diff shows no difference in config options for the default "medium" preset you were using ('slow' changed somewhat recently from me=umh to trellis=2 as the thing that's different from 'medium'.) Oct 11, 2023 at 21:27
  • x264 is open source, if you really want to dig in, see forum.doom9.org/showthread.php?t=168378 and the git repository: code.videolan.org/videolan/x264/-/commits/master I didn't find any good summary changelogs when googling (not since about 2013 when it was still reaching maturity), so there's just the commit history of every detailed change. Oct 11, 2023 at 21:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.