Skip to content

Instantly share code, notes, and snippets.

@ChristophHaag
Created September 6, 2016 14:56
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/5c6b9b47db564212902d288a0ff9266b to your computer and use it in GitHub Desktop.
Save ChristophHaag/5c6b9b47db564212902d288a0ff9266b to your computer and use it in GitHub Desktop.
LIBVA_DRIVER_NAME=radeonsi ffmpeg -v debug -vaapi_device /dev/dri/renderD128 -i big_buck_bunny_720p_1mb.mp4 -vf 'format=nv12,hwupload' -c:v h264_vaapi output.mkv
ffmpeg version N-81561-g163c712 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 6.2.1 (GCC) 20160830
configuration: --prefix=/usr --disable-debug --disable-static --enable-avisynth --enable-avresample --enable-fontconfig --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libfdk-aac --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-nonfree --enable-shared --enable-version3 --enable-x11grab --enable-omx
libavutil 55. 29.100 / 55. 29.100
libavcodec 57. 54.102 / 57. 54.102
libavformat 57. 48.102 / 57. 48.102
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 60.100 / 6. 60.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set 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' (set 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 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 @ 0x55d178868f60] 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 @ 0x55d178868f60] Initialised VAAPI connection: version 0.39
[AVHWDeviceContext @ 0x55d178868f60] Format 0x3231564e -> unknown.
[AVHWDeviceContext @ 0x55d178868f60] Format 0x32315659 -> unknown.
[AVHWDeviceContext @ 0x55d178868f60] Format 0x56595559 -> unknown.
[AVHWDeviceContext @ 0x55d178868f60] Format 0x59565955 -> unknown.
[AVHWDeviceContext @ 0x55d178868f60] Format 0x41524742 -> bgra.
[AVHWDeviceContext @ 0x55d178868f60] Format 0x41424752 -> rgba.
[AVHWDeviceContext @ 0x55d178868f60] Format 0x58524742 -> bgr0.
[AVHWDeviceContext @ 0x55d178868f60] Format 0x58424752 -> rgb0.
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.
[file @ 0x55d1789260a0] Setting default whitelist 'file,crypto'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55d1789263e0] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55d1789263e0] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55d1789263e0] Unknown dref type 0x08206c7275 size 12
Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55d1789263e0] Before avformat_find_stream_info() pos: 1055736 bytes read:36997 seeks:1 nb_streams:2
[h264 @ 0x55d178927360] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0x55d178927360] nal_unit_type: 8, nal_ref_idc: 3
[h264 @ 0x55d178927360] nal_unit_type: 5, nal_ref_idc: 3
[h264 @ 0x55d178927360] Reinit context to 1280x720, pix_fmt: yuv420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55d1789263e0] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55d1789263e0] After avformat_find_stream_info() pos: 106237 bytes read:143186 seeks:2 frames:2
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-01T00:00:00.000000Z
encoder : Lavf53.24.2
Duration: 00:00:05.31, start: 0.000000, bitrate: 1589 kb/s
Stream #0:0(und), 1, 1/12800: Video: h264 (Main), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 1280x720 [SAR 1:1 DAR 16:9], 0/1, 1205 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : VideoHandler
Stream #0:1(und), 1, 1/48000: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 384 kb/s (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : SoundHandler
Successfully opened the file.
Parsing a group of options: output file output.mkv.
Applying option vf (set 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
[file @ 0x55d178957060] Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 4 logical cores
[Parsed_format_0 @ 0x55d1789406c0] compat: called with args=[nv12]
[Parsed_format_0 @ 0x55d1789406c0] Setting 'pix_fmts' to value 'nv12'
[graph 0 input from stream 0:0 @ 0x55d17888ff60] Setting 'video_size' to value '1280x720'
[graph 0 input from stream 0:0 @ 0x55d17888ff60] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0x55d17888ff60] Setting 'time_base' to value '1/12800'
[graph 0 input from stream 0:0 @ 0x55d17888ff60] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0x55d17888ff60] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x55d17888ff60] Setting 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x55d17888ff60] w:1280 h:720 pixfmt:yuv420p tb:1/12800 fr:25/1 sar:1/1 sws_param:flags=2
[format @ 0x55d178941460] compat: called with args=[vaapi_vld]
[format @ 0x55d178941460] Setting 'pix_fmts' to value 'vaapi_vld'
[auto-inserted scaler 0 @ 0x55d178963100] Setting 'flags' to value 'bicubic'
[auto-inserted scaler 0 @ 0x55d178963100] w:iw h:ih flags:'bicubic' interl:0
[Parsed_format_0 @ 0x55d1789406c0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'graph 0 input from stream 0:0' and the filter 'Parsed_format_0'
[auto-inserted scaler 1 @ 0x55d178963c00] Setting 'flags' to value 'bicubic'
[auto-inserted scaler 1 @ 0x55d178963c00] w:iw h:ih flags:'bicubic' interl:0
[Parsed_hwupload_1 @ 0x55d178940e20] auto-inserting filter 'auto-inserted scaler 1' between the filter 'Parsed_format_0' and the filter 'Parsed_hwupload_1'
[AVFilterGraph @ 0x55d178928c20] query_formats: 5 queried, 2 merged, 2 already done, 0 delayed
[auto-inserted scaler 1 @ 0x55d178963c00] picking rgb0 out of 4 ref:nv12 alpha:0
[auto-inserted scaler 0 @ 0x55d178963100] w:1280 h:720 fmt:yuv420p sar:1/1 -> w:1280 h:720 fmt:nv12 sar:1/1 flags:0x4
[auto-inserted scaler 1 @ 0x55d178963c00] w:1280 h:720 fmt:nv12 sar:1/1 -> w:1280 h:720 fmt:rgb0 sar:1/1 flags:0x4
[hwupload @ 0x55d178940f20] Surface format is rgb0.
[AVHWFramesContext @ 0x55d178963980] Created surface 0x1.
[AVHWFramesContext @ 0x55d178963980] Direct mapping possible.
[graph 1 input from stream 0:1 @ 0x55d1789afd00] Setting 'time_base' to value '1/48000'
[graph 1 input from stream 0:1 @ 0x55d1789afd00] Setting 'sample_rate' to value '48000'
[graph 1 input from stream 0:1 @ 0x55d1789afd00] Setting 'sample_fmt' to value 'fltp'
[graph 1 input from stream 0:1 @ 0x55d1789afd00] Setting 'channel_layout' to value '0x3f'
[graph 1 input from stream 0:1 @ 0x55d1789afd00] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3f
[audio format for output stream 0:1 @ 0x55d17895ff40] Setting 'sample_fmts' to value 'fltp'
[AVFilterGraph @ 0x55d178962020] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
[h264 @ 0x55d1789e41e0] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0x55d1789e41e0] nal_unit_type: 8, nal_ref_idc: 3
[h264_vaapi @ 0x55d17892be60] Using fixed QP = 20 / 20 / 24 for IDR- / P- / B-frames.
[h264_vaapi @ 0x55d17892be60] Using (null) as format of reconstructed frames.
[AVHWFramesContext @ 0x55d178cb4600] Unsupported format: (null).
[h264_vaapi @ 0x55d17892be60] Failed to initialise reconstructed frame context: -22.
Output #0, matroska, to 'output.mkv':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf53.24.2
Stream #0:0(und), 0, 0/0: Unknown: none, SAR 1:1 DAR 0:0 (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : VideoHandler
encoder : Lavc57.54.102 h264_vaapi
Stream #0:1(und), 0, 0/0: Unknown: none (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : SoundHandler
encoder : Lavc57.54.102 libvorbis
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_vaapi))
Stream #0:1 -> #0:1 (aac (native) -> vorbis (libvorbis))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[AVIOContext @ 0x55d17892ca40] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 0x55d17892eac0] Statistics: 143186 bytes read, 2 seeks
vainfo :(
libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns 0
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
vainfo: VA-API version: 0.39 (libva 1.7.1)
vainfo: Driver version: mesa gallium vaapi
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264Baseline : VAEntrypointVLD
VAProfileH264Baseline : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment