cancel
Showing results for 
Search instead for 
Did you mean: 

Drivers & Software

dmit
Journeyman III

AMF encoding with FFMPEG

Hello,

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?

Thank you!

0 Likes
4 Replies

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?

0 Likes

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.

0 Likes

Handbrake has batch capability so its not so bad for smaller jobs

0 Likes
akravchenko188
Journeyman III

Hi,

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':

  Metadata:

    major_brand     : isom

    minor_version   : 512

    compatible_brands: isomiso2avc1mp41

    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)

    Metadata:

      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%

0 Likes