[FFmpeg-trac] #8713(ffmpeg:new): NVenc encodes broken? Now treble file size for exactly same commandline
FFmpeg
trac at avcodec.org
Fri Jun 5 16:14:21 EEST 2020
#8713: NVenc encodes broken? Now treble file size for exactly same commandline
-------------------------------------+-------------------------------------
Reporter: hydra3333 | Type: defect
Status: new | Priority: critical
Component: ffmpeg | Version: git-
Keywords: nvenc | master
nvidia | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
Something broke with NVenc h264 encoding, after commit
37140ebd87f549eae86a5b548d717a1e97203dd6.
With exactly the same comandlines, the file sizes are vastly different, as
shown below.
Examples of the commandlines and their very different file sizes are shown
below.
That is with nvidia driver version 445.87.
A later nvidia driver is available, 446.14, '''HOWEVER''' this only makes
it worse and the file sizes are even greater.
I will source the filesizes under 446.14 and post them in a comment under
this report.
How to reproduce:
I copied the parameters as they were used in the workflow, including the
audio processing, for completeness.
{{{
"ffmpeg.exe" -loglevel warning -init_hw_device opencl=ocl:0.0
-filter_hw_device ocl -i "D:\TEMP\VRDTVS-SCRATCH\01-test-
Channel2-HD.VRDTVS.qsf.mp4" -map_metadata -1 -vsync 0 -sws_flags
lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -filter_complex
"[0:v]yadif=0:0:0,hwupload,unsharp_opencl=lx=3:ly=3:la=0.5:cx=3:cy=3:ca=0.5,hwdownload,format=pix_fmts=yuv420p"
-strict experimental -c:v h264_nvenc -pix_fmt nv12 -preset slow -bf 2 -g
50 -rc:v vbr_hq -rc-lookahead:v 32 -cq 22 -qmin 16 -qmax 25 -coder 1
-movflags +faststart+write_colr -profile:v high -level 5.1 -af
loudnorm=I=-16:TP=0.0:LRA=11:measured_I=-25.67:measured_LRA=9.00:measured_TP=-5.70:measured_thresh=-36.57:offset=0.07:linear=true:print_format=summary
-c:a libfdk_aac -cutoff 18000 -ab 384k -ar 48000 -strict experimental
-movflags +faststart+write_colr -y "G:\HDTV\0-test-audio-sync-qsf5-vs-
qsf6\01-ffmpeg_nvenc_MY_HOME_ENCODE_latest_ffmpeg.mp4"
"ffmpeg-older-37140ebd87f549eae86a5b548d717a1e97203dd6.exe" -loglevel
warning -init_hw_device opencl=ocl:0.0 -filter_hw_device ocl -i "D:\TEMP
\VRDTVS-SCRATCH\01-test-Channel2-HD.VRDTVS.qsf.mp4" -map_metadata -1
-vsync 0 -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp
-filter_complex
"[0:v]yadif=0:0:0,hwupload,unsharp_opencl=lx=3:ly=3:la=0.5:cx=3:cy=3:ca=0.5,hwdownload,format=pix_fmts=yuv420p"
-strict experimental -c:v h264_nvenc -pix_fmt nv12 -preset slow -bf 2 -g
50 -rc:v vbr_hq -rc-lookahead:v 32 -cq 22 -qmin 16 -qmax 25 -coder 1
-movflags +faststart+write_colr -profile:v high -level 5.1 -af
loudnorm=I=-16:TP=0.0:LRA=11:measured_I=-25.67:measured_LRA=9.00:measured_TP=-5.70:measured_thresh=-36.57:offset=0.07:linear=true:print_format=summary
-c:a libfdk_aac -cutoff 18000 -ab 384k -ar 48000 -strict experimental
-movflags +faststart+write_colr -y "G:\HDTV\0-test-audio-sync-qsf5-vs-
qsf6\01-ffmpeg_nvenc_MY_HOME_ENCODE_ffmpeg_37140ebd87f549eae86a5b548d717a1e97203dd6.mp4"
05/06/2020 09:06 PM 5,072,015,090
01-ffmpeg_nvenc_MY_HOME_ENCODE_latest_ffmpeg.mp4
05/06/2020 09:15 PM 1,469,357,761
01-ffmpeg_nvenc_MY_HOME_ENCODE_ffmpeg_37140ebd87f549eae86a5b548d717a1e97203dd6.mp4
"ffmpeg.exe" -loglevel warning -init_hw_device opencl=ocl:0.0
-filter_hw_device ocl -i "D:\TEMP\VRDTVS-SCRATCH\02-test-
Channel44-SD.VRDTVS.qsf.mpg" -map_metadata -1 -vsync 0 -sws_flags
lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -filter_complex
"[0:v]yadif=0:0:0,hwupload,unsharp_opencl=lx=3:ly=3:la=0.5:cx=3:cy=3:ca=0.5,hwdownload,format=pix_fmts=yuv420p"
-strict experimental -c:v h264_nvenc -pix_fmt nv12 -preset slow -bf 2 -g
50 -rc:v vbr_hq -rc-lookahead:v 32 -cq 22 -qmin 16 -qmax 25 -coder 1
-movflags +faststart+write_colr -profile:v high -level 5.1 -af
loudnorm=I=-16:TP=0.0:LRA=11:measured_I=-27.86:measured_LRA=9.60:measured_TP=-8.37:measured_thresh=-38.36:offset=0.09:linear=true:print_format=summary
-c:a libfdk_aac -cutoff 18000 -ab 384k -ar 48000 -y "G:\HDTV\0-test-
audio-sync-qsf5-vs-qsf6\02-ffmpeg_MY_HOME_ENCODE_latest_ffmpeg.mp4"
"ffmpeg-older-37140ebd87f549eae86a5b548d717a1e97203dd6.exe" -loglevel
warning -init_hw_device opencl=ocl:0.0 -filter_hw_device ocl -i "D:\TEMP
\VRDTVS-SCRATCH\02-test-Channel44-SD.VRDTVS.qsf.mpg" -map_metadata -1
-vsync 0 -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp
-filter_complex
"[0:v]yadif=0:0:0,hwupload,unsharp_opencl=lx=3:ly=3:la=0.5:cx=3:cy=3:ca=0.5,hwdownload,format=pix_fmts=yuv420p"
-strict experimental -c:v h264_nvenc -pix_fmt nv12 -preset slow -bf 2 -g
50 -rc:v vbr_hq -rc-lookahead:v 32 -cq 22 -qmin 16 -qmax 25 -coder 1
-movflags +faststart+write_colr -profile:v high -level 5.1 -af
loudnorm=I=-16:TP=0.0:LRA=11:measured_I=-27.86:measured_LRA=9.60:measured_TP=-8.37:measured_thresh=-38.36:offset=0.09:linear=true:print_format=summary
-c:a libfdk_aac -cutoff 18000 -ab 384k -ar 48000 -y "G:\HDTV\0-test-
audio-sync-qsf5-vs-
qsf6\02-ffmpeg_MY_HOME_ENCODE_ffmpeg_37140ebd87f549eae86a5b548d717a1e97203dd6.mp4"
05/06/2020 09:25 PM 5,136,480,910
02-ffmpeg_MY_HOME_ENCODE_latest_ffmpeg.mp4
05/06/2020 09:35 PM 2,199,752,030
02-ffmpeg_MY_HOME_ENCODE_ffmpeg_37140ebd87f549eae86a5b548d717a1e97203dd6.mp4
"ffmpeg.exe" -loglevel warning -init_hw_device opencl=ocl:0.0
-filter_hw_device ocl -i "D:\TEMP\VRDTVS-SCRATCH\03-test-Channel9-HD-
Rock.VRDTVS.qsf.mp4" -map_metadata -1 -vsync 0 -sws_flags
lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -filter_complex
"[0:v]yadif=0:0:0,hwupload,unsharp_opencl=lx=3:ly=3:la=0.5:cx=3:cy=3:ca=0.5,hwdownload,format=pix_fmts=yuv420p"
-strict experimental -c:v h264_nvenc -pix_fmt nv12 -preset slow -bf 2 -g
50 -rc:v vbr_hq -rc-lookahead:v 32 -cq 22 -qmin 16 -qmax 25 -coder 1
-movflags +faststart+write_colr -profile:v high -level 5.1 -af
loudnorm=I=-16:TP=0.0:LRA=11:measured_I=-23.47:measured_LRA=8.70:measured_TP=-3.40:measured_thresh=-34.15:offset=0.52:linear=true:print_format=summary
-c:a libfdk_aac -cutoff 18000 -ab 384k -ar 48000 -strict experimental
-movflags +faststart+write_colr -y "G:\HDTV\0-test-audio-sync-qsf5-vs-
qsf6\03-ffmpeg_nvenc_MY_HOME_ENCODE_latest_ffmpeg.mp4"
"ffmpeg-older-37140ebd87f549eae86a5b548d717a1e97203dd6.exe" -loglevel
warning -init_hw_device opencl=ocl:0.0 -filter_hw_device ocl -i "D:\TEMP
\VRDTVS-SCRATCH\03-test-Channel9-HD-Rock.VRDTVS.qsf.mp4" -map_metadata -1
-vsync 0 -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp
-filter_complex
"[0:v]yadif=0:0:0,hwupload,unsharp_opencl=lx=3:ly=3:la=0.5:cx=3:cy=3:ca=0.5,hwdownload,format=pix_fmts=yuv420p"
-strict experimental -c:v h264_nvenc -pix_fmt nv12 -preset slow -bf 2 -g
50 -rc:v vbr_hq -rc-lookahead:v 32 -cq 22 -qmin 16 -qmax 25 -coder 1
-movflags +faststart+write_colr -profile:v high -level 5.1 -af
loudnorm=I=-16:TP=0.0:LRA=11:measured_I=-23.47:measured_LRA=8.70:measured_TP=-3.40:measured_thresh=-34.15:offset=0.52:linear=true:print_format=summary
-c:a libfdk_aac -cutoff 18000 -ab 384k -ar 48000 -strict experimental
-movflags +faststart+write_colr -y "G:\HDTV\0-test-audio-sync-qsf5-vs-
qsf6\03-ffmpeg_nvenc_MY_HOME_ENCODE_ffmpeg_37140ebd87f549eae86a5b548d717a1e97203dd6.mp4"
05/06/2020 09:53 PM 6,881,051,313
03-ffmpeg_nvenc_MY_HOME_ENCODE_latest_ffmpeg.mp4
05/06/2020 10:10 PM 2,100,748,069
03-ffmpeg_nvenc_MY_HOME_ENCODE_ffmpeg_37140ebd87f549eae86a5b548d717a1e97203dd6.mp4
"ffmpeg.exe" -version
ffmpeg version
git-2020-06-04-7f81785-Hydra3333/python_cross_compile_script_v100
Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 11.0.0 (GCC) 20200517 (experimental)
configuration: --arch=x86_64 --target-os=mingw64 --cross-
prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-
flags=--static --disable-shared --enable-static --disable-w32threads
--enable-pthreads --enable-cross-compile --target-exec=wine --enable-
runtime-cpudetect --enable-gpl --enable-version3 --extra-
version=Hydra3333/python_cross_compile_script_v100 --enable-pic --enable-
bzlib --enable-zlib --enable-lzma --enable-fontconfig --enable-
libfontconfig --enable-libfreetype --enable-libfribidi --enable-libbluray
--enable-libcdio --enable-avisynth --enable-vapoursynth --enable-librtmp
--enable-libcaca --enable-iconv --enable-libxml2 --enable-gmp --enable-
gnutls --enable-libzimg --enable-libx264 --enable-libx265 --enable-libvpx
--enable-libdav1d --enable-libaom --enable-libxvid --enable-gray --enable-
libopus --enable-libmp3lame --enable-libvorbis --enable-libtheora
--enable-libspeex --enable-libsoxr --enable-librubberband --enable-libass
--enable-libtesseract --enable-libwebp --enable-ffnvcodec --enable-cuvid
--enable-cuda-llvm --enable-opengl --enable-d3d11va --enable-nvenc
--enable-nvdec --enable-dxva2 --enable-libmfx --enable-amf --enable-opencl
--enable-opengl --enable-vulkan --enable-filter=scale_vulkan --enable-
filter=avgblur_vulkan --enable-filter=chromaber_vulkan --enable-
filter=overlay_vulkan --enable-libtwolame --enable-libzvbi --enable-libgsm
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-
amrwbenc --enable-libsnappy --enable-frei0r --enable-filter=frei0r
--enable-libsrt --enable-libbs2b --enable-libwavpack --enable-libilbc
--enable-libgme --enable-libflite --enable-sdl2 --enable-libopenmpt
--enable-libmysofa --enable-libvidstab --enable-libmodplug --disable-
schannel --extra-libs='-lpsapi -lintl -liconv -lssp' --extra-
cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-
cflags=-DLIBXML_STATIC --extra-cflags=-DGLIB_STATIC_COMPILATION --enable-
nonfree --enable-libfdk-aac --enable-decklink
--prefix=/home/u/Desktop/_working/workdir/win64_output/ffmpeg_git.installed
--disable-shared --enable-static
libavutil 56. 49.100 / 56. 49.100
libavcodec 58. 90.100 / 58. 90.100
libavformat 58. 44.100 / 58. 44.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 84.100 / 7. 84.100
libswscale 5. 6.101 / 5. 6.101
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
"ffmpeg-older-37140ebd87f549eae86a5b548d717a1e97203dd6.exe" -version
ffmpeg version
N-97933-g37140ebd87-Hydra3333/python_cross_compile_script_v100 Copyright
(c) 2000-2020 the FFmpeg developers
built with gcc 11.0.0 (GCC) 20200517 (experimental)
configuration: --arch=x86_64 --target-os=mingw64 --cross-
prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-
flags=--static --disable-shared --enable-static --disable-w32threads
--enable-pthreads --enable-cross-compile --target-exec=wine --enable-
runtime-cpudetect --enable-gpl --enable-version3 --extra-
version=Hydra3333/python_cross_compile_script_v100 --enable-pic --enable-
bzlib --enable-zlib --enable-lzma --enable-fontconfig --enable-
libfontconfig --enable-libfreetype --enable-libfribidi --enable-libbluray
--enable-libcdio --enable-avisynth --enable-vapoursynth --enable-librtmp
--enable-libcaca --enable-iconv --enable-libxml2 --enable-gmp --enable-
gnutls --enable-libzimg --enable-libx264 --enable-libx265 --enable-libvpx
--enable-libdav1d --enable-libaom --enable-libxvid --enable-gray --enable-
libopus --enable-libmp3lame --enable-libvorbis --enable-libtheora
--enable-libspeex --enable-libsoxr --enable-librubberband --enable-libass
--enable-libtesseract --enable-libwebp --enable-ffnvcodec --enable-cuvid
--enable-cuda-llvm --enable-opengl --enable-d3d11va --enable-nvenc
--enable-nvdec --enable-dxva2 --enable-libmfx --enable-amf --enable-opencl
--enable-opengl --enable-vulkan --enable-filter=scale_vulkan --enable-
filter=avgblur_vulkan --enable-filter=chromaber_vulkan --enable-
filter=overlay_vulkan --enable-libtwolame --enable-libzvbi --enable-libgsm
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-
amrwbenc --enable-libsnappy --enable-frei0r --enable-filter=frei0r
--enable-libsrt --enable-libbs2b --enable-libwavpack --enable-libilbc
--enable-libgme --enable-libflite --enable-sdl2 --enable-libopenmpt
--enable-libmysofa --enable-libvidstab --enable-libmodplug --disable-
schannel --extra-libs='-lpsapi -lintl -liconv -lssp' --extra-
cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-
cflags=-DLIBXML_STATIC --extra-cflags=-DGLIB_STATIC_COMPILATION --enable-
nonfree --enable-libfdk-aac --enable-decklink
--prefix=/home/u/Desktop/_working/workdir/win64_output/ffmpeg_git.installed
--disable-shared --enable-static
libavutil 56. 48.100 / 56. 48.100
libavcodec 58. 87.101 / 58. 87.101
libavformat 58. 43.100 / 58. 43.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 83.100 / 7. 83.100
libswscale 5. 6.101 / 5. 6.101
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8713>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list