Navi 10 (Rx5600xt) FFMPEG OpenCL/Vaapi Pop-os 20.04 LTS not functioning correctly/ Halting on openCL initialize

Hey Everyone!

A bit of a weird one on my hands. I’m in the process of getting a special build of FFmpeg going to accelerate HDR->SDR tone-mapping of HEVC content. I can do it all in software as of now, but (to the surprise of nobody) it isn’t exactly realtime performance, even with 24 threads.

As such, I’m trying to implement the same sort of thing using an rx 5600xt as an accelerator card. both VA-API and OpenCL support versions of the transforms I’m looking to use, so unless there’s a massive performance difference, I’m not overly bothered about which one to use.

I’ve listed a lot of details/steps I’ve already tried below, am open to any and all suggestions!

As of now that would mean 3 options for HWacceleration configuration:

  1. AMD’s AMF decoder/encoder. Unfortunately little to no linux support whatsoever, tho I am following the github issues to see if/when that changes.
  2. VA-API. Well supported and reasonably well documented, this is my first choice if I can get it working.
  3. OpenCL. VERY well documented but not included in the open source amdgpu driver, you can perform a “hack” using the amdgpu-pro package topotentially install the OpenCL libraries with support for Navi-10

When I run vainfo I get: error: can't connect to X server! error: failed to initialize display

Where it get’s very weird is that, when running journalctl -b | grep -iE 'vdpau | dri driver' it returns

Sep 19 19:19:49 felix-server /usr/lib/gdm3/gdm-x-session[1764]: (II) AMDGPU(0): [DRI2] DRI driver : radeonsi

Sep 19 19:19:49 felix-server /usr/lib/gdm3/gdm-x-session[1764]: (II) AMDGPU(0): [DRI2] VDPAU driver: radeonsi

Indicating what I think is that the radeon driver has flagged that the system is capable of VA-API support.

When Trying to run clinfo it initially returned:

clinfo
Number of platforms 0

Trying to trouble shoot I found this guide on the blender forums for enabling OpenCL by only using a portion of the AMDGPUPro drivers- with documented success of openCL working on popos 20.04 LTS, tho in their case it was with an RX580.

After having used that “Hack” and then running clinfo, I received:

Number of platforms 1
Platform Name AMD Accelerated Parallel Processing
Platform Vendor Advanced Micro Devices, Inc.
Platform Version OpenCL 2.1 AMD-APP (3143.9)
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_amd_event_callback cl_amd_offline_devices
Platform Host timer resolution 1ns
Platform Extensions function suffix AMD

Platform Name AMD Accelerated Parallel Processing
Number of devices 0

NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, …) No platform
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, …) No platform
clCreateContext(NULL, …) [default] No platform
clCreateContext(NULL, …) [other] No platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) No devices found in platform

Unfortunately it now seems that the OpenCL packages are installed and recognized, but are not grabbing the GPU as an eligible device.

in terms of platform, here’s the output of uname -a followed by lshw -short inside of the summery tab

Linux felix-server 5.4.44-2-pve-navipatch-pcrmrrpatch #1 SMP PVE 5.4.44-2 (Wed, 01 Jul 2020 16:37:57 +0200) x86_64 x86_64 x86_64 GNU/Linux

Summary

H/W path Device Class Description

                                   system         ProLiant ML350 G6 (600425-005)

/0 bus Motherboard
/0/0 memory 64KiB BIOS
/0/400 processor Intel® Xeon® CPU X5670 @ 2.93GHz
/0/400/710 memory 192KiB L1 cache
/0/400/720 memory 1536KiB L2 cache
/0/400/730 memory 12MiB L3 cache
/0/406 processor Intel® Xeon® CPU X5670 @ 2.93GHz
/0/406/716 memory 192KiB L1 cache
/0/406/726 memory 1536KiB L2 cache
/0/406/736 memory 12MiB L3 cache
/0/1000 memory 144GiB System Memory
/0/1000/0 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/1 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/2 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/3 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/4 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/5 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/6 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/7 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/8 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/9 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/a memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/b memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/c memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/d memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/e memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/f memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/10 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/1000/11 memory 8GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/100 bridge 5520 I/O Hub to ESI Port
/0/100/1 bridge 5520/5500/X58 I/O Hub PCI Express Root Port 1
/0/100/2 bridge 5520/5500/X58 I/O Hub PCI Express Root Port 2
/0/100/3 bridge 5520/5500/X58 I/O Hub PCI Express Root Port 3
/0/100/3/0 scsi4 storage SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon]
/0/100/3/0/0.0.0 /dev/sdb disk 3TB WDC WD30EFRX-68E
/0/100/3/0/0.0.0/1 /dev/sdb1 volume 2047MiB swap partition
/0/100/3/0/0.0.0/2 /dev/sdb2 volume 2792GiB ZFS partition
/0/100/3/0/0.1.0 /dev/sdc disk 3TB WDC WD30EFRX-68E
/0/100/3/0/0.1.0/1 /dev/sdc1 volume 2047MiB swap partition
/0/100/3/0/0.1.0/2 /dev/sdc2 volume 2792GiB ZFS partition
/0/100/3/0/0.2.0 /dev/sdd disk 3TB WDC WD30EFRX-68E
/0/100/3/0/0.2.0/1 /dev/sdd1 volume 2047MiB swap partition
/0/100/3/0/0.2.0/2 /dev/sdd2 volume 2792GiB ZFS partition
/0/100/3/0/0.3.0 /dev/sde disk 10TB ST10000DM0004-1Z
/0/100/3/0/0.3.0/1 /dev/sde1 volume 2047MiB swap partition
/0/100/3/0/0.3.0/2 /dev/sde2 volume 9311GiB ZFS partition
/0/100/3/0/0.4.0 /dev/sdf disk 10TB ST10000DM0004-1Z
/0/100/3/0/0.4.0/1 /dev/sdf1 volume 2047MiB swap partition
/0/100/3/0/0.4.0/2 /dev/sdf2 volume 9311GiB ZFS partition
/0/100/3/0/0.5.0 /dev/sdg disk 10TB ST10000DM0004-1Z
/0/100/3/0/0.5.0/1 /dev/sdg1 volume 2047MiB swap partition
/0/100/3/0/0.5.0/2 /dev/sdg2 volume 9311GiB ZFS partition
/0/100/4 bridge 5520/X58 I/O Hub PCI Express Root Port 4
/0/100/5 bridge 5520/X58 I/O Hub PCI Express Root Port 5
/0/100/5/0 bridge Navi 10 XL Upstream Port of PCI Express Switch
/0/100/5/0/0 /dev/fb0 bridge Navi 10 XL Downstream Port of PCI Express Switch
/0/100/5/0/0/0 display Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT]
/0/100/5/0/0/0.1 multimedia Navi 10 HDMI Audio
/0/100/6 bridge 5520/X58 I/O Hub PCI Express Root Port 6
/0/100/7 bridge 5520/5500/X58 I/O Hub PCI Express Root Port 7
/0/100/8 bridge 5520/5500/X58 I/O Hub PCI Express Root Port 8
/0/100/9 bridge 7500/5520/5500/X58 I/O Hub PCI Express Root Port 9
/0/100/a bridge 7500/5520/5500/X58 I/O Hub PCI Express Root Port 10
/0/100/a/0 storage Silicon Motion, Inc.
/0/100/14 generic 7500/5520/5500/X58 I/O Hub System Management Registers
/0/100/14.1 generic 7500/5520/5500/X58 I/O Hub GPIO and Scratch Pad Registers
/0/100/14.2 generic 7500/5520/5500/X58 I/O Hub Control Status and RAS Registers
/0/100/1c bridge 82801JI (ICH10 Family) PCI Express Root Port 1
/0/100/1c/0 bridge EPB PCI-Express to PCI-X Bridge
/0/100/1c/0/4 enp3s4f0 network NetXtreme BCM5715 Gigabit Ethernet
/0/100/1c/0/4.1 enp3s4f1 network NetXtreme BCM5715 Gigabit Ethernet
/0/100/1d bus 82801JI (ICH10 Family) USB UHCI Controller #1
/0/100/1d/1 usb2 bus UHCI Host Controller
/0/100/1d/1/2 input Virtual Keyboard
/0/100/1d.1 bus 82801JI (ICH10 Family) USB UHCI Controller #2
/0/100/1d.1/1 usb3 bus UHCI Host Controller
/0/100/1d.2 bus 82801JI (ICH10 Family) USB UHCI Controller #3
/0/100/1d.2/1 usb4 bus UHCI Host Controller
/0/100/1d.3 bus 82801JI (ICH10 Family) USB UHCI Controller #6
/0/100/1d.3/1 usb5 bus UHCI Host Controller
/0/100/1d.3/1/1 bus Generic USB Hub
/0/100/1d.3/1/1/1 input Dell MS116 USB Optical Mouse
/0/100/1d.3/1/1/4 input G513 Carbon GX Blue
/0/100/1d.7 bus 82801JI (ICH10 Family) USB2 EHCI Controller #1
/0/100/1d.7/1 usb1 bus EHCI Host Controller
/0/100/1d.7/1/1 scsi5 storage Mass Storage Device
/0/100/1d.7/1/1/0.0.0 /dev/sdh disk 3963MB Flash Reader
/0/100/1d.7/1/1/0.0.0/0 /dev/sdh disk 3963MB
/0/100/1d.7/1/1/0.0.0/0/1 /dev/sdh1 volume 2047MiB swap partition
/0/100/1d.7/1/1/0.0.0/0/2 /dev/sdh2 volume 1731MiB ZFS partition
/0/100/1e bridge 82801 PCI Bridge
/0/100/1e/3 display ES1000
/0/100/1e/4 generic Integrated Lights Out Controller
/0/100/1e/4.2 generic Integrated Lights Out Processor
/0/100/1e/4.4 bus Integrated Lights-Out Standard Virtual USB Controller
/0/100/1e/4.4/1 usb6 bus UHCI Host Controller
/0/100/1e/4.6 bus Integrated Lights-Out Standard KCS Interface
/0/100/1f bridge 82801JIB (ICH10) LPC Interface Controller
/0/100/1f.2 scsi1 storage 82801JI (ICH10 Family) 4 port SATA IDE Controller #1
/0/100/1f.2/0.1.0 /dev/sda disk 128GB HP SSD S700 Pro
/0/100/1f.2/0.1.0/1 /dev/sda1 volume 497MiB EXT4 volume
/0/100/1f.2/0.1.0/2 /dev/sda2 volume 114GiB EXT4 volume
/0/100/1f.2/0.1.0/3 /dev/sda3 volume 4095MiB Linux swap volume
/0/100/1f.5 storage 82801JI (ICH10 Family) 2 port SATA IDE Controller #2
/0/101 bridge Intel Corporation
/0/102 bridge Intel Corporation
/0/103 bridge Intel Corporation
/0/104 bridge Intel Corporation
/0/105 bridge 7500/5520/5500/X58 Physical Layer Port 0
/0/106 bridge 7500/5520/5500 Physical Layer Port 1
/0/107 bridge Intel Corporation
/0/108 bridge Intel Corporation
/0/109 bridge Intel Corporation
/0/10a bridge Intel Corporation
/0/10b bridge Intel Corporation
/0/10c bridge Intel Corporation
/0/10d bridge Xeon 5600 Series QuickPath Architecture Generic Non-core Registers
/0/10e bridge Xeon 5600 Series QuickPath Architecture System Address Decoder
/0/10f bridge Xeon 5600 Series QPI Link 0
/0/110 bridge Xeon 5600 Series QPI Physical 0
/0/111 bridge Xeon 5600 Series Mirror Port Link 0
/0/112 bridge Xeon 5600 Series Mirror Port Link 1
/0/113 bridge Xeon 5600 Series QPI Link 1
/0/114 bridge Xeon 5600 Series QPI Physical 1
/0/115 bridge Xeon 5600 Series Integrated Memory Controller Registers
/0/116 bridge Xeon 5600 Series Integrated Memory Controller Target Address Decoder
/0/117 bridge Xeon 5600 Series Integrated Memory Controller RAS Registers
/0/118 bridge Xeon 5600 Series Integrated Memory Controller Test Registers
/0/119 bridge Xeon 5600 Series Integrated Memory Controller Channel 0 Control
/0/11a bridge Xeon 5600 Series Integrated Memory Controller Channel 0 Address
/0/11b bridge Xeon 5600 Series Integrated Memory Controller Channel 0 Rank
/0/11c bridge Xeon 5600 Series Integrated Memory Controller Channel 0 Thermal Control
/0/11d bridge Xeon 5600 Series Integrated Memory Controller Channel 1 Control
/0/11e bridge Xeon 5600 Series Integrated Memory Controller Channel 1 Address
/0/11f bridge Xeon 5600 Series Integrated Memory Controller Channel 1 Rank
/0/120 bridge Xeon 5600 Series Integrated Memory Controller Channel 1 Thermal Control
/0/121 bridge Xeon 5600 Series Integrated Memory Controller Channel 2 Control
/0/122 bridge Xeon 5600 Series Integrated Memory Controller Channel 2 Address
/0/123 bridge Xeon 5600 Series Integrated Memory Controller Channel 2 Rank
/0/124 bridge Xeon 5600 Series Integrated Memory Controller Channel 2 Thermal Control
/0/125 bridge Xeon 5600 Series QuickPath Architecture Generic Non-core Registers
/0/126 bridge Xeon 5600 Series QuickPath Architecture System Address Decoder
/0/127 bridge Xeon 5600 Series QPI Link 0
/0/128 bridge Xeon 5600 Series QPI Physical 0
/0/129 bridge Xeon 5600 Series Mirror Port Link 0
/0/12a bridge Xeon 5600 Series Mirror Port Link 1
/0/12b bridge Xeon 5600 Series QPI Link 1
/0/12c bridge Xeon 5600 Series QPI Physical 1
/0/12d bridge Xeon 5600 Series Integrated Memory Controller Registers
/0/12e bridge Xeon 5600 Series Integrated Memory Controller Target Address Decoder
/0/12f bridge Xeon 5600 Series Integrated Memory Controller RAS Registers
/0/130 bridge Xeon 5600 Series Integrated Memory Controller Test Registers
/0/131 bridge Xeon 5600 Series Integrated Memory Controller Channel 0 Control
/0/132 bridge Xeon 5600 Series Integrated Memory Controller Channel 0 Address
/0/133 bridge Xeon 5600 Series Integrated Memory Controller Channel 0 Rank
/0/134 bridge Xeon 5600 Series Integrated Memory Controller Channel 0 Thermal Control
/0/135 bridge Xeon 5600 Series Integrated Memory Controller Channel 1 Control
/0/136 bridge Xeon 5600 Series Integrated Memory Controller Channel 1 Address
/0/137 bridge Xeon 5600 Series Integrated Memory Controller Channel 1 Rank
/0/138 bridge Xeon 5600 Series Integrated Memory Controller Channel 1 Thermal Control
/0/139 bridge Xeon 5600 Series Integrated Memory Controller Channel 2 Control
/0/13a bridge Xeon 5600 Series Integrated Memory Controller Channel 2 Address
/0/13b bridge Xeon 5600 Series Integrated Memory Controller Channel 2 Rank
/0/13c bridge Xeon 5600 Series Integrated Memory Controller Channel 2 Thermal Control
/0/1 system PnP device PNP0c02
/0/2 input PnP device PNP0303
/0/3 input PnP device PNP0f13
/0/4 communication PnP device PNP0501
/0/5 system PnP device PNP0b00
/1 power 512327-B21
/2 power 512327-B21
/3 virbr0 network Ethernet interface
/4 virbr0-nic network Ethernet interface
/5 br1 network Ethernet interface
/6 virbr1-nic network Ethernet interface
/7 virbr1 network Ethernet interface
/8 br0 network Ethernet interface

Two things.
Are you running xorg or wayland as your display server?
With Navi, you need to be on the 5.6/5.7 kernel at the very least to use features of this card natively. If you run the AMDGPU Pro driver, you may be able to get this to work, but that method is not recommended. It seems that the hack that you used puts you running a hybrid stack.

VAA and AMF should take care of what you need me thinks.

TLDR; with all the video metadata removed vaapi no longer complains, but ffmpeg can no longer parse the file. So I think that if we can figure out what exact metadata needs to be changed, that will crack this puzzle! Any idea which metadata fields would need to be changed/removed for a file to not be considered HDR?

Currently running x11 (confirmed via loginctl show-session $(awk '/tty/ {print $1}' <(loginctl)) -p Type | awk -F= '{print $2}' )

I managed to get open CL installed using the newest version of the standard driver- thankfully without the hybrid graphics stack. (output of clinfo at the bottom.)

VAAPI is also detected now, but unfortunately I’ve hit the next snag.

When I try and use any opencl filter ffmpeg just locks up completely without doing anything (even if I only do a HWupload/hwdownload without invoking any features).

ffmpeg -loglevel verbose -init_hw_device opencl=gpu -threads 12 -filter_hw_device gpu -i input.mp4 -vf "format=p010,hwupload,hwdownload,format=p010" output.mp4

Returns :
[AVHWDeviceContext @ 0x555fb18689c0] 0.0: AMD Accelerated Parallel Processing / gfx1010
Then just’s sits there until I kill the process/ hit ctrl-c. I’ve had it run for over an hour to see if it’s just taking a really long time to initialize, but with only a 30 second file that doesn’t seem reasonable

Trying to get the tonemping working using VAAPI instead. Sample of the command is:
ffmpeg -loglevel verbose -init_hw_device vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p10 -i input.mp4 -vf "zscale=t=linear,format=gbrpf32le,zscale=p=bt709,format=p010,hwupload,tonemap_vaapi=format=p010:t=bt2020-10,hwdownload,format=p010" output.mp4

Note: the reason for using the zscale conversions has to do with attemting to “trick” VAAPI into not realizing it’s working on HDR material. Not sure if it’s a flag that get’s set up an initialazation off the FFMPEG filters. To try another way of getting around the HDR NOT SUPPORTED issue, I added
-map_metadata -1

but unfortunately the HDR not supported flag was still triggered.

Returns:

VAAPI OUTPUT
[graph_1_in_0_1 @ 0x55714f61b3c0] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3

[graph 0 input from stream 0:0 @ 0x557154f4b400] w:3840 h:2160 pixfmt:yuv420p10le tb:1/60000 fr:60000/1001 sar:1/1

[auto_scaler_0 @ 0x557154f4a340] w:iw h:ih flags:'bicubic' interl:0

 [Parsed_format_3 @ 0x55714f757740] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_zscale_2' and the filter 'Parsed_format_3'

[auto_scaler_1 @ 0x557154f4d680] w:iw h:ih flags:'bicubic' interl:0

[format @ 0x55714f600640] auto-inserting filter 'auto_scaler_1' between the filter 'Parsed_format_7' and the filter 'format'

[Parsed_zscale_0 @ 0x55714f72f600] w:3840 h:2160 fmt:yuv420p10le sar:1/1 -> w:3840 h:2160 fmt:gbrpf32le sar:1/1

[Parsed_zscale_2 @ 0x55714f6ded40] w:3840 h:2160 fmt:gbrpf32le sar:1/1 -> w:3840 h:2160 fmt:gbrpf32le sar:1/1

[auto_scaler_0 @ 0x557154f4a340] w:3840 h:2160 fmt:gbrpf32le sar:1/1 -> w:3840 h:2160 fmt:p010le sar:1/1 flags:0x4

[Parsed_tonemap_vaapi_5 @ 0x557154f49040] VAAPI driver doesn't support HDR

[Parsed_tonemap_vaapi_5 @ 0x557154f49040] Failed to configure output pad on Parsed_tonemap_vaapi_5

Error reinitializing filters!

Failed to inject frame into filter network: Invalid argument

Error while processing the decoded data for stream #0:0

[AVIOContext @ 0x55714f7d0d40] Statistics: 0 seeks, 0 writeouts

[aac @ 0x55714f72dec0] Qavg: 53548.738

[aac @ 0x55714f72dec0] 2 frames left in the queue on closing

[AVIOContext @ 0x55714f505040] Statistics: 2815871 bytes read, 2 seeks

Conversion failed!

So Trying to trick it, I considered ffmpeg -i initial.mp4 -map_metadata -1 -c copy input.mp4 and then piping that into the VAAPI command. thankfully this process is incredibly quick, operating ~ 93.2x speed.

so, the total command would then be: ffmpeg -loglevel verbose -i initial.mp4 -map_metadata -1 -c copy input.mp4 | rm output.mp4 | ffmpeg -loglevel verbose -init_hw_device vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i input.mp4 -vf "hwupload,tonemap_vaapi=format=p010:t=bt2020-10,hwdownload,format=p010" output.mp4 | rm input.mp4

Now what’s interesting now is that VAAPI is not complaining anymore. with all the video metadata removed, but ffmpeg can no longer parse the file. So I think that if we can figure out what exact metadata needs to be changed, that will crack this puzzle!

Metada removal piped into vaapi tonemap output
ffmpeg -hide_banner -loglevel verbose -i initial.mp4 -map_metadata:s:v  -1 -c copy input.mp4 |ffmpeg -hide_banner -loglevel verbose -init_hw_device vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i input.mp4 -vf "hwupload,tonemap_vaapi=format=p010:t=bt2020-10,hwdownload,format=p010" output.mp4 | rm input.mp4 

[AVHWDeviceContext @ 0x55642616a9c0] Trying to use DRM render node for device 0.
[AVHWDeviceContext @ 0x55642616a9c0] libva: VA-API version 1.7.0
[AVHWDeviceContext @ 0x55642616a9c0] libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘initial.mp4’:
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf58.58.100
Duration: 00:00:15.02, start: 0.000000, bitrate: 68933 kb/s
Stream #0:0(und): Video: hevc, 1 reference frame (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084, topleft), 3840x2160 [SAR 1:1 DAR 16:9], 73572 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 59.94 tbc (default)
Metadata:
handler_name : Video Media Handler
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
Metadata:
handler_name : Sound Media Handler
Output #0, mp4, to ‘input.mp4’:
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf58.58.100
Stream #0:0: Video: hevc, 1 reference frame (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084, topleft), 3840x2160 (0x0) [SAR 1:1 DAR 16:9], q=2-31, 73572 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 60k tbc (default)
Stream #0:1: Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[AVHWDeviceContext @ 0x55642616a9c0] libva: Found init function __vaDriverInit_1_7
[AVHWDeviceContext @ 0x55642616a9c0] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x55642616a9c0] Initialised VAAPI connection: version 1.7
[AVHWDeviceContext @ 0x55642616a9c0] VAAPI driver: Mesa Gallium driver 20.1.8 - kisak-mesa PPA for AMD Radeon RX 5600 XT (NAVI10, DRM 3.35.0, 5.4.44-2-pve-navipatch-pcrmrrpatch, LLVM 10.0.1).
[AVHWDeviceContext @ 0x55642616a9c0] Driver not found in known nonstandard list, using standard behaviour.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55642643e000] moov atom not found
[AVIOContext @ 0x556426446e80] Statistics: 65536 bytes read, 3 seeks
input.mp4: Invalid data found when processing input
No more output streams to write to, finishing.
Not writing ‘clli’ atom. No content light level info.
Not writing ‘mdcv’ atom. Missing mastering metadata.
frame= 841 fps=0.0 q=-1.0 Lsize= 126381kB time=00:00:14.99 bitrate=69028.6kbits/s speed=91.1x
video:126010kB audio:352kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.014674%
Input file #0 (initial.mp4):
Input stream #0:0 (video): 841 packets read (129034729 bytes);
Input stream #0:1 (audio): 704 packets read (360448 bytes);
Total: 1545 packets (129395177 bytes) demuxed
Output file #0 (input.mp4):
Output stream #0:0 (video): 841 packets muxed (129034729 bytes);
Output stream #0:1 (audio): 704 packets muxed (360448 bytes);
Total: 1545 packets (129395177 bytes) muxed
[AVIOContext @ 0x564f42842780] Statistics: 2 seeks, 497 writeouts
[AVIOContext @ 0x564f42832740] Statistics: 129446903 bytes read, 2 seeks

the reason for the 2 rm commands is to make it easier to tweak parameters and not having to accept an override request

At this point I’m not sure what to do :confused:

My FFMPEG build options are

Build options

: --enable-gpl --enable-version3 --disable-static --enable-shared --enable-small --enable-chromaprint --enable-frei0r --enable-gmp --enable-gnutls --enable-ladspa --enable-libass --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-librtmp --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtesseract --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-openal --enable-opencl --enable-opengl --enable-nonfree --enable-libfdk-aac --enable-libbluray --enable-libzimg --enable-vaapi --enable-hwaccel=h263_vaapi --enable-hwaccel=h264_vaapi

CLINFO

clinfo
Number of platforms
1
Platform Name AMD Accelerated Parallel Processing
Platform Vendor Advanced Micro Devices, Inc.
Platform Version OpenCL 2.1 AMD-APP (3110.6)
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_amd_event_callback cl_amd_offline_devices
Platform Host timer resolution 1ns
Platform Extensions function suffix AMD

Platform Name AMD Accelerated Parallel Processing
Number of devices 1
Device Name gfx1010
Device Vendor Advanced Micro Devices, Inc.
Device Vendor ID 0x1002
Device Version OpenCL 2.0 AMD-APP (3110.6)
Driver Version 3110.6 (PAL,LC)
Device OpenCL C Version OpenCL C 2.0
Device Type GPU
Device Board Name (AMD) AMD Radeon RX 5600 XT
Device Topology (AMD) PCI-E, 0d:00.0
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes
Max compute units 18
SIMD per compute unit (AMD) 4
SIMD width (AMD) 32
SIMD instruction width (AMD) 1
Max clock frequency 1650MHz
Graphics IP (AMD) 10.10
Device Partition (core)
Max number of sub-devices 18
Supported partition types None
Supported affinity domains (n/a)
Max work item dimensions 3
Max work item sizes 1024x1024x1024
Max work group size 256
Preferred work group size (AMD) 256
Max work group size (AMD) 1024

1 Like