I tried to encode video files using FFMPEG built with AMF support and found some unexpected behavior.
I tried to get maximum quality with an encoded bitrate limit. Some videos are encoded pretty nice, but some are encoded with bitrate too much over limit. For example, the desired 8M bitrate encoded as 98M.
The command line used is
ffmpeg.exe -i input.y4m -c:v hevc_amf -quality quality -usage transcoding -b:v 8M -bufsize 16M -maxrate 12M output.hevc
Tried many other parameters but none of them get encoded bitrate to the limits.
Driver version: 18.Q1.1-March22
Board: Vega Frontier Edition
Could you suggest what can be wrong?
I have seen problems occasionally with FFMPEG and I use it to transcode video a alot
I have seen problems with HEVC so I am wondering if there is an updated version available yet
maybe handbrake is more capable?
Handbrake is good one, but it's not so powerful as FFMPEG. I need batch transcoding, multiple filters, etc. If I encode the same video using libx265 - it works perfect but slow. The issue is definitely not in HEVC itself, but in using/tuning FFMPEG AMF parameters.
could you provide the following information?
1) FFmpeg version
2) could you share stream you are trying to encode?
3) FFmpeg output after encoding like:
Output #0, hevc, to 'video.mp4.issue1.hevc':
major_brand : isom
minor_version : 512
encoder : Lavf58.12.100
Stream #0:0(und): Video: hevc (hevc_amf), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 8000 kb/s, 60 fps, 60 tbn, 60 tbc (default)
handler_name : VideoHandler
encoder : Lavc58.18.100 hevc_amf
frame= 9780 fps=199 q=-0.0 Lsize= 159000kB time=00:02:43.00 bitrate=7991.0kbits/s speed=3.32x
video:159000kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%