Skip to content

Instantly share code, notes, and snippets.

@ChristophHaag
Created September 6, 2016 15:00
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/52d899f75e7983c998761f0af32943f1 to your computer and use it in GitHub Desktop.
Save ChristophHaag/52d899f75e7983c998761f0af32943f1 to your computer and use it in GitHub Desktop.
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 15:59:48 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 @ 0x55ece8f567e0] 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 @ 0x55ece8f567e0] Initialised VAAPI connection: version 0.39
[AVHWDeviceContext @ 0x55ece8f567e0] Format 0x3231564e -> nv12.
[AVHWDeviceContext @ 0x55ece8f567e0] Format 0x32315659 -> yuv420p.
[AVHWDeviceContext @ 0x55ece8f567e0] Format 0x56595559 -> unknown.
[AVHWDeviceContext @ 0x55ece8f567e0] Format 0x59565955 -> uyvy422.
[AVHWDeviceContext @ 0x55ece8f567e0] Format 0x41524742 -> bgra.
[AVHWDeviceContext @ 0x55ece8f567e0] Format 0x41424752 -> rgba.
[AVHWDeviceContext @ 0x55ece8f567e0] Format 0x58524742 -> unknown.
[AVHWDeviceContext @ 0x55ece8f567e0] Format 0x58424752 -> unknown.
[AVHWDeviceContext @ 0x55ece8f567e0] 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 @ 0x55ece90171a0] Probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55ece90171a0] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55ece90171a0] Unknown dref type 0x08206c7275 size 12
Last message repeated 1 times
[h264 @ 0x55ece9017da0] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0x55ece9017da0] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0x55ece9017da0] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 0x55ece9017da0] Reinit context to 1280x720, pix_fmt: 0
[h264 @ 0x55ece9017da0] nal_unit_type: 1, nal_ref_idc: 2
Last message repeated 4 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55ece90171a0] 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 @ 0x55ece9019d00] detected 4 logical cores
[h264 @ 0x55ece9072e40] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0x55ece9072e40] 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 @ 0x55ece911ab60] tb:1/48000 samplefmt:(null) samplerate: 48000 ch layout:(null)
[abuffersink @ 0x55ece911aa00] 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 @ 0x55ece9072e40] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 0x55ece9072e40] Reinit context to 1280x720, pix_fmt: 0
[h264 @ 0x55ece92bfdc0] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 0x55ece91d80c0] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 0x55ece90745c0] nal_unit_type: 1, nal_ref_idc: 2
[h264 @ 0x55ece9281d80] nal_unit_type: 1, nal_ref_idc: 2
Detected 4 logical cores.
[buffer @ 0x55ece92d0b80] w:1280 h:720 pixfmt:yuv420p tb:1/12800 sar:1/1
[buffersink @ 0x55ece9199140] auto-inserting filter 'auto-inserted fifo 0' between the filter 'format' and the filter 'output stream 0:0'
[format @ 0x55ece911c260] 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 @ 0x55ece9197d60] w:1280 h:720 fmt:yuv420p -> w:1280 h:720 fmt:nv12 flags:0x4
[hwupload @ 0x55ece92fe380] Surface format is nv12.
[AVHWFramesContext @ 0x55ece92fe600] Created surface 0x1.
[AVHWFramesContext @ 0x55ece92fe600] Direct mapping disabled: deriving image does not work: 22 (invalid VAImageFormat).
[h264_vaapi @ 0x55ece92fca00] Using fixed QP = 20 / 20 / 24 for IDR- / P- / B-frames.
[h264_vaapi @ 0x55ece92fca00] Using nv12 as format of reconstructed frames.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0x3.
[AVHWFramesContext @ 0x55ece9477540] Direct mapping disabled: deriving image does not work: 22 (invalid VAImageFormat).
[AVHWFramesContext @ 0x55ece9477540] Created surface 0x4.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0x5.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0x6.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0x7.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0x8.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0x9.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0xa.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0xb.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0xc.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0xd.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0xe.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0xf.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0x10.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0x11.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0x12.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0x13.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0x14.
[AVHWFramesContext @ 0x55ece9477540] Created surface 0x15.
[AVHWFramesContext @ 0x55ece9477540] 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 @ 0x55ece92fe600] Map surface 0x1.
[AVHWFramesContext @ 0x55ece92fe600] Failed to sync surface 0x1: 5 (invalid VAContextID).
[hwupload @ 0x55ece92fe380] Failed to upload frame: -5.
Error while filtering: Input/output error
[AVHWFramesContext @ 0x55ece92fe600] Map surface 0x1.
[AVHWFramesContext @ 0x55ece92fe600] Failed to sync surface 0x1: 5 (invalid VAContextID).
[hwupload @ 0x55ece92fe380] Failed to upload frame: -5.
[h264_vaapi @ 0x55ece92fca00] Pictures at end of stream:
[matroska @ 0x55ece901ec00] Writing block at offset 1064, size 1792, pts 0, dts 0, duration 32, flags 128
[matroska @ 0x55ece901ec00] Writing block at offset 2863, size 1792, pts 32, dts 32, duration 32, flags 128
[matroska @ 0x55ece901ec00] Writing block at offset 4662, size 1792, pts 64, dts 64, duration 32, flags 128
[matroska @ 0x55ece901ec00] Writing block at offset 6461, size 1792, pts 96, dts 96, duration 32, flags 128
[matroska @ 0x55ece901ec00] Writing block at offset 8260, size 1792, pts 128, dts 128, duration 32, flags 128
[matroska @ 0x55ece901ec00] Writing block at offset 10059, size 1792, pts 160, dts 160, duration 32, flags 128
[matroska @ 0x55ece901ec00] end duration = 197
frame= 0 fps= 0 q=0.0 Lsize= 12kB time=0.15 bitrate= 613.3kbits/s
video:0kB audio:10kB other streams:0kB global headers:0kB muxing overhead: 10.286458%
Input file #0 (big_buck_bunny_720p_1mb.mp4):
Input stream #0:0 (video): 5 packets read (113660 bytes); 5 frames decoded;
Input stream #0:1 (audio): 9 packets read (8953 bytes); 9 frames decoded (9216 samples);
Total: 14 packets (122613 bytes) demuxed
Output file #0 (output.mkv):
Output stream #0:0 (video): 0 frames encoded; 0 packets muxed (0 bytes);
Output stream #0:1 (audio): 6 frames encoded (9216 samples); 6 packets muxed (10752 bytes);
Total: 6 packets (10752 bytes) muxed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment