Skip to content

Instantly share code, notes, and snippets.

@ChristophHaag
Created September 6, 2016 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChristophHaag/05b761a327f6ff433122f4e54eb89051 to your computer and use it in GitHub Desktop.
Save ChristophHaag/05b761a327f6ff433122f4e54eb89051 to your computer and use it in GitHub Desktop.
libva goto removed
LIBVA_DRIVER_NAME=radeonsi avconv -v debug -vaapi_device /dev/dri/renderD128 -i big_buck_bunny_720p_1mb.mp4 -vf 'format=nv12,hwupload' -c:v h264_vaapi output.mkv
avconv version v12_dev0-3170-g0e5dde7, Copyright (c) 2000-2016 the Libav developers
built on Sep 6 2016 17:08:05 with gcc 6.2.1 (GCC) 20160830
configuration: --prefix=/usr --enable-openssl --enable-nonfree --enable-vaapi --enable-omx --enable-libopus --enable-libpulse --enable-libx264 --enable-gpl
libavutil 55. 21. 0 / 55. 21. 0
libavcodec 57. 26. 0 / 57. 26. 0
libavformat 57. 7. 1 / 57. 7. 1
libavdevice 56. 1. 0 / 56. 1. 0
libavfilter 6. 7. 0 / 6. 7. 0
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0. 0 / 4. 0. 0
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set libav* logging level) with argument 'debug'.
Reading option '-vaapi_device' ... matched as option 'vaapi_device' (set VAAPI hardware device (DRM path or X11 display name)) with argument '/dev/dri/renderD128'.
Reading option '-i' ... matched as input file with argument 'big_buck_bunny_720p_1mb.mp4'.
Reading option '-vf' ... matched as option 'vf' (video filters) with argument 'format=nv12,hwupload'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'h264_vaapi'.
Reading option 'output.mkv' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set libav* logging level) with argument debug.
Applying option vaapi_device (set VAAPI hardware device (DRM path or X11 display name)) with argument /dev/dri/renderD128.
[AVHWDeviceContext @ 0x55de7a0b57e0] Opened VA display via DRM device /dev/dri/renderD128.
libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns -1
libva info: User requested driver 'radeonsi'
libva info: Trying to open /usr/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
[AVHWDeviceContext @ 0x55de7a0b57e0] Initialised VAAPI connection: version 0.39
[AVHWDeviceContext @ 0x55de7a0b57e0] Format 0x3231564e -> nv12.
[AVHWDeviceContext @ 0x55de7a0b57e0] Format 0x32315659 -> yuv420p.
[AVHWDeviceContext @ 0x55de7a0b57e0] Format 0x56595559 -> unknown.
[AVHWDeviceContext @ 0x55de7a0b57e0] Format 0x59565955 -> uyvy422.
[AVHWDeviceContext @ 0x55de7a0b57e0] Format 0x41524742 -> bgra.
[AVHWDeviceContext @ 0x55de7a0b57e0] Format 0x41424752 -> rgba.
[AVHWDeviceContext @ 0x55de7a0b57e0] Format 0x58524742 -> unknown.
[AVHWDeviceContext @ 0x55de7a0b57e0] Format 0x58424752 -> unknown.
[AVHWDeviceContext @ 0x55de7a0b57e0] Unknown driver "mesa gallium vaapi", assuming standard behaviour.
Successfully parsed a group of options.
Parsing a group of options: input file big_buck_bunny_720p_1mb.mp4.
Successfully parsed a group of options.
Opening an input file: big_buck_bunny_720p_1mb.mp4.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55de7a176160] Probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55de7a176160] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55de7a176160] Unknown dref type 0x08206c7275 size 12
Last message repeated 1 times
[h264 @ 0x55de7a176de0] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0x55de7a176de0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0x55de7a176de0] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 0x55de7a176de0] Reinit context to 1280x720, pix_fmt: 0
[h264 @ 0x55de7a176de0] nal_unit_type: 1, nal_ref_idc: 2
Last message repeated 4 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55de7a176160] All info found
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'big_buck_bunny_720p_1mb.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01 00:00:00
encoder : Lavf53.24.2
Duration: 00:00:05.31, start: 0.000000, bitrate: 1589 kb/s
Stream #0:0(und), 20, 1/12800: Video: h264 (Main) [avc1 / 0x31637661]
yuv420p, left, 1280x720 (0x0) [PAR 1:1 DAR 16:9], 0/1, 1205 kb/s
25 fps, 12800 tbn (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und), 37, 1/48000: Audio: aac (LC) [mp4a / 0x6134706D]
48000 Hz, 5.1, fltp, 384 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
Successfully opened the file.
Parsing a group of options: output file output.mkv.
Applying option vf (video filters) with argument format=nv12,hwupload.
Applying option c:v (codec name) with argument h264_vaapi.
Successfully parsed a group of options.
Opening an output file: output.mkv.
File 'output.mkv' already exists. Overwrite ? [y/N] y
Successfully opened the file.
[h264 @ 0x55de7a17d6e0] detected 4 logical cores
[h264 @ 0x55de7a45a780] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0x55de7a45a780] nal_unit_type: 8, nal_ref_idc: 3
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_vaapi))
Stream #0:1 -> #0:1 (aac (native) -> ac3 (native))
Press ctrl-c to stop encoding
Detected 4 logical cores.
[abuffer @ 0x55de7a0b45c0] tb:1/48000 samplefmt:(null) samplerate: 48000 ch layout:(null)
[abuffersink @ 0x55de7a0b4c60] auto-inserting filter 'auto-inserted fifo 0' between the filter 'audio format for output stream 0:1' and the filter 'output stream 0:1'
[h264 @ 0x55de7a45a780] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 0x55de7a45a780] Reinit context to 1280x720, pix_fmt: 0
[h264 @ 0x55de7a191160] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 0x55de7a2f84a0] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 0x55de7a1d6740] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 0x55de7a1cf940] nal_unit_type: 1, nal_ref_idc: 2
Detected 4 logical cores.
[buffer @ 0x55de7a45d200] w:1280 h:720 pixfmt:yuv420p tb:1/12800 sar:1/1
[buffersink @ 0x55de7a45dd00] auto-inserting filter 'auto-inserted fifo 0' between the filter 'format' and the filter 'output stream 0:0'
[format @ 0x55de7a30e2c0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'graph 0 input from stream 0:0' and the filter 'Parsed filter 0 format'
[scale @ 0x55de7a5cd3c0] w:1280 h:720 fmt:yuv420p -> w:1280 h:720 fmt:nv12 flags:0x4
[hwupload @ 0x55de7a45d600] Surface format is nv12.
[AVHWFramesContext @ 0x55de7a5cd7a0] Created surface 0x1.
[AVHWFramesContext @ 0x55de7a5cd7a0] Direct mapping disabled: deriving image does not work: 22 (invalid VAImageFormat).
[h264_vaapi @ 0x55de7a1d1820] Using fixed QP = 20 / 20 / 24 for IDR- / P- / B-frames.
[h264_vaapi @ 0x55de7a1d1820] Using nv12 as format of reconstructed frames.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0x3.
[AVHWFramesContext @ 0x55de7a5d6960] Direct mapping disabled: deriving image does not work: 22 (invalid VAImageFormat).
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0x4.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0x5.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0x6.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0x7.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0x8.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0x9.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0xa.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0xb.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0xc.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0xd.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0xe.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0xf.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0x10.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0x11.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0x12.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0x13.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0x14.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0x15.
[AVHWFramesContext @ 0x55de7a5d6960] Created surface 0x16.
Output #0, matroska, to 'output.mkv':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01 00:00:00
encoder : Lavf57.7.1
Stream #0:0(und), 0, 1/1000: Video: h264 (High) [H264 / 0x34363248]
vaapi_vld, left, 1280x720 (0x0) [PAR 1:1 DAR 16:9], 0/1, q=2-31, PAR 1:1 DAR 16:9
1k tbn (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
encoder : Lavc57.26.0 h264_vaapi
Stream #0:1(und), 0, 1/1000: Audio: ac3 [[0] [0][0] / 0x2000]
48000 Hz, 5.1, fltp, 448 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
encoder : Lavc57.26.0 ac3
[AVHWFramesContext @ 0x55de7a5cd7a0] Map surface 0x1.
[AVHWFramesContext @ 0x55de7a5cd7a0] Failed to sync surface 0x1: 5 (invalid VAContextID).
[AVHWFramesContext @ 0x55de7a5cd7a0] Unmap surface 0x1.
[h264_vaapi @ 0x55de7a1d1820] Encode frame: 1280x720 (0).
[h264_vaapi @ 0x55de7a1d1820] Issuing encode for pic 0/0 as type IDR.
[h264_vaapi @ 0x55de7a1d1820] No reference pictures.
[h264_vaapi @ 0x55de7a1d1820] Input surface is 0x1.
[h264_vaapi @ 0x55de7a1d1820] Recon surface is 0x16.
[h264_vaapi @ 0x55de7a1d1820] Allocated output buffer 0x18
[h264_vaapi @ 0x55de7a1d1820] Output buffer is 0x18.
[h264_vaapi @ 0x55de7a1d1820] Param buffer (22) is 0x19.
[h264_vaapi @ 0x55de7a1d1820] Param buffer (23) is 0x1a.
[h264_vaapi @ 0x55de7a1d1820] Packed header buffer (1) is 0x1b/0x1c (280 bits).
[h264_vaapi @ 0x55de7a1d1820] Packed header buffer (3) is 0x1d/0x1e (61 bits).
[h264_vaapi @ 0x55de7a1d1820] Param buffer (24) is 0x1f.
[h264 @ 0x55de7a45a780] nal_unit_type: 1, nal_ref_idc: 2
[AVHWFramesContext @ 0x55de7a5cd7a0] Created surface 0x20.
[AVHWFramesContext @ 0x55de7a5cd7a0] Map surface 0x20.
[AVHWFramesContext @ 0x55de7a5cd7a0] Failed to sync surface 0x20: 5 (invalid VAContextID).
[AVHWFramesContext @ 0x55de7a5cd7a0] Unmap surface 0x20.
[h264_vaapi @ 0x55de7a1d1820] Encode frame: 1280x720 (512).
[h264_vaapi @ 0x55de7a1d1820] Pictures: IDR (0/0) B (1/2) B (2/3) P (3/1)
[h264 @ 0x55de7a191160] nal_unit_type: 1, nal_ref_idc: 2
[AVHWFramesContext @ 0x55de7a5cd7a0] Created surface 0x21.
[AVHWFramesContext @ 0x55de7a5cd7a0] Map surface 0x21.
[AVHWFramesContext @ 0x55de7a5cd7a0] Failed to sync surface 0x21: 5 (invalid VAContextID).
[AVHWFramesContext @ 0x55de7a5cd7a0] Unmap surface 0x21.
[h264_vaapi @ 0x55de7a1d1820] Encode frame: 1280x720 (1024).
[h264_vaapi @ 0x55de7a1d1820] Sync to pic 0/0 (recon surface 0x16).
[h264_vaapi @ 0x55de7a1d1820] Failed to sync to picture completion: 5 (invalid VAContextID).
[h264_vaapi @ 0x55de7a1d1820] Output failed: -5.
Video encoding failed
[h264_vaapi @ 0x55de7a1d1820] Sync to pic 0/0 (recon surface 0x16).
[h264_vaapi @ 0x55de7a1d1820] Failed to sync to picture completion: 5 (invalid VAContextID).
[h264_vaapi @ 0x55de7a1d1820] Discard output for pic 0/0.
[h264_vaapi @ 0x55de7a1d1820] Freed output buffer 0x18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment