[FFmpeg-trac] #7272(undetermined:new): encoding with hevc_amf results in video where forwarting is a mess
FFmpeg
trac at avcodec.org
Sat Jun 23 10:57:58 EEST 2018
#7272: encoding with hevc_amf results in video where forwarting is a mess
-------------------------------------+-------------------------------------
Reporter: sheepchen | Type: defect
Status: new | Priority: important
Component: | Version:
undetermined | unspecified
Keywords: hevc_amf | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Hi,
I recode videos on nvidia and AMD cards in x265.
The nvidia output is nice and ok (in example for ref). The AMD output
looks OK. But you can not fast forward in it. It uses 100% CPU and needs
minutes.
The funny thing is that for the nvidia compile I used an old version of
ffmpeg and for the amd I used the newest version.
Are there missing parameters by the AMD ffmpeg command or is it a bug with
compiling with hevc_amf?
EXAMPLETIME
-----------
For example I have cut a 3 minute video and compiled it both ways.
Original clip:
https://sheepchen.net/nextcloud/index.php/s/Nku5EUrTZ37BzAo
ENC NVIDIA (good):
https://sheepchen.net/nextcloud/index.php/s/RJCXZzsIJBOWVK7
ENC AMD (bad):
https://sheepchen.net/nextcloud/index.php/s/e61XOfrHxpghwwf
EXAMPLE NVIDIA:
>>\ffmpeg_20170827\bin\ffmpeg.exe -hwaccel cuvid -i "s:\temp\in_orig.mkv"
-c:v hevc_nvenc -profile:v main -rc vbr_hq -qmin 18 -qmax 24 -b:v 1000k
-maxrate 3000k -preset slow -rc-lookahead 32 -g 250 -c:a copy -c:s copy
-map 0 "s:\temp\out_nvidia.mkv"
ffmpeg version N-87095-gef0c6d9 Copyright (c) 2000-2017 the FFmpeg
developers
built with gcc 7.1.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-
cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264
--enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-
libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma
--enable-zlib
libavutil 55. 74.100 / 55. 74.100
libavcodec 57.103.101 / 57.103.101
libavformat 57. 78.100 / 57. 78.100
libavdevice 57. 8.100 / 57. 8.100
libavfilter 6.100.100 / 6.100.100
libswscale 4. 7.103 / 4. 7.103
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
Input #0, matroska,webm, from 's:\temp\in_orig.mkv':
Metadata:
ENCODER : Lavf57.71.100
Duration: 00:01:00.00, start: 0.080000, bitrate: 12347 kb/s
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive),
1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
Metadata:
DURATION : 00:01:00.000000000
Stream #0:1(ger): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
(default)
Metadata:
DURATION : 00:00:59.952000000
Stream #0:2: Audio: ac3, 48000 Hz, stereo, fltp, 448 kb/s (default)
Metadata:
DURATION : 00:00:59.952000000
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_nvenc))
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (copy)
Press [q] to stop, [?] for help
Output #0, matroska, to 's:\temp\out_nvidia.mkv':
Metadata:
encoder : Lavf57.78.100
Stream #0:0: Video: hevc (hevc_nvenc) (Main), yuv420p, 1920x1080 [SAR
1:1 DAR 16:9], q=18-24, 1000 kb/s, 25 fps, 1k tbn, 25 tbc (default)
Metadata:
DURATION : 00:01:00.000000000
encoder : Lavc57.103.101 hevc_nvenc
Side data:
cpb: bitrate max/min/avg: 3000000/0/1000000 buffer size: 2000000
vbv_delay: -1
Stream #0:1(ger): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo,
fltp, 192 kb/s (default)
Metadata:
DURATION : 00:00:59.952000000
Stream #0:2: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp,
448 kb/s (default)
Metadata:
DURATION : 00:00:59.952000000
%
EXAMPLE AMD:
>>\ffmpeg-20180619\bin\ffmpeg.exe -hwaccel dxva2 -i "s:\temp\in_orig.mkv"
-c:v hevc_amf -profile:v main -qmin 18 -qmax 24 -b:v 1000k -maxrate 3000k
-rc-lookahead 32 -g 250 -c:a copy -c:s copy -map 0 "s:\temp\out_amd.mkv"
ffmpeg version N-91330-ga990184007 Copyright (c) 2000-2018 the FFmpeg
developers
built with gcc 7.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--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
libavutil 56. 18.102 / 56. 18.102
libavcodec 58. 20.103 / 58. 20.103
libavformat 58. 17.100 / 58. 17.100
libavdevice 58. 4.101 / 58. 4.101
libavfilter 7. 25.100 / 7. 25.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
Input #0, matroska,webm, from 's:\temp\in_orig.mkv':
Metadata:
ENCODER : Lavf57.71.100
Duration: 00:01:00.00, start: 0.080000, bitrate: 12347 kb/s
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive),
1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
Metadata:
DURATION : 00:01:00.000000000
Stream #0:1(ger): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
(default)
Metadata:
DURATION : 00:00:59.952000000
Stream #0:2: Audio: ac3, 48000 Hz, stereo, fltp, 448 kb/s (default)
Metadata:
DURATION : 00:00:59.952000000
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_amf))
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (copy)
Press [q] to stop, [?] for help
Output #0, matroska, to 's:\temp\out_amd.mkv':
Metadata:
encoder : Lavf58.17.100
Stream #0:0: Video: hevc (hevc_amf), nv12, 1920x1080 [SAR 1:1 DAR
16:9], q=18-24, 1000 kb/s, 25 fps, 1k tbn, 25 tbc (default)
Metadata:
DURATION : 00:01:00.000000000
encoder : Lavc58.20.103 hevc_amf
Stream #0:1(ger): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo,
fltp, 192 kb/s (default)
Metadata:
DURATION : 00:00:59.952000000
Stream #0:2: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp,
448 kb/s (default)
Metadata:
DURATION : 00:00:59.952000000
%
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7272>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list