Opened 6 years ago
Last modified 3 years ago
#7525 open defect
VAAPI: Transcoding MJPEG to VP9 fails on GeminiLake
Reported by: | radek.hvizdos | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | vaapi, vp9 |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Encoding VP9 via VAAPI works, but not when trying to use VAAPI to also HWAccel MJPEG decode. The error is: Failed to end picture encode issue: 6 (invalid VASurfaceID).
Tested combinations:
decoder encoder result HWAccel vp9_vaapi FAIL SW vp9_vaapi OK HWAccel vp8_vaapi OK SW vp8_vaapi OK HWAccel libvpx-vp9 OK
How to reproduce:
/root/ffmpeg/ffmpeg/ffmpeg -loglevel debug -y -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device /dev/dri/renderD128 -framerate 6 -pattern_type glob -i "*.jpg" -global_quality 145 -c:v vp9_vaapi -b:v 0 -threads 4 -g 30 ~/vp9_145.webm ffmpeg version N-92314-g323c2cf Copyright (c) 2000-2018 the FFmpeg developers built with gcc 8 (Debian 8.2.0-8) configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/root/bin --enable-gpl --enable-libaom --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree libavutil 56. 21.100 / 56. 21.100 libavcodec 58. 34.100 / 58. 34.100 libavformat 58. 19.102 / 58. 19.102 libavdevice 58. 4.106 / 58. 4.106 libavfilter 7. 39.100 / 7. 39.100 libswscale 5. 2.100 / 5. 2.100 libswresample 3. 2.100 / 3. 2.100 libpostproc 55. 2.100 / 55. 2.100 Splitting the commandline. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '-hwaccel' ... matched as option 'hwaccel' (use HW accelerated decoding) with argument 'vaapi'. Reading option '-hwaccel_output_format' ... matched as option 'hwaccel_output_format' (select output format used with HW accelerated decoding) with argument 'vaapi'. Reading option '-hwaccel_device' ... matched as option 'hwaccel_device' (select a device for HW acceleration) with argument '/dev/dri/renderD128'. Reading option '-framerate' ... matched as AVOption 'framerate' with argument '6'. Reading option '-pattern_type' ... matched as AVOption 'pattern_type' with argument 'glob'. Reading option '-i' ... matched as input url with argument '*.jpg'. Reading option '-global_quality' ... matched as AVOption 'global_quality' with argument '145'. Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'vp9_vaapi'. Reading option '-b:v' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '0'. Reading option '-threads' ... matched as AVOption 'threads' with argument '4'. Reading option '-g' ... matched as AVOption 'g' with argument '30'. Reading option '/root/vp9_145.webm' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option loglevel (set logging level) with argument debug. Applying option y (overwrite output files) with argument 1. Successfully parsed a group of options. Parsing a group of options: input url *.jpg. Applying option hwaccel (use HW accelerated decoding) with argument vaapi. Applying option hwaccel_output_format (select output format used with HW accelerated decoding) with argument vaapi. Applying option hwaccel_device (select a device for HW acceleration) with argument /dev/dri/renderD128. Successfully parsed a group of options. Opening an input file: *.jpg. [image2 @ 0x55dedf596540] Opening '0.jpg' for reading [file @ 0x55dedf59fdc0] Setting default whitelist 'file,crypto' [AVIOContext @ 0x55dedf5a0040] Statistics: 141976 bytes read, 0 seeks [mjpeg @ 0x55dedf598540] marker=d8 avail_size_in_buf=141974 [mjpeg @ 0x55dedf598540] marker parser used 0 bytes (0 bits) [mjpeg @ 0x55dedf598540] marker=e0 avail_size_in_buf=141972 [mjpeg @ 0x55dedf598540] marker parser used 16 bytes (128 bits) [mjpeg @ 0x55dedf598540] marker=e1 avail_size_in_buf=141954 [mjpeg @ 0x55dedf598540] marker parser used 183 bytes (1464 bits) [mjpeg @ 0x55dedf598540] marker=db avail_size_in_buf=141768 [mjpeg @ 0x55dedf598540] index=0 [mjpeg @ 0x55dedf598540] qscale[0]: 2 [mjpeg @ 0x55dedf598540] marker parser used 67 bytes (536 bits) [mjpeg @ 0x55dedf598540] marker=db avail_size_in_buf=141699 [mjpeg @ 0x55dedf598540] index=1 [mjpeg @ 0x55dedf598540] qscale[1]: 5 [mjpeg @ 0x55dedf598540] marker parser used 67 bytes (536 bits) [mjpeg @ 0x55dedf598540] marker=c0 avail_size_in_buf=141630 [mjpeg @ 0x55dedf598540] Changing bps from 0 to 8 [mjpeg @ 0x55dedf598540] sof0: picture: 1920x1440 [mjpeg @ 0x55dedf598540] component 0 2:2 id: 0 quant:0 [mjpeg @ 0x55dedf598540] component 1 1:1 id: 1 quant:1 [mjpeg @ 0x55dedf598540] component 2 1:1 id: 2 quant:1 [mjpeg @ 0x55dedf598540] pix fmt id 22111100 [mjpeg @ 0x55dedf598540] Format yuvj420p chosen by get_format(). [mjpeg @ 0x55dedf598540] marker parser used 17 bytes (136 bits) [mjpeg @ 0x55dedf598540] marker=c4 avail_size_in_buf=141611 [mjpeg @ 0x55dedf598540] marker parser used 0 bytes (0 bits) [mjpeg @ 0x55dedf598540] marker=c4 avail_size_in_buf=141578 [mjpeg @ 0x55dedf598540] marker parser used 0 bytes (0 bits) [mjpeg @ 0x55dedf598540] marker=c4 avail_size_in_buf=141395 [mjpeg @ 0x55dedf598540] marker parser used 0 bytes (0 bits) [mjpeg @ 0x55dedf598540] marker=c4 avail_size_in_buf=141362 [mjpeg @ 0x55dedf598540] marker parser used 0 bytes (0 bits) [mjpeg @ 0x55dedf598540] escaping removed 356 bytes [mjpeg @ 0x55dedf598540] marker=da avail_size_in_buf=141179 [mjpeg @ 0x55dedf598540] marker parser used 140823 bytes (1126584 bits) [mjpeg @ 0x55dedf598540] marker=d9 avail_size_in_buf=0 [mjpeg @ 0x55dedf598540] decode frame unused 0 bytes [image2 @ 0x55dedf596540] Opening '1.jpg' for reading [file @ 0x55dedf5a1880] Setting default whitelist 'file,crypto' [AVIOContext @ 0x55dedf59e440] Statistics: 185688 bytes read, 0 seeks [image2 @ 0x55dedf596540] Opening '2.jpg' for reading [file @ 0x55dedf59e980] Setting default whitelist 'file,crypto' [AVIOContext @ 0x55dedf5a1840] Statistics: 141976 bytes read, 0 seeks [image2 @ 0x55dedf596540] Opening '3.jpg' for reading [file @ 0x55dedf59d100] Setting default whitelist 'file,crypto' [AVIOContext @ 0x55dedf59d240] Statistics: 185688 bytes read, 0 seeks [image2 @ 0x55dedf596540] Opening '4.jpg' for reading [file @ 0x55dedf5a6240] Setting default whitelist 'file,crypto' [AVIOContext @ 0x55dedf5ae400] Statistics: 141976 bytes read, 0 seeks [image2 @ 0x55dedf596540] Opening '5.jpg' for reading [file @ 0x55dedf5a6780] Setting default whitelist 'file,crypto' [AVIOContext @ 0x55dedf5a69c0] Statistics: 185688 bytes read, 0 seeks [image2 @ 0x55dedf596540] Opening '6.jpg' for reading [file @ 0x55dedf5a6f00] Setting default whitelist 'file,crypto' [AVIOContext @ 0x55dedf5a7240] Statistics: 141976 bytes read, 0 seeks [image2 @ 0x55dedf596540] Opening '7.jpg' for reading [file @ 0x55dedf5a7600] Setting default whitelist 'file,crypto' [AVIOContext @ 0x55dedf5a76c0] Statistics: 185688 bytes read, 0 seeks [image2 @ 0x55dedf596540] Opening '8.jpg' for reading [file @ 0x55dedf5a7a80] Setting default whitelist 'file,crypto' [AVIOContext @ 0x55dedf5a7b40] Statistics: 141976 bytes read, 0 seeks [image2 @ 0x55dedf596540] Opening '9.jpg' for reading [file @ 0x55dedf5a8080] Setting default whitelist 'file,crypto' [AVIOContext @ 0x55dedf5a8140] Statistics: 185688 bytes read, 0 seeks Input #0, image2, from '*.jpg': Duration: 00:00:01.67, start: 0.000000, bitrate: N/A Stream #0:0, 10, 1/6: Video: mjpeg, 1 reference frame, yuvj420p(pc, bt470bg/unknown/unknown, center), 1920x1440 [SAR 1:1 DAR 4:3], 0/1, 6 fps, 6 tbr, 6 tbn, 6 tbc Successfully opened the file. Parsing a group of options: output url /root/vp9_145.webm. Applying option c:v (codec name) with argument vp9_vaapi. Applying option b:v (video bitrate (please use -b:v)) with argument 0. Successfully parsed a group of options. Opening an output file: /root/vp9_145.webm. [file @ 0x55dedf59b980] Setting default whitelist 'file,crypto' Successfully opened the file. [AVHWDeviceContext @ 0x55dedf596480] Opened VA display via DRM device /dev/dri/renderD128. [AVHWDeviceContext @ 0x55dedf596480] libva: VA-API version 1.3.0 [AVHWDeviceContext @ 0x55dedf596480] libva: va_getDriverName() returns 0 [AVHWDeviceContext @ 0x55dedf596480] libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so [AVHWDeviceContext @ 0x55dedf596480] libva: Found init function __vaDriverInit_1_2 [AVHWDeviceContext @ 0x55dedf596480] libva: va_openDriver() returns 0 [AVHWDeviceContext @ 0x55dedf596480] Initialised VAAPI connection: version 1.3 [AVHWDeviceContext @ 0x55dedf596480] Format 0x32315659 -> yuv420p. [AVHWDeviceContext @ 0x55dedf596480] Format 0x30323449 -> yuv420p. [AVHWDeviceContext @ 0x55dedf596480] Format 0x3231564e -> nv12. [AVHWDeviceContext @ 0x55dedf596480] Format 0x32595559 -> yuyv422. [AVHWDeviceContext @ 0x55dedf596480] Format 0x59565955 -> uyvy422. [AVHWDeviceContext @ 0x55dedf596480] Format 0x48323234 -> yuv422p. [AVHWDeviceContext @ 0x55dedf596480] Format 0x58424752 -> rgb0. [AVHWDeviceContext @ 0x55dedf596480] Format 0x58524742 -> bgr0. [AVHWDeviceContext @ 0x55dedf596480] Format 0x30313050 -> p010le. [AVHWDeviceContext @ 0x55dedf596480] VAAPI driver: Intel i965 driver for Intel(R) Gemini Lake - 2.2.1.pre1 (2.2.1.pre1). [AVHWDeviceContext @ 0x55dedf596480] Driver not found in known nonstandard list, using standard behaviour. Stream mapping: Stream #0:0 -> #0:0 (mjpeg (native) -> vp9 (vp9_vaapi)) Press [q] to stop, [?] for help cur_dts is invalid (this is harmless if it occurs once at the start per stream) [mjpeg @ 0x55dedf598ec0] marker=d8 avail_size_in_buf=141974 [mjpeg @ 0x55dedf598ec0] marker parser used 0 bytes (0 bits) [mjpeg @ 0x55dedf598ec0] marker=e0 avail_size_in_buf=141972 [mjpeg @ 0x55dedf598ec0] marker parser used 16 bytes (128 bits) [mjpeg @ 0x55dedf598ec0] marker=e1 avail_size_in_buf=141954 [mjpeg @ 0x55dedf598ec0] marker parser used 183 bytes (1464 bits) [mjpeg @ 0x55dedf598ec0] marker=db avail_size_in_buf=141768 [mjpeg @ 0x55dedf598ec0] index=0 [mjpeg @ 0x55dedf598ec0] qscale[0]: 2 [mjpeg @ 0x55dedf598ec0] marker parser used 67 bytes (536 bits) [mjpeg @ 0x55dedf598ec0] marker=db avail_size_in_buf=141699 [mjpeg @ 0x55dedf598ec0] index=1 [mjpeg @ 0x55dedf598ec0] qscale[1]: 5 [mjpeg @ 0x55dedf598ec0] marker parser used 67 bytes (536 bits) [mjpeg @ 0x55dedf598ec0] marker=c0 avail_size_in_buf=141630 [mjpeg @ 0x55dedf598ec0] sof0: picture: 1920x1440 [mjpeg @ 0x55dedf598ec0] component 0 2:2 id: 0 quant:0 [mjpeg @ 0x55dedf598ec0] component 1 1:1 id: 1 quant:1 [mjpeg @ 0x55dedf598ec0] component 2 1:1 id: 2 quant:1 [mjpeg @ 0x55dedf598ec0] pix fmt id 22111100 [mjpeg @ 0x55dedf598ec0] Format vaapi_vld chosen by get_format(). [mjpeg @ 0x55dedf598ec0] Format vaapi_vld requires hwaccel initialisation. [mjpeg @ 0x55dedf598ec0] Considering format 0x33434d49 -> yuv420p. [mjpeg @ 0x55dedf598ec0] Ignoring unknown format 0x31434d49. [mjpeg @ 0x55dedf598ec0] Considering format 0x30303859 -> gray. [mjpeg @ 0x55dedf598ec0] Considering format 0x50313134 -> yuv411p. [mjpeg @ 0x55dedf598ec0] Considering format 0x48323234 -> yuv422p. [mjpeg @ 0x55dedf598ec0] Considering format 0x56323234 -> yuv440p. [mjpeg @ 0x55dedf598ec0] Considering format 0x50343434 -> yuv444p. [mjpeg @ 0x55dedf598ec0] Picked yuv420p (0x33434d49) as best match for yuvj420p. [AVHWFramesContext @ 0x55dedf5ae1c0] Created surface 0x4000000. [AVHWFramesContext @ 0x55dedf5ae1c0] Direct mapping possible. [AVHWFramesContext @ 0x55dedf5ae1c0] Created surface 0x4000001. [AVHWFramesContext @ 0x55dedf5ae1c0] Created surface 0x4000002. [AVHWFramesContext @ 0x55dedf5ae1c0] Created surface 0x4000003. [AVHWFramesContext @ 0x55dedf5ae1c0] Created surface 0x4000004. [AVHWFramesContext @ 0x55dedf5ae1c0] Created surface 0x4000005. [mjpeg @ 0x55dedf598ec0] Considering format 0x33434d49 -> yuv420p. [mjpeg @ 0x55dedf598ec0] Ignoring unknown format 0x31434d49. [mjpeg @ 0x55dedf598ec0] Considering format 0x30303859 -> gray. [mjpeg @ 0x55dedf598ec0] Considering format 0x50313134 -> yuv411p. [mjpeg @ 0x55dedf598ec0] Considering format 0x48323234 -> yuv422p. [mjpeg @ 0x55dedf598ec0] Considering format 0x56323234 -> yuv440p. [mjpeg @ 0x55dedf598ec0] Considering format 0x50343434 -> yuv444p. [mjpeg @ 0x55dedf598ec0] Picked yuv420p (0x33434d49) as best match for yuvj420p. [mjpeg @ 0x55dedf598ec0] Decode context initialised: 0x1000000/0x2000000. [mjpeg @ 0x55dedf598ec0] Param buffer (type 0, 1060 bytes) is 0x8000000. [mjpeg @ 0x55dedf598ec0] marker parser used 17 bytes (136 bits) [mjpeg @ 0x55dedf598ec0] marker=c4 avail_size_in_buf=141611 20:28 [mjpeg @ 0x55dedf598ec0] class=0 index=0 nb_codes=12 [mjpeg @ 0x55dedf598ec0] marker parser used 31 bytes (248 bits) [mjpeg @ 0x55dedf598ec0] marker=c4 avail_size_in_buf=141578 [mjpeg @ 0x55dedf598ec0] class=1 index=0 nb_codes=251 [mjpeg @ 0x55dedf598ec0] marker parser used 181 bytes (1448 bits) [mjpeg @ 0x55dedf598ec0] marker=c4 avail_size_in_buf=141395 [mjpeg @ 0x55dedf598ec0] class=0 index=1 nb_codes=12 [mjpeg @ 0x55dedf598ec0] marker parser used 31 bytes (248 bits) [mjpeg @ 0x55dedf598ec0] marker=c4 avail_size_in_buf=141362 [mjpeg @ 0x55dedf598ec0] class=1 index=1 nb_codes=251 [mjpeg @ 0x55dedf598ec0] marker parser used 181 bytes (1448 bits) [mjpeg @ 0x55dedf598ec0] escaping removed 356 bytes [mjpeg @ 0x55dedf598ec0] marker=da avail_size_in_buf=141179 [mjpeg @ 0x55dedf598ec0] component: 0 [mjpeg @ 0x55dedf598ec0] component: 1 [mjpeg @ 0x55dedf598ec0] component: 2 [mjpeg @ 0x55dedf598ec0] Param buffer (type 12, 436 bytes) is 0x8000001. [mjpeg @ 0x55dedf598ec0] Param buffer (type 1, 276 bytes) is 0x8000002. [mjpeg @ 0x55dedf598ec0] Slice 0 param buffer (56 bytes) is 0x8000003. [mjpeg @ 0x55dedf598ec0] Slice 0 data buffer (141167 bytes) is 0x8000004. [mjpeg @ 0x55dedf598ec0] marker parser used 12 bytes (96 bits) [mjpeg @ 0x55dedf598ec0] marker=d9 avail_size_in_buf=0 [mjpeg @ 0x55dedf598ec0] Decode to surface 0x4000005. [mjpeg @ 0x55dedf598ec0] decode frame unused 0 bytes [graph 0 input from stream 0:0 @ 0x55dedf5b8ec0] Setting 'video_size' to value '1920x1440' [graph 0 input from stream 0:0 @ 0x55dedf5b8ec0] Setting 'pix_fmt' to value '46' [graph 0 input from stream 0:0 @ 0x55dedf5b8ec0] Setting 'time_base' to value '1/6' [graph 0 input from stream 0:0 @ 0x55dedf5b8ec0] Setting 'pixel_aspect' to value '1/1' [graph 0 input from stream 0:0 @ 0x55dedf5b8ec0] Setting 'sws_param' to value 'flags=2' [graph 0 input from stream 0:0 @ 0x55dedf5b8ec0] Setting 'frame_rate' to value '6/1' [graph 0 input from stream 0:0 @ 0x55dedf5b8ec0] w:1920 h:1440 pixfmt:vaapi_vld tb:1/6 fr:6/1 sar:1/1 sws_param:flags=2 [format @ 0x55dedf5b8c40] Setting 'pix_fmts' to value 'vaapi_vld' [AVFilterGraph @ 0x55dedf59ab00] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed [vp9_vaapi @ 0x55dedf5a0f00] Input surface format is yuv420p. [vp9_vaapi @ 0x55dedf5a0f00] Using VAAPI profile VAProfileVP9Profile0 (19). [vp9_vaapi @ 0x55dedf5a0f00] Using VAAPI entrypoint VAEntrypointEncSlice (6). [vp9_vaapi @ 0x55dedf5a0f00] Using VAAPI render target format YUV420 (0x1). [vp9_vaapi @ 0x55dedf5a0f00] Using constant-quality mode. [vp9_vaapi @ 0x55dedf5a0f00] Using intra and P-frames (supported references: 1 / 1). [vp9_vaapi @ 0x55dedf5a0f00] All wanted packed headers available (wanted 0, found 0x10). [vp9_vaapi @ 0x55dedf5a0f00] Using yuv420p as format of reconstructed frames. [AVHWFramesContext @ 0x55dedf5e9980] Created surface 0x4000006. [AVHWFramesContext @ 0x55dedf5e9980] Direct mapping disabled: derived image format 32315659 does not match expected format 30323449. [AVHWFramesContext @ 0x55dedf5e9980] Created surface 0x4000007. [AVHWFramesContext @ 0x55dedf5e9980] Created surface 0x4000008. [webm @ 0x55dedf59ec40] get_metadata_duration returned: 0 Output #0, webm, to '/root/vp9_145.webm': Metadata: encoder : Lavf58.19.102 Stream #0:0, 0, 1/1000: Video: vp9 (vp9_vaapi) (Profile 0), 1 reference frame, vaapi_vld(center), 1920x1440 [SAR 1:1 DAR 4:3], 0/1, q=-1--1, 6 fps, 1k tbn, 6 tbc Metadata: encoder : Lavc58.34.100 vp9_vaapi Clipping frame in rate conversion by 0.000008 [vp9_vaapi @ 0x55dedf5a0f00] Encode frame: 1920x1440 (0). [vp9_vaapi @ 0x55dedf5a0f00] Pictures: IDR (0/0) [vp9_vaapi @ 0x55dedf5a0f00] Issuing encode for pic 0/0 as type IDR. [vp9_vaapi @ 0x55dedf5a0f00] No reference pictures. [vp9_vaapi @ 0x55dedf5a0f00] Input surface is 0x4000005. [vp9_vaapi @ 0x55dedf5a0f00] Recon surface is 0x4000008. [vp9_vaapi @ 0x55dedf5a0f00] Allocated output buffer 0x8000004 [vp9_vaapi @ 0x55dedf5a0f00] Output buffer is 0x8000004. [vp9_vaapi @ 0x55dedf5a0f00] Param buffer (22) is 0x8000003. [vp9_vaapi @ 0x55dedf5a0f00] Param buffer (23) is 0x8000002. [vp9_vaapi @ 0x55dedf5a0f00] Failed to end picture encode issue: 6 (invalid VASurfaceID). [vp9_vaapi @ 0x55dedf5a0f00] Encode failed: -5. Video encoding failed [AVIOContext @ 0x55dedf59b680] Statistics: 0 seeks, 1 writeouts [vp9_vaapi @ 0x55dedf5a0f00] Freed output buffer 0x8000004 Conversion failed! uname -a Linux ike 4.18.0-2-amd64 #1 SMP Debian 4.18.10-2 (2018-10-07) x86_64 GNU/Linux
I am not sure if this is a bug in ffmpeg, vaapi or the gpu driver.
Change History (3)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Adding the specified options has 'fixed' the issue, I can now run the transcode fully in hardware. The speedup is almost 3x :)
The following was shown in ffmpeg output, the different surface was accepted by the encoder:
[Parsed_scale_vaapi_0 @ 0x55d253cc1cc0] Filter input: vaapi_vld, 1920x1440 (9). [Parsed_scale_vaapi_0 @ 0x55d253cc1cc0] Using surface 0x4000005 for scale input. [Parsed_scale_vaapi_0 @ 0x55d253cc1cc0] Using surface 0x400000e for scale output. [Parsed_scale_vaapi_0 @ 0x55d253cc1cc0] Pipeline parameter buffer is 0x8000005. 09:39 [Parsed_scale_vaapi_0 @ 0x55d253cc1cc0] Filter output: vaapi_vld, 1920x1440 (9). [vp9_vaapi @ 0x55d253caba80] Encode frame: 1920x1440 (9). [vp9_vaapi @ 0x55d253caba80] Pictures: P (8/8) P (9/9) 09:39 [vp9_vaapi @ 0x55d253caba80] Issuing encode for pic 9/9 as type P. [vp9_vaapi @ 0x55d253caba80] Refers to: 8/8. [vp9_vaapi @ 0x55d253caba80] Input surface is 0x400000e. [vp9_vaapi @ 0x55d253caba80] Recon surface is 0x4000011. [vp9_vaapi @ 0x55d253caba80] Output buffer is 0x8000004. [vp9_vaapi @ 0x55d253caba80] Param buffer (23) is 0x8000005. [vp9_vaapi @ 0x55d253caba80] Sync to pic 9/9 (input surface 0x400000e). [vp9_vaapi @ 0x55d253caba80] Output buffer: 4096 bytes (status 00000000). [vp9_vaapi @ 0x55d253caba80] Output read for pic 9/9. [webm @ 0x55d253ca5b80] Writing block at offset 36930, size 4096, pts 1500, dts 1500, duration 167, keyframe 0
Can we fix the encoder to either support yuv420p, or stop it from advertising the capability to do so? How come this works for vp8_vaapi?
Thank you!
It's decoding the JPEG to vaapi/yuv420p, and that gets passed directly to the vp9_vaapi encoder. The encoder agrees it supports that format, but then seems to fail on encode saying the surface is invalid.
Despite what the capabilties say, maybe it doesn't support yuv420p input - try adding
-vf scale_vaapi=format=nv12
?