#11500: AV1 frame extraction (screenshot) fails
-------------------------------------+-----------------------------------
Reporter: ffmpegScale | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: swscale
Version: unspecified | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 1 |
-------------------------------------+-----------------------------------
Comment (by ffmpegScale):
Sorry, was occupied with strange syntax in the issue tracker. I tried so
many builds, it started with 7.0 and waited some time (I thought such a
regression gets noticed fast).
Also, I tried, different flavors in the repo (e.g. jellyfin - just to get
more data). All work with v6 and had the same issue with v7+. Also waited
for driver issues (I know - sw should be independent of hw)
Different commands fail related to read/scale video, but this is fastest
and easiest to reproduce and all have the same error message. I get them
in software that relies on ffmpeg as well. (That got the testing started)
{{{
ffmpeg -v debug -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -i
in.mkv -threads 0 -ss 8.280000 -frames:v 1 output.jpg
ffmpeg version n7.1 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 14.2.1 (GCC) 20250207
configuration: --prefix=/usr --disable-debug --disable-static --disable-
stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto
--enable-fontconfig --enable-frei0r --enable-gmp --enable-gnutls --enable-
gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray
--enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav
--enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-
libglslang --enable-libgsm --enable-libharfbuzz --enable-libiec61883
--enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame
--enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg
--enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse
--enable-librav1e --enable-librsvg --enable-librubberband --enable-
libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-
libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-
libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-
libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb
--enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq
--enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-
shared --enable-vapoursynth --enable-version3 --enable-vulkan
libavutil 59. 39.100 / 59. 39.100
libavcodec 61. 19.100 / 61. 19.100
libavformat 61. 7.100 / 61. 7.100
libavdevice 61. 3.100 / 61. 3.100
libavfilter 10. 4.100 / 10. 4.100
libswscale 8. 3.100 / 8. 3.100
libswresample 5. 3.100 / 5. 3.100
libpostproc 58. 3.100 / 58. 3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument 'debug'.
Reading option '-hwaccel' ... matched as option 'hwaccel' (use 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 '-i' ... matched as input url with argument 'in.mkv'.
Reading option '-threads' ... matched as AVOption 'threads' with argument
'0'.
Reading option '-ss' ... matched as option 'ss' (start transcoding at
specified time) with argument '8.280000'.
Reading option '-frames:v' ... matched as option 'frames' (set the number
of frames to output) with argument '1'.
Reading option 'output.jpg' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url in.mkv.
Applying option hwaccel (use 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: in.mkv.
[AVFormatContext @ 0x5bebf7094880] Opening 'in.mkv' for reading
[file @ 0x5bebf7094f40] Setting default whitelist 'file,crypto,data'
[matroska,webm @ 0x5bebf7094880] Format matroska,webm probed with
size=2048 and score=100
st:0 removing common factor 1000000 from timebase
[matroska,webm @ 0x5bebf7094880] Before avformat_find_stream_info() pos:
524 bytes read:32768 seeks:0 nb_streams:1
[libdav1d @ 0x5bebf7096780] libdav1d 1.5.1
[libdav1d @ 0x5bebf7096780] Using 1 threads, 0 max_frame_delay
[libdav1d @ 0x5bebf7096780] Frame 0: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[matroska,webm @ 0x5bebf7094880] All info found
[matroska,webm @ 0x5bebf7094880] After avformat_find_stream_info() pos:
607 bytes read:32768 seeks:0 frames:1
Selecting decoder 'av1' because of requested hwaccel method vaapi
Input #0, matroska,webm, from 'in.mkv':
Metadata:
ENCODER : Lavf61.7.100
Duration: 00:00:10.00, start: 0.000000, bitrate: 127 kb/s
Stream #0:0, 1, 1/1000: Video: av1 (libdav1d) (Main), 1 reference frame,
yuv420p10le(tv, ictcp/bt709/bt709), 320x180, 0/1, SAR 1:1 DAR 16:9, 24
fps, 24 tbr, 1k tbn
Metadata:
DURATION : 00:00:10.000000000
Successfully opened the file.
Parsing a group of options: output url output.jpg.
Applying option ss (start transcoding at specified time) with argument
8.280000.
Applying option frames:v (set the number of frames to output) with
argument 1.
Successfully parsed a group of options.
Opening an output file: output.jpg.
[out#0/image2 @ 0x5bebf7098500] No explicit maps, mapping streams
automatically...
[vost#0:0/mjpeg @ 0x5bebf7098c40] Created video stream from input stream
0:0
[AVHWDeviceContext @ 0x5bebf70995c0] libva: VA-API version 1.22.0
[AVHWDeviceContext @ 0x5bebf70995c0] libva: Trying to open
/usr/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x5bebf70995c0] libva: Found init function
__vaDriverInit_1_22
[AVHWDeviceContext @ 0x5bebf70995c0] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x5bebf70995c0] Initialised VAAPI connection: version
1.22
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x41524742 -> bgra.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x41424752 -> rgba.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x58524742 -> bgr0.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x58424752 -> rgb0.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x30335241 -> unknown.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x30334241 -> unknown.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x30335258 -> x2rgb10le.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x30334258 -> unknown.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x36314752 -> unknown.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x56555941 -> unknown.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x56555958 -> vuyx.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x30303859 -> gray.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x3231564e -> nv12.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x3132564e -> unknown.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x32595559 -> yuyv422.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x59565955 -> uyvy422.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x32315659 -> yuv420p.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x30323449 -> yuv420p.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x50313134 -> yuv411p.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x48323234 -> yuv422p.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x56323234 -> yuv440p.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x50343434 -> yuv444p.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x33434d49 -> unknown.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x30313050 -> p010le.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x32313050 -> p012le.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x36313050 -> unknown.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x30313259 -> y210le.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x32313259 -> y212le.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x36313259 -> unknown.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x30313459 -> xv30le.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x32313459 -> xv36le.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x36313459 -> unknown.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x50424752 -> unknown.
[AVHWDeviceContext @ 0x5bebf70995c0] Format 0x50524742 -> unknown.
[AVHWDeviceContext @ 0x5bebf70995c0] VAAPI driver: Intel iHD driver for
Intel(R) Gen Graphics - 25.1.3 ().
[AVHWDeviceContext @ 0x5bebf70995c0] Driver not found in known nonstandard
list, using standard behaviour.
Successfully opened the file.
Stream mapping:
Stream #0:0 -> #0:0 (av1 (native) -> mjpeg (native))
[vost#0:0/mjpeg @ 0x5bebf7098c40] Starting thread...
[vf#0:0 @ 0x5bebf70992c0] Starting thread...
[vist#0:0/av1 @ 0x5bebf709a5c0] [dec:av1 @ 0x5bebf709bd00] Starting
thread...
[in#0/matroska,webm @ 0x5bebf70945c0] Starting thread...
Press [q] to stop, [?] for help
[libdav1d @ 0x5bebf7099f00] Frame 16: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[av1 @ 0x5bebf709c540] Frame 0: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[av1 @ 0x5bebf709c540] Total OBUs on this packet: 2.
[av1 @ 0x5bebf709c540] OBU idx:0, type:1, content available:1.
[av1 @ 0x5bebf709c540] OBU idx:1, type:6, content available:1.
[av1 @ 0x5bebf709c540] Format vaapi chosen by get_format().
[av1 @ 0x5bebf709c540] Format vaapi requires hwaccel av1_vaapi
initialisation.
[libdav1d @ 0x5bebf7099f00] Frame 8: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[libdav1d @ 0x5bebf7099f00] Frame 4: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[libdav1d @ 0x5bebf7099f00] Frame 2: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[libdav1d @ 0x5bebf7099f00] Frame 1: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[libdav1d @ 0x5bebf7099f00] Frame 3: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[libdav1d @ 0x5bebf7099f00] Frame 6: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[libdav1d @ 0x5bebf7099f00] Frame 5: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[libdav1d @ 0x5bebf7099f00] Frame 7: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[libdav1d @ 0x5bebf7099f00] Frame 12: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[libdav1d @ 0x5bebf7099f00] Frame 10: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[libdav1d @ 0x5bebf7099f00] Frame 9: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[av1 @ 0x5bebf709c540] Considering format 0x3231564e -> nv12.
[av1 @ 0x5bebf709c540] Considering format 0x30313050 -> p010le.
[av1 @ 0x5bebf709c540] Picked p010le (0x30313050) as best match for
yuv420p10le.
[AVHWFramesContext @ 0x7a44840039c0] Created surface 0.
[AVHWFramesContext @ 0x7a44840039c0] Direct mapping possible.
[av1 @ 0x5bebf709c540] Decode context initialised: 0x53/0x10000000.
[av1 @ 0x5bebf709c540] AV1 decode get format: vaapi.
[av1 @ 0x5bebf709c540] Param buffer (type 0, 1160 bytes) is 0.
[av1 @ 0x5bebf709c540] Slice 0 param buffer (40 bytes) is 0x1.
[av1 @ 0x5bebf709c540] Slice 0 data buffer (34 bytes) is 0x2.
[av1 @ 0x5bebf709c540] Decode to surface 0.
[AVHWFramesContext @ 0x7a44840039c0] Map surface 0.
[AVHWFramesContext @ 0x7a44840039c0] Unmap surface 0.
[av1 @ 0x5bebf709c540] Frame 16: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[av1 @ 0x5bebf709c540] Frame 8: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[av1 @ 0x5bebf709c540] Frame 4: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[av1 @ 0x5bebf709c540] Frame 2: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[av1 @ 0x5bebf709c540] Frame 1: size 320x180 upscaled 320 render
320x180 subsample 2x2 bitdepth 10 tiles 1x1.
[av1 @ 0x5bebf709c540] Total OBUs on this packet: 5.
[av1 @ 0x5bebf709c540] OBU idx:0, type:6, content available:1.
detected 20 logical cores
[AVHWFramesContext @ 0x7a44840039c0] Created surface 0x1.
[AVHWFramesContext @ 0x7a44840039c0] Created surface 0x2.
[av1 @ 0x5bebf709c540] Param buffer (type 0, 1160 bytes) is 0x2.
[av1 @ 0x5bebf709c540] Slice 0 param buffer (40 bytes) is 0x1.
[av1 @ 0x5bebf709c540] Slice 0 data buffer (229 bytes) is 0.
[av1 @ 0x5bebf709c540] Decode to surface 0x2.
[graph -1 input from stream 0:0 @ 0x7a448c0041c0] Setting 'video_size' to
value '320x180'
[graph -1 input from stream 0:0 @ 0x7a448c0041c0] Setting 'pix_fmt' to
value '158'
[graph -1 input from stream 0:0 @ 0x7a448c0041c0] Setting 'time_base' to
value '1/1000'
[graph -1 input from stream 0:0 @ 0x7a448c0041c0] Setting 'pixel_aspect'
to value '1/1'
[graph -1 input from stream 0:0 @ 0x7a448c0041c0] Setting 'colorspace' to
value '14'
[graph -1 input from stream 0:0 @ 0x7a448c0041c0] Setting 'range' to value
'1'
[graph -1 input from stream 0:0 @ 0x7a448c0041c0] Setting 'frame_rate' to
value '24/1'
[graph -1 input from stream 0:0 @ 0x7a448c0041c0] w:320 h:180
pixfmt:p010le tb:1/1000 fr:24/1 sar:1/1 csp:ictcp range:tv
[format @ 0x7a448c004d80] Setting 'pix_fmts' to value
'yuvj420p|yuvj422p|yuvj444p|yuv420p|yuv422p|yuv444p'
[format @ 0x7a448c004d80] Setting 'color_ranges' to value 'pc'
[auto_scale_0 @ 0x7a448c006a00] w:iw h:ih flags:'' interl:0
[format @ 0x7a448c004d80] auto-inserting filter 'auto_scale_0' between the
filter 'Parsed_null_0' and the filter 'format'
Impossible to convert between the formats supported by the filter
'Parsed_null_0' and the filter 'auto_scale_0'
[vf#0:0 @ 0x5bebf70992c0] Error reinitializing filters!
[vf#0:0 @ 0x5bebf70992c0] Task finished with error code: -38 (Function not
implemented)
[out#0/image2 @ 0x5bebf7098500] sq: 0 EOF
[out#0/image2 @ 0x5bebf7098500] sq: finish 0; head ts NOPTS
[out#0/image2 @ 0x5bebf7098500] sq: finish queue
[vf#0:0 @ 0x5bebf70992c0] Terminating thread with return code -38
(Function not implemented)
[vost#0:0/mjpeg @ 0x5bebf7098c40] Encoder thread received EOF
[vost#0:0/mjpeg @ 0x5bebf7098c40] Could not open encoder before EOF
[vost#0:0/mjpeg @ 0x5bebf7098c40] Task finished with error code: -22
(Invalid argument)
[vost#0:0/mjpeg @ 0x5bebf7098c40] Terminating thread with return code -22
(Invalid argument)
[av1 @ 0x5bebf709c540] OBU idx:1, type:6, content available:1.
[AVHWFramesContext @ 0x7a44840039c0] Created surface 0x3.
[AVHWFramesContext @ 0x7a44840039c0] Created surface 0x4.
[av1 @ 0x5bebf709c540] Param buffer (type 0, 1160 bytes) is 0.
[av1 @ 0x5bebf709c540] Slice 0 param buffer (40 bytes) is 0x1.
[av1 @ 0x5bebf709c540] Slice 0 data buffer (90 bytes) is 0x2.
[av1 @ 0x5bebf709c540] Decode to surface 0x4.
[av1 @ 0x5bebf709c540] OBU idx:2, type:6, content available:1.
[AVHWFramesContext @ 0x7a44840039c0] Created surface 0x5.
[AVHWFramesContext @ 0x7a44840039c0] Created surface 0x6.
[av1 @ 0x5bebf709c540] Param buffer (type 0, 1160 bytes) is 0x2.
[av1 @ 0x5bebf709c540] Slice 0 param buffer (40 bytes) is 0x1.
[av1 @ 0x5bebf709c540] Slice 0 data buffer (41 bytes) is 0.
[av1 @ 0x5bebf709c540] Decode to surface 0x6.
[av1 @ 0x5bebf709c540] OBU idx:3, type:6, content available:1.
[AVHWFramesContext @ 0x7a44840039c0] Created surface 0x7.
[av1 @ 0x5bebf709c540] Param buffer (type 0, 1160 bytes) is 0.
[av1 @ 0x5bebf709c540] Slice 0 param buffer (40 bytes) is 0x1.
[av1 @ 0x5bebf709c540] Slice 0 data buffer (11 bytes) is 0x2.
[av1 @ 0x5bebf709c540] Decode to surface 0x7.
[av1 @ 0x5bebf709c540] OBU idx:4, type:6, content available:1.
[AVHWFramesContext @ 0x7a44840039c0] Created surface 0x8.
[av1 @ 0x5bebf709c540] Param buffer (type 0, 1160 bytes) is 0x2.
[av1 @ 0x5bebf709c540] Slice 0 param buffer (40 bytes) is 0x1.
[av1 @ 0x5bebf709c540] Slice 0 data buffer (3 bytes) is 0.
[av1 @ 0x5bebf709c540] Decode to surface 0x8.
[AVHWFramesContext @ 0x7a44840039c0] Map surface 0x8.
[AVHWFramesContext @ 0x7a44840039c0] Unmap surface 0x8.
[vist#0:0/av1 @ 0x5bebf709a5c0] [dec:av1 @ 0x5bebf709bd00] Decoder
returned EOF, finishing
[vist#0:0/av1 @ 0x5bebf709a5c0] [dec:av1 @ 0x5bebf709bd00] Terminating
thread with return code 0 (success)
[vist#0:0/av1 @ 0x5bebf709a5c0] All consumers of this stream are done
[in#0/matroska,webm @ 0x5bebf70945c0] All consumers are done
[in#0/matroska,webm @ 0x5bebf70945c0] Terminating thread with return code
0 (success)
[out#0/image2 @ 0x5bebf7098500] Nothing was written into output file,
because at least one of its streams received no packets.
frame= 0 fps=0.0 q=0.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A
[in#0/matroska,webm @ 0x5bebf70945c0] Input file #0 (in.mkv):
[in#0/matroska,webm @ 0x5bebf70945c0] Input stream #0:0 (video): 11
packets read (1928 bytes); 2 frames decoded; 0 decode errors;
[in#0/matroska,webm @ 0x5bebf70945c0] Total: 11 packets (1928 bytes)
demuxed
[AVIOContext @ 0x5bebf709d180] Statistics: 32768 bytes read, 0 seeks
Conversion failed!
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11500#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".