Guten Morgen zusammen,
Ich habe aktuell ein sehr seltsames Phänomen.
Das Encoding von einer H264 MKV in eine HEVC MKV komplett VAAPI beschleunigt will einfach nicht funktionieren.
Also erstmal zu den System-Infos:
Static hostname: localhost
Transient hostname: gmdetroimp01kvm
Icon name: computer-desktop
Chassis: desktop
Machine ID: aadd4656c6c14993b71a6ca476511086
Boot ID: a3acd3945807459d9ddb45e11c23c032
Operating System: openSUSE Leap 15.2
CPE OS Name: cpe:/o:opensuse:leap:15.2
Kernel: Linux 5.3.18-lp152.20.7-default
Architecture: x86-64
vainfo
error: can't connect to X server!
libva info: VA-API version 1.5.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_5
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.5 (libva 2.5.0)
vainfo: Driver version: Mesa Gallium driver 20.2.0-devel for AMD RAVEN (DRM 3.33.0, 5.3.18-lp152.20.7-default, LLVM 10.0.0)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
Alles anzeigen
zypper lr -u
Die Repository-Prioritäten sind ohne Effekt. Alle aktivierten Repositorys teilen sich die gleiche Priorität.
# | Alias | Name | Aktiviert | GPG-Ãberprüfung | Aktualisierung | URI
---+-----------------------------+-----------------------------------------------------------------+-----------+-----------------+----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | filesystems | Filesystem tools and FUSE-related packages (openSUSE_Leap_15.2) | Ja | (r ) Ja | Nein | http://download.opensuse.org/repositories/filesystems/openSUSE_Leap_15.2/
2 | home_khnazile_video | Graphics drivers & libs (openSUSE_Leap_15.2) | Ja | (r ) Ja | Nein | https://download.opensuse.org/repositories/home:/khnazile:/video/openSUSE_Leap_15.2/
3 | openSUSE-Leap-$releasever-1 | openSUSE-Leap-15.2-1 | Nein | ---- | ---- | hd:/?device=/dev/disk/by-id/usb-SanDisk_Ultra_0401988755a1711ed419e3dec39dd4c0d0961c0a95ca864710f7d2cc3203b6fc97eb00000000000000000000163bafecff81091881558107a8a63c6b-0:0-part1
4 | repo-debug | Debug Repository | Nein | ---- | ---- | http://download.opensuse.org/debug/distribution/leap/15.2/repo/oss/
5 | repo-debug-non-oss | Debug Repository (Non-OSS) | Nein | ---- | ---- | http://download.opensuse.org/debug/distribution/leap/15.2/repo/non-oss/
6 | repo-debug-update | Update Repository (Debug) | Nein | ---- | ---- | http://download.opensuse.org/debug/update/leap/15.2/oss/
7 | repo-debug-update-non-oss | Update Repository (Debug, Non-OSS) | Nein | ---- | ---- | http://download.opensuse.org/debug/update/leap/15.2/non-oss/
8 | repo-non-oss | Non-OSS Repository | Ja | (r ) Ja | Ja | http://download.opensuse.org/distribution/leap/15.2/repo/non-oss/
9 | repo-oss | Main Repository | Ja | (r ) Ja | Ja | http://download.opensuse.org/distribution/leap/15.2/repo/oss/
10 | repo-source | Source Repository | Nein | ---- | ---- | http://download.opensuse.org/source/distribution/leap/15.2/repo/oss/
11 | repo-source-non-oss | Source Repository (Non-OSS) | Nein | ---- | ---- | http://download.opensuse.org/source/distribution/leap/15.2/repo/non-oss/
12 | repo-update | Main Update Repository | Ja | (r ) Ja | Ja | http://download.opensuse.org/update/leap/15.2/oss/
13 | repo-update-non-oss | Update Repository (Non-Oss) | Ja | (r ) Ja | Ja | http://download.opensuse.org/update/leap/15.2/non-oss/
Alles anzeigen
Es handelt sich um eine Ryzen 3400G CPU, welche je theoretisch sowohl encoden, als auch decoden kann, denn eigentlich wurde Sie extra für den Zweck besorgt, meine H264 Videos in HEVC zu encodieren, ohne dass die CPU Last am Limit liegt.
Und ja ich bin mir des Qualitätsverlust durchaus bewusst, aber wenn ich bis zu 50% Speicher sparen kann, ist es mir das wert.
Natürlich habe ich FFMPEG selbst gebaut gemäß offizieller Anleitung mit der Ausnahme, dass ich statisch gebaut habe:
ffmpeg version N-98443-gf9277cd Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (SUSE Linux)
configuration: --prefix=/home/build/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/build/ffmpeg_build/include --extra-ldflags=-L/home/build/ffmpeg_build/lib --extra-ldflags=-L/home/build/ffmpeg_build/lib64 --extra-libs=-lpthread --extra-libs=-lm --bindir=/home/build/bin --enable-gpl --enable-vaapi --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-static
libavutil 56. 55.100 / 56. 55.100
libavcodec 58. 94.100 / 58. 94.100
libavformat 58. 48.100 / 58. 48.100
libavdevice 58. 11.101 / 58. 11.101
libavfilter 7. 87.100 / 7. 87.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
Alles anzeigen
Nun zum eigentlichen Problem ... ich kann nicht komplett VAAPI beschleunigt in MKV konvertieren, da dort dann folgender Fehler auftritt (ffmpeg Optionen nur als Beispiel!):
ffmpeg -vaapi_device /dev/dri/renderD128 -loglevel debug -hwaccel vaapi -hwaccel_output_format vaapi -i sample.mkv -c:v hevc_vaapi -crf 28 -qp 25 -profile:v main -tier high -level 51 -c:a copy -map 0 output.mkv
...
[hevc_vaapi @ 0x4e1fac0] Driver does not support some wanted packed headers (wanted 0xd, found 0).
[hevc_vaapi @ 0x4e1fac0] Driver does not support packed sequence headers, but a global header is requested.
[hevc_vaapi @ 0x4e1fac0] No global header will be written: this may result in a stream which is not usable for some purposes (e.g. not muxable to some containers).
...
[matroska @ 0x4e63400] get_metadata_duration returned: 0
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input
Error initializing output stream 0:0 --
[AVIOContext @ 0x4e47480] Statistics: 0 seeks, 1 writeouts
[AVIOContext @ 0x4ea0740] Statistics: 197393 bytes read, 2 seeks
Conversion failed!
Alles anzeigen
Seltsamerweise tritt dieses Problem aber wirklich nur auf, wenn ich als Ausgabe Format MKV nutze ... nutze ich MP4 läuft alles an, auch wenn die Header Warnungen weiterhin da sind.
Ich hätte aber gerne MKV dem Ordnung halber.
Kompeltte Debug Ausgaben hänge ich an.
Hätte jemand ne Idee wie das zu lösen wäre?
Gruss,
EagleEye