Opened 17 months ago

Last modified 16 months ago

#11500 new defect

"ictcp" colorspace "Function not implemented" unnecessarily failed things

Reported by: ffmpegScale Owned by:
Priority: normal Component: swscale
Version: git-master Keywords: ictcp color_primaries
Cc: MasterQuestionable Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: yes

Description

Summary of the bug:
How to reproduce:

% ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -i in.mkv -threads 0 -ss 18.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

built on arch linux (this is the offical package, also built git version and other releases. All the same result. I tried native (HW), default sw dav1d and svt-av1)

Result native

Stream mapping:
  Stream #0:0 -> #0:0 (av1 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
Impossible to convert between the formats supported by the filter 'graph -1 input from stream 0:0' and the filter 'auto_scale_0'
[vf#0:0 @ 0x62c32cbd2540] Error reinitializing filters!
[vf#0:0 @ 0x62c32cbd2540] Task finished with error code: -38 (Function not implemented)
[vf#0:0 @ 0x62c32cbd2540] Terminating thread with return code -38 (Function not implemented)
[vost#0:0/mjpeg @ 0x62c32cc22bc0] Could not open encoder before EOF
[vost#0:0/mjpeg @ 0x62c32cc22bc0] Task finished with error code: -22 (Invalid argument)
[vost#0:0/mjpeg @ 0x62c32cc22bc0] Terminating thread with return code -22 (Invalid argument)
[out#0/image2 @ 0x62c32cbdaa80] Nothing was written into output file, because at least one of its streams received no packets.

SW

ffmpeg -i in.mkv -threads 0 -ss 18.280000 -frames:v 1 output.jpg

Result sw

Stream mapping:
  Stream #0:0 -> #0:0 (av1 (libdav1d) -> mjpeg (native))
Press [q] to stop, [?] for help
Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scale_0'
[vf#0:0 @ 0x5f4e14aaa500] Error reinitializing filters!
[vf#0:0 @ 0x5f4e14aaa500] Task finished with error code: -38 (Function not implemented)
[vf#0:0 @ 0x5f4e14aaa500] Terminating thread with return code -38 (Function not implemented)
[vost#0:0/mjpeg @ 0x5f4e14af6f40] Could not open encoder before EOF
[vost#0:0/mjpeg @ 0x5f4e14af6f40] Task finished with error code: -22 (Invalid argument)
[vost#0:0/mjpeg @ 0x5f4e14af6f40] Terminating thread with return code -22 (Invalid argument)
[out#0/image2 @ 0x5f4e14aabac0] Nothing was written into output file, because at least one of its streams received no packets.

Other codecs work.

Reason I report it now is I had trouble scaling video with a similar error. Scale with av1 fails and zscale works for me. I couldn't find a parameter for frame extraction (screenshot)

With scale

ffmpeg -i in.mkv -vf "scale=-2:60" -pix_fmt yuv420p -f rawvideo out.mkv # fails

Stream mapping:
  Stream #0:0 -> #0:0 (av1 (libdav1d) -> rawvideo (native))
Press [q] to stop, [?] for help
Impossible to convert between the formats supported by the filter 'graph -1 input from stream 0:0' and the filter 'auto_scale_0'
[vf#0:0 @ 0x55dccafd0800] Error reinitializing filters!
[vf#0:0 @ 0x55dccafd0800] Task finished with error code: -38 (Function not implemented)
[vf#0:0 @ 0x55dccafd0800] Terminating thread with return code -38 (Function not implemented)
[vost#0:0/rawvideo @ 0x55dccaf88600] Could not open encoder before EOF
[vost#0:0/rawvideo @ 0x55dccaf88600] Task finished with error code: -22 (Invalid argument)
[vost#0:0/rawvideo @ 0x55dccaf88600] Terminating thread with return code -22 (Invalid argument)
[out#0/rawvideo @ 0x55dccaf9cb00] Nothing was written into output file, because at least one of its streams received no packets.

With zscale

ffmpeg -i in.mkv -vf "scale=-2:60" -an -sn -pix_fmt yuv420p -f rawvideo out.mkv # works

Tried my best after finding some information and constant behavior. Had the issue since v7.0 a while.

Last note:
While reporting, I compared ffmpeg -filters with older working version and tried -vf libplacebo - it worked, but normal simple SW/HW without libplacebo should work, or?

 ffmpeg -i a.mkv -threads 0 -ss 18.280000 -vf libplacebo -frames:v 1 output%03d.jpg

Stream mapping:
  Stream #0:0 -> #0:0 (av1 (libdav1d) -> mjpeg (native))
Press [q] to stop, [?] for help
MESA-INTEL: warning: ../mesa-25.0.1/src/intel/vulkan/anv_formats.c:834: FINISHME: support more multi-planar formats with DRM modifiers

Attachments (1)

in.mkv (155.7 KB ) - added by ffmpegScale 17 months ago.

Download all attachments as: .zip

Change History (17)

comment:1 by James, 17 months ago

Can you share that in.mkv sample, or another one to reproduce this issue?

by ffmpegScale, 17 months ago

Attachment: in.mkv added

comment:2 by ffmpegScale, 17 months ago

Yeah, I tested it with the attached file. Behaves as reported

error

ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -i in.mkv -threads 0 -ss 8.280000 -frames:v 1 output.jpg

works

ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -i in.mkv -threads 0 -ss 8.280000  -vf libplacebo -frames:v 1 output.jpg
Last edited 17 months ago by ffmpegScale (previous) (diff)

comment:3 by MasterQuestionable, 17 months ago

Analyzed by developer: set
Cc: MasterQuestionable added
Component: undeterminedswscale

͏    "error" and "works" commands (comment:2) are identical.

͏    “Built on Arch Linux (official package).
͏    Also built git-master version and other releases.
͏    All the same result.”
͏    .
͏    Either regression in "swscale", or build issue.

͏    Running with "-v debug" might give more info.

Last edited 17 months ago by MasterQuestionable (previous) (diff)

comment:4 by ffmpegScale, 17 months ago

Sorry, was occupied with strange syntax in the issue tracker (edited it). 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!
Last edited 17 months ago by ffmpegScale (previous) (diff)

comment:5 by MasterQuestionable, 17 months ago

͏    Is it AV1 specific?
͏    And per previous description hardware decoding shouldn't matter?

͏    What happens?
͏    ffmpeg -v debug -hide_banner -nostdin -nostats -f lavfi -i "testsrc" -vframes 1 -vf "scale=1x1" -f null -

in reply to:  5 comment:6 by ffmpegScale, 17 months ago

Replying to MasterQuestionable:

͏    Is it AV1 specific?

Yes I think so. Didn't encounter the error with AVC

͏    And per previous description hardware decoding shouldn't matter?

Hardware decoding doesn't matter, except for libplacebo that works. Before v7 every file worked. I think I also had a working AV1 file, but most won't work. (Attached file won't work)

͏    What happens?
͏    ffmpeg -v debug -hide_banner -nostdin -nostats -f lavfi -i "testsrc" -vframes 1 -vf "scale=1x1" -f null -

This won't work, because it tries to sue the input as filter:

 ffmpeg -v debug -hide_banner -nostdin -nostats -f lavfi -i "in.mkv" -vframes 1 -vf "scale=1x1" -f null -   

[AVFilterGraph @ 0x583487e06ec0] No such filter: 'in.mkv'
[AVFilterGraph @ 0x583487e06ec0] Error processing filtergraph: Filter not found

I put the -f lavfi to the filters

 ffmpeg -v debug -hide_banner -nostdin -nostats -i in.mkv -f lavfi -vframes 1 -vf "scale=1x1" -f null -
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-hide_banner' ... matched as option 'hide_banner' (do not show program banner) with argument '1'.
Reading option '-nostdin' ... matched as option 'stdin' (enable or disable interaction on standard input) with argument 0.
Reading option '-nostats' ... matched as option 'stats' (print progress report during encoding) with argument 0.
Reading option '-i' ... matched as input url with argument 'in.mkv'.
Reading option '-f' ... matched as option 'f' (force container format (auto-detected otherwise)) with argument 'lavfi'.
Reading option '-vframes' ... matched as option 'vframes' (set the number of video frames to output) with argument '1'.
Reading option '-vf' ... matched as option 'vf' (alias for -filter:v (apply filters to video streams)) with argument 'scale=1x1'.
Reading option '-f' ... matched as option 'f' (force container format (auto-detected otherwise)) with argument 'null'.
Reading option '-' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option hide_banner (do not show program banner) with argument 1.
Applying option nostdin (enable or disable interaction on standard input) with argument 0.
Applying option nostats (print progress report during encoding) with argument 0.
Successfully parsed a group of options.
Parsing a group of options: input url in.mkv.
Successfully parsed a group of options.
Opening an input file: in.mkv.
[AVFormatContext @ 0x635303eb48c0] Opening 'in.mkv' for reading
[file @ 0x635303eb4f80] Setting default whitelist 'file,crypto,data'
[matroska,webm @ 0x635303eb48c0] Format matroska,webm probed with size=2048 and score=100
st:0 removing common factor 1000000 from timebase
[matroska,webm @ 0x635303eb48c0] Before avformat_find_stream_info() pos: 524 bytes read:32768 seeks:0 nb_streams:1
[libdav1d @ 0x635303eb67c0] libdav1d 1.5.1
[libdav1d @ 0x635303eb67c0] Using 1 threads, 0 max_frame_delay
[libdav1d @ 0x635303eb67c0] Frame 0:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[matroska,webm @ 0x635303eb48c0] All info found
[matroska,webm @ 0x635303eb48c0] After avformat_find_stream_info() pos: 607 bytes read:32768 seeks:0 frames:1
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 -.
Applying option f (force container format (auto-detected otherwise)) with argument lavfi.
Applying option vframes (set the number of video frames to output) with argument 1.
Applying option vf (alias for -filter:v (apply filters to video streams)) with argument scale=1x1.
Applying option f (force container format (auto-detected otherwise)) with argument null.
Successfully parsed a group of options.
Opening an output file: -.
[out#0/null @ 0x635303eba7c0] No explicit maps, mapping streams automatically...
[vost#0:0/wrapped_avframe @ 0x635303eb8bc0] Created video stream from input stream 0:0
[AVFilterGraph @ 0x635303eb9200] Setting 'w' to value '1x1'
[Parsed_scale_0 @ 0x635303eb9500] w:1 h:1 flags:'' interl:0
[libdav1d @ 0x635303ebca80] libdav1d 1.5.1
[libdav1d @ 0x635303ebca80] Using 0 threads, 0 max_frame_delay
Successfully opened the file.
Stream mapping:
  Stream #0:0 -> #0:0 (av1 (libdav1d) -> wrapped_avframe (native))
[vost#0:0/wrapped_avframe @ 0x635303eb8bc0] Starting thread...
[vf#0:0 @ 0x635303eb9140] Starting thread...
[vist#0:0/av1 @ 0x635303eba600] [dec:libdav1d @ 0x635303ebc240] Starting thread...
[in#0/matroska,webm @ 0x635303eb4600] Starting thread...
[libdav1d @ 0x635303eb9f40] Frame 16:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 8:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 4:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 2:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 1:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 3:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 6:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 5:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 7:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 12:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 10:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 9:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 11:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[AVFilterGraph @ 0x7755a8001000] Setting 'w' to value '1x1'
detected 20 logical cores
[libdav1d @ 0x635303eb9f40] Frame 14:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 13:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[Parsed_scale_0 @ 0x7755a8003d80] w:1 h:1 flags:'' interl:0
[graph -1 input from stream 0:0 @ 0x7755a8011840] Setting 'video_size' to value '320x180'
[graph -1 input from stream 0:0 @ 0x7755a8011840] Setting 'pix_fmt' to value '62'
[graph -1 input from stream 0:0 @ 0x7755a8011840] Setting 'time_base' to value '1/1000'
[graph -1 input from stream 0:0 @ 0x7755a8011840] Setting 'pixel_aspect' to value '1/1'
[graph -1 input from stream 0:0 @ 0x7755a8011840] Setting 'colorspace' to value '14'
[graph -1 input from stream 0:0 @ 0x7755a8011840] Setting 'range' to value '1'
[graph -1 input from stream 0:0 @ 0x7755a8011840] Setting 'frame_rate' to value '24/1'
[libdav1d @ 0x635303eb9f40] Frame 15:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[graph -1 input from stream 0:0 @ 0x7755a8011840] w:320 h:180 pixfmt:yuv420p10le tb:1/1000 fr:24/1 sar:1/1 csp:ictcp range:tv
[libdav1d @ 0x635303eb9f40] Frame 32:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 24:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 20:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 18:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[libdav1d @ 0x635303eb9f40] Frame 17:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[auto_scale_0 @ 0x7755a80139c0] w:iw h:ih flags:'' interl:0
[Parsed_scale_0 @ 0x7755a8003d80] auto-inserting filter 'auto_scale_0' between the filter 'graph -1 input from stream 0:0' and the filter 'Parsed_scale_0'
Impossible to convert between the formats supported by the filter 'graph -1 input from stream 0:0' and the filter 'auto_scale_0'
[libdav1d @ 0x635303eb9f40] Frame 19:  size 320x180  upscaled 320  render 320x180  subsample 2x2  bitdepth 10  tiles 1x1.
[vf#0:0 @ 0x635303eb9140] Error reinitializing filters!
[vf#0:0 @ 0x635303eb9140] Task finished with error code: -38 (Function not implemented)
[out#0/null @ 0x635303eba7c0] sq: 0 EOF
[out#0/null @ 0x635303eba7c0] sq: finish 0; head ts NOPTS
[out#0/null @ 0x635303eba7c0] sq: finish queue
[vf#0:0 @ 0x635303eb9140] Terminating thread with return code -38 (Function not implemented)
[vost#0:0/wrapped_avframe @ 0x635303eb8bc0] Encoder thread received EOF
[vost#0:0/wrapped_avframe @ 0x635303eb8bc0] Could not open encoder before EOF
[vost#0:0/wrapped_avframe @ 0x635303eb8bc0] Task finished with error code: -22 (Invalid argument)
[vost#0:0/wrapped_avframe @ 0x635303eb8bc0] Terminating thread with return code -22 (Invalid argument)
[vist#0:0/av1 @ 0x635303eba600] [dec:libdav1d @ 0x635303ebc240] Decoder returned EOF, finishing
[vist#0:0/av1 @ 0x635303eba600] [dec:libdav1d @ 0x635303ebc240] Terminating thread with return code 0 (success)
[vist#0:0/av1 @ 0x635303eba600] All consumers of this stream are done
[in#0/matroska,webm @ 0x635303eb4600] All consumers are done
[in#0/matroska,webm @ 0x635303eb4600] Terminating thread with return code 0 (success)
[out#0/null @ 0x635303eba7c0] 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 @ 0x635303eb4600] Input file #0 (in.mkv):
[in#0/matroska,webm @ 0x635303eb4600]   Input stream #0:0 (video): 20 packets read (5580 bytes); 7 frames decoded; 0 decode errors; 
[in#0/matroska,webm @ 0x635303eb4600]   Total: 20 packets (5580 bytes) demuxed
[AVIOContext @ 0x635303ebd1c0] Statistics: 32768 bytes read, 0 seeks
Conversion failed!

comment:7 by MasterQuestionable, 17 months ago

͏    Run the command as-is:
͏    "testsrc" is a valid filter.
͏    https://ffmpeg.org/ffmpeg-filters.html#testsrc

͏    Your modified command is effectively:
͏    ffmpeg -v debug -hide_banner -nostdin -nostats -i "in.mkv" -vframes 1 -vf "scale=1x1" -f null -

in reply to:  7 comment:8 by ffmpegScale, 17 months ago

Replying to MasterQuestionable:

͏    Run the command as-is:
͏    "testsrc" is a valid filter.
͏    https://ffmpeg.org/ffmpeg-filters.html#testsrc

Sorry, I thought it was a placeholder.

Here are the results:

Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-hide_banner' ... matched as option 'hide_banner' (do not show program banner) with argument '1'.
Reading option '-nostdin' ... matched as option 'stdin' (enable or disable interaction on standard input) with argument 0.
Reading option '-nostats' ... matched as option 'stats' (print progress report during encoding) with argument 0.
Reading option '-f' ... matched as option 'f' (force container format (auto-detected otherwise)) with argument 'lavfi'.
Reading option '-i' ... matched as input url with argument 'testsrc'.
Reading option '-vframes' ... matched as option 'vframes' (set the number of video frames to output) with argument '1'.
Reading option '-vf' ... matched as option 'vf' (alias for -filter:v (apply filters to video streams)) with argument 'scale=1x1'.
Reading option '-f' ... matched as option 'f' (force container format (auto-detected otherwise)) with argument 'null'.
Reading option '-' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option hide_banner (do not show program banner) with argument 1.
Applying option nostdin (enable or disable interaction on standard input) with argument 0.
Applying option nostats (print progress report during encoding) with argument 0.
Successfully parsed a group of options.
Parsing a group of options: input url testsrc.
Applying option f (force container format (auto-detected otherwise)) with argument lavfi.
Successfully parsed a group of options.
Opening an input file: testsrc.
detected 20 logical cores
[Parsed_testsrc_0 @ 0x55ff762fbb00] size:320x240 rate:25/1 duration:-1.000000 sar:1/1
[AVFilterGraph @ 0x55ff76343f40] query_formats: 2 queried, 3 merged, 0 already done, 0 delayed
[lavfi @ 0x55ff76343900] All info found
Input #0, lavfi, from 'testsrc':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0, 1, 1/25: Video: wrapped_avframe, 1 reference frame, rgb24, 320x240 [SAR 1:1 DAR 4:3], 0/1, 25 fps, 25 tbr, 25 tbn
Successfully opened the file.
Parsing a group of options: output url -.
Applying option vframes (set the number of video frames to output) with argument 1.
Applying option vf (alias for -filter:v (apply filters to video streams)) with argument scale=1x1.
Applying option f (force container format (auto-detected otherwise)) with argument null.
Successfully parsed a group of options.
Opening an output file: -.
[out#0/null @ 0x55ff763497c0] No explicit maps, mapping streams automatically...
[vost#0:0/wrapped_avframe @ 0x55ff76349f80] Created video stream from input stream 0:0
[AVFilterGraph @ 0x55ff7634a500] Setting 'w' to value '1x1'
[Parsed_scale_0 @ 0x55ff7634a700] w:1 h:1 flags:'' interl:0
Successfully opened the file.
Stream mapping:
  Stream #0:0 -> #0:0 (wrapped_avframe (native) -> wrapped_avframe (native))
[vost#0:0/wrapped_avframe @ 0x55ff76349f80] Starting thread...
[vf#0:0 @ 0x55ff7634a440] Starting thread...
[vist#0:0/wrapped_avframe @ 0x55ff76349640] [dec:wrapped_avframe @ 0x55ff7634ae00] Starting thread...
[in#0/lavfi @ 0x55ff76343640] Starting thread...
[AVFilterGraph @ 0x79961c001000] Setting 'w' to value '1x1'
[Parsed_scale_0 @ 0x79961c003d80] w:1 h:1 flags:'' interl:0
[graph -1 input from stream 0:0 @ 0x79961c011840] Setting 'video_size' to value '320x240'
[graph -1 input from stream 0:0 @ 0x79961c011840] Setting 'pix_fmt' to value '2'
[graph -1 input from stream 0:0 @ 0x79961c011840] Setting 'time_base' to value '1/25'
[graph -1 input from stream 0:0 @ 0x79961c011840] Setting 'pixel_aspect' to value '1/1'
[graph -1 input from stream 0:0 @ 0x79961c011840] Setting 'colorspace' to value '0'
[graph -1 input from stream 0:0 @ 0x79961c011840] Setting 'range' to value '2'
[graph -1 input from stream 0:0 @ 0x79961c011840] Setting 'frame_rate' to value '25/1'
[graph -1 input from stream 0:0 @ 0x79961c011840] w:320 h:240 pixfmt:rgb24 tb:1/25 fr:25/1 sar:1/1 csp:gbr range:pc
[AVFilterGraph @ 0x79961c001000] query_formats: 3 queried, 6 merged, 0 already done, 0 delayed
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c022f40] Forcing full internal H chroma due to odd output size
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c022f40] Forcing full internal H chroma due to input having non subsampled chroma
sws: initFilter failed
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c0c48c0] Forcing full internal H chroma due to odd output size
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c0c48c0] Forcing full internal H chroma due to input having non subsampled chroma
sws: initFilter failed
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c166500] Forcing full internal H chroma due to odd output size
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c166500] Forcing full internal H chroma due to input having non subsampled chroma
sws: initFilter failed
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c208140] Forcing full internal H chroma due to odd output size
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c208140] Forcing full internal H chroma due to input having non subsampled chroma
sws: initFilter failed
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c2a9d80] Forcing full internal H chroma due to odd output size
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c2a9d80] Forcing full internal H chroma due to input having non subsampled chroma
sws: initFilter failed
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c34b9c0] Forcing full internal H chroma due to odd output size
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c34b9c0] Forcing full internal H chroma due to input having non subsampled chroma
sws: initFilter failed
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c3ed600] Forcing full internal H chroma due to odd output size
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c3ed600] Forcing full internal H chroma due to input having non subsampled chroma
sws: initFilter failed
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c48f240] Forcing full internal H chroma due to odd output size
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c48f240] Forcing full internal H chroma due to input having non subsampled chroma
sws: initFilter failed
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c530e80] Forcing full internal H chroma due to odd output size
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c530e80] Forcing full internal H chroma due to input having non subsampled chroma
sws: initFilter failed
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c5d2ac0] Forcing full internal H chroma due to odd output size
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c5d2ac0] Forcing full internal H chroma due to input having non subsampled chroma
sws: initFilter failed
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c674700] Forcing full internal H chroma due to odd output size
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c674700] Forcing full internal H chroma due to input having non subsampled chroma
sws: initFilter failed
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c716340] Forcing full internal H chroma due to odd output size
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c716340] Forcing full internal H chroma due to input having non subsampled chroma
sws: initFilter failed
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c7b7f80] Forcing full internal H chroma due to odd output size
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c7b7f80] Forcing full internal H chroma due to input having non subsampled chroma
sws: initFilter failed
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c859bc0] Forcing full internal H chroma due to odd output size
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c859bc0] Forcing full internal H chroma due to input having non subsampled chroma
sws: initFilter failed
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c8fb800] Forcing full internal H chroma due to odd output size
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c8fb800] Forcing full internal H chroma due to input having non subsampled chroma
sws: initFilter failed
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c99d440] Forcing full internal H chroma due to odd output size
[swscaler @ 0x79961c013600] [swscaler @ 0x79961c99d440] Forcing full internal H chroma due to input having non subsampled chroma
sws: initFilter failed
[Parsed_scale_0 @ 0x79961c003d80] w:320 h:240 fmt:rgb24 csp:gbr range:pc sar:1/1 -> w:1 h:1 fmt:rgb24 csp:gbr range:pc sar:4/3 flags:0x00000004
[Parsed_scale_0 @ 0x79961c003d80] [framesync @ 0x79961c003ea8] Selected 1/25 time base
[Parsed_scale_0 @ 0x79961c003d80] [framesync @ 0x79961c003ea8] Sync level 1
[graph -1 input from stream 0:0 @ 0x79961c011840] video frame properties congruent with link at pts_time: 0
[wrapped_avframe @ 0x55ff76347500] ignoring invalid SAR: 4/3
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf61.7.100
  Stream #0:0, 0, 1/25: Video: wrapped_avframe, 1 reference frame, rgb24(pc, gbr/unknown/unknown, progressive), 1x1, 0/1, q=2-31, 200 kb/s, SAR 4:3 DAR 4:3, 25 fps, 25 tbn
      Metadata:
        encoder         : Lavc61.19.100 wrapped_avframe
[out#0/null @ 0x55ff763497c0] Starting thread...
[out#0/null @ 0x55ff763497c0] sq: send 0 ts 0.04
[out#0/null @ 0x55ff763497c0] sq: 0 frames_max 1 reached
[out#0/null @ 0x55ff763497c0] sq: finish 0; head ts 0.04
[out#0/null @ 0x55ff763497c0] sq: finish queue
[out#0/null @ 0x55ff763497c0] sq: receive 0 ts 0.04 queue head 0 ts 0.04
[vf#0:0 @ 0x55ff7634a440] All consumers returned EOF
[vost#0:0/wrapped_avframe @ 0x55ff76349f80] Encoder thread received EOF
[vost#0:0/wrapped_avframe @ 0x55ff76349f80] Terminating thread with return code 0 (success)
[out#0/null @ 0x55ff763497c0] All streams finished
[out#0/null @ 0x55ff763497c0] Terminating thread with return code 0 (success)
[out#0/null @ 0x55ff763497c0] sq: 0 EOF
[out#0/null @ 0x55ff763497c0] sq: finish queue
[vf#0:0 @ 0x55ff7634a440] Terminating thread with return code 0 (success)
[vist#0:0/wrapped_avframe @ 0x55ff76349640] [dec:wrapped_avframe @ 0x55ff7634ae00] Decoder returned EOF, finishing
[vist#0:0/wrapped_avframe @ 0x55ff76349640] [dec:wrapped_avframe @ 0x55ff7634ae00] Terminating thread with return code 0 (success)
[vist#0:0/wrapped_avframe @ 0x55ff76349640] All consumers of this stream are done
[in#0/lavfi @ 0x55ff76343640] All consumers are done
[in#0/lavfi @ 0x55ff76343640] Terminating thread with return code 0 (success)
[out#0/null @ 0x55ff763497c0] Output file #0 (pipe:):
[out#0/null @ 0x55ff763497c0]   Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (440 bytes); 
[out#0/null @ 0x55ff763497c0]   Total: 1 packets (440 bytes) muxed
[out#0/null @ 0x55ff763497c0] video:0KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown
frame=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=1.14x    
[in#0/lavfi @ 0x55ff76343640] Input file #0 (testsrc):
[in#0/lavfi @ 0x55ff76343640]   Input stream #0:0 (video): 19 packets read (8360 bytes); 10 frames decoded; 0 decode errors; 
[in#0/lavfi @ 0x55ff76343640]   Total: 19 packets (8360 bytes) demuxed
Last edited 17 months ago by ffmpegScale (previous) (diff)

comment:9 by MasterQuestionable, 17 months ago

͏    Please run my original command as-is:
͏    ffmpeg -v debug -hide_banner -nostdin -nostats -f lavfi -i "testsrc" -vframes 1 -vf "scale=1x1" -f null -
͏    .
͏    And edit comment:8 to replace the mostly duplicate output.
͏    (it's effectively duplicate as that in comment:6)

in reply to:  9 comment:10 by ffmpegScale, 17 months ago

Replying to MasterQuestionable:

͏    Please run my original command as-is:
͏    ffmpeg -v debug -hide_banner -nostdin -nostats -f lavfi -i "testsrc" -vframes 1 -vf "scale=1x1" -f null -
͏    .
͏    And edit comment:8 to replace the mostly duplicate output.
͏    (it's effectively duplicate as that in comment:6)

Done

comment:11 by MasterQuestionable, 17 months ago

Keywords: yuv420p10le added
Summary: AV1 frame extraction (screenshot) fails"swscale" "auto_scale" "yuv420p10le" "Function not implemented"?

͏    Judging from the commands output:
͏    The issue was triggered with "yuv420p10le" pixel format.

͏    Further test:
͏    ffmpeg -v debug -hide_banner -nostdin -nostats -f lavfi -i "testsrc,format=yuv420p10le" -vframes 1 -vf "scale=1x1" -f null -

comment:12 by ffmpegScale, 16 months ago

Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-hide_banner' ... matched as option 'hide_banner' (do not show program banner) with argument '1'.
Reading option '-nostdin' ... matched as option 'stdin' (enable or disable interaction on standard input) with argument 0.
Reading option '-nostats' ... matched as option 'stats' (print progress report during encoding) with argument 0.
Reading option '-f' ... matched as option 'f' (force container format (auto-detected otherwise)) with argument 'lavfi'.
Reading option '-i' ... matched as input url with argument 'testsrc,format=yuv420p10le'.
Reading option '-vframes' ... matched as option 'vframes' (set the number of video frames to output) with argument '1'.
Reading option '-vf' ... matched as option 'vf' (alias for -filter:v (apply filters to video streams)) with argument 'scale=1x1'.
Reading option '-f' ... matched as option 'f' (force container format (auto-detected otherwise)) with argument 'null'.
Reading option '-' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option hide_banner (do not show program banner) with argument 1.
Applying option nostdin (enable or disable interaction on standard input) with argument 0.
Applying option nostats (print progress report during encoding) with argument 0.
Successfully parsed a group of options.
Parsing a group of options: input url testsrc,format=yuv420p10le.
Applying option f (force container format (auto-detected otherwise)) with argument lavfi.
Successfully parsed a group of options.
Opening an input file: testsrc,format=yuv420p10le.
[AVFilterGraph @ 0x59d387109f40] Setting 'pix_fmts' to value 'yuv420p10le'
detected 20 logical cores
[Parsed_testsrc_0 @ 0x59d3870c1b00] size:320x240 rate:25/1 duration:-1.000000 sar:1/1
[auto_scale_0 @ 0x59d38710ea80] w:iw h:ih flags:'' interl:0
[Parsed_format_1 @ 0x59d38710d100] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_testsrc_0' and the filter 'Parsed_format_1'
[AVFilterGraph @ 0x59d387109f40] query_formats: 3 queried, 3 merged, 3 already done, 0 delayed
[auto_scale_0 @ 0x59d38710ea80] w:320 h:240 fmt:rgb24 csp:gbr range:pc sar:1/1 -> w:320 h:240 fmt:yuv420p10le csp:unknown range:unknown sar:1/1 flags:0x00000004
[auto_scale_0 @ 0x59d38710ea80] [framesync @ 0x59d38710eba8] Selected 1/25 time base
[auto_scale_0 @ 0x59d38710ea80] [framesync @ 0x59d38710eba8] Sync level 1
[lavfi @ 0x59d387109900] All info found
Input #0, lavfi, from 'testsrc,format=yuv420p10le':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0, 1, 1/25: Video: wrapped_avframe, 1 reference frame, yuv420p10le, 320x240 [SAR 1:1 DAR 4:3], 0/1, 25 fps, 25 tbr, 25 tbn
Successfully opened the file.
Parsing a group of options: output url -.
Applying option vframes (set the number of video frames to output) with argument 1.
Applying option vf (alias for -filter:v (apply filters to video streams)) with argument scale=1x1.
Applying option f (force container format (auto-detected otherwise)) with argument null.
Successfully parsed a group of options.
Opening an output file: -.
[out#0/null @ 0x59d38737aa00] No explicit maps, mapping streams automatically...
[vost#0:0/wrapped_avframe @ 0x59d38737b140] Created video stream from input stream 0:0
[AVFilterGraph @ 0x59d38737b780] Setting 'w' to value '1x1'
[Parsed_scale_0 @ 0x59d38737ba80] w:1 h:1 flags:'' interl:0
Successfully opened the file.
Stream mapping:
  Stream #0:0 -> #0:0 (wrapped_avframe (native) -> wrapped_avframe (native))
[vost#0:0/wrapped_avframe @ 0x59d38737b140] Starting thread...
[vf#0:0 @ 0x59d38737b6c0] Starting thread...
[vist#0:0/wrapped_avframe @ 0x59d38737a880] [dec:wrapped_avframe @ 0x59d38737c180] Starting thread...
[in#0/lavfi @ 0x59d387109640] Starting thread...
[AVFilterGraph @ 0x7898e4001000] Setting 'w' to value '1x1'
[Parsed_scale_0 @ 0x7898e4003d80] w:1 h:1 flags:'' interl:0
[graph -1 input from stream 0:0 @ 0x7898e4011840] Setting 'video_size' to value '320x240'
[graph -1 input from stream 0:0 @ 0x7898e4011840] Setting 'pix_fmt' to value '62'
[graph -1 input from stream 0:0 @ 0x7898e4011840] Setting 'time_base' to value '1/25'
[graph -1 input from stream 0:0 @ 0x7898e4011840] Setting 'pixel_aspect' to value '1/1'
[graph -1 input from stream 0:0 @ 0x7898e4011840] Setting 'colorspace' to value '2'
[graph -1 input from stream 0:0 @ 0x7898e4011840] Setting 'range' to value '0'
[graph -1 input from stream 0:0 @ 0x7898e4011840] Setting 'frame_rate' to value '25/1'
[graph -1 input from stream 0:0 @ 0x7898e4011840] w:320 h:240 pixfmt:yuv420p10le tb:1/25 fr:25/1 sar:1/1 csp:unknown range:unknown
[AVFilterGraph @ 0x7898e4001000] query_formats: 3 queried, 6 merged, 0 already done, 0 delayed
sws: initFilter failed
    Last message repeated 15 times
[Parsed_scale_0 @ 0x7898e4003d80] w:320 h:240 fmt:yuv420p10le csp:unknown range:unknown sar:1/1 -> w:1 h:1 fmt:yuv420p10le csp:unknown range:unknown sar:4/3 flags:0x00000004
[Parsed_scale_0 @ 0x7898e4003d80] [framesync @ 0x7898e4003ea8] Selected 1/25 time base
[Parsed_scale_0 @ 0x7898e4003d80] [framesync @ 0x7898e4003ea8] Sync level 1
[graph -1 input from stream 0:0 @ 0x7898e4011840] video frame properties congruent with link at pts_time: 0
[wrapped_avframe @ 0x59d38710da00] ignoring invalid SAR: 4/3
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf61.7.100
  Stream #0:0, 0, 1/25: Video: wrapped_avframe, 1 reference frame, yuv420p10le(progressive), 1x1, 0/1, q=2-31, 200 kb/s, SAR 4:3 DAR 4:3, 25 fps, 25 tbn
      Metadata:
        encoder         : Lavc61.19.100 wrapped_avframe
[out#0/null @ 0x59d38737aa00] Starting thread...
[out#0/null @ 0x59d38737aa00] sq: send 0 ts 0.04
[out#0/null @ 0x59d38737aa00] sq: 0 frames_max 1 reached
[out#0/null @ 0x59d38737aa00] sq: finish 0; head ts 0.04
[out#0/null @ 0x59d38737aa00] sq: finish queue
[out#0/null @ 0x59d38737aa00] sq: receive 0 ts 0.04 queue head 0 ts 0.04
[vf#0:0 @ 0x59d38737b6c0] All consumers returned EOF
[vost#0:0/wrapped_avframe @ 0x59d38737b140] Encoder thread received EOF
[vost#0:0/wrapped_avframe @ 0x59d38737b140] Terminating thread with return code 0 (success)
[out#0/null @ 0x59d38737aa00] All streams finished
[out#0/null @ 0x59d38737aa00] Terminating thread with return code 0 (success)
[in#0/lavfi @ 0x59d387109640] Terminating thread with return code 0 (success)
[out#0/null @ 0x59d38737aa00] sq: 0 EOF
[out#0/null @ 0x59d38737aa00] sq: finish queue
[vf#0:0 @ 0x59d38737b6c0] Terminating thread with return code 0 (success)
[vist#0:0/wrapped_avframe @ 0x59d38737a880] [dec:wrapped_avframe @ 0x59d38737c180] Decoder returned EOF, finishing
[vist#0:0/wrapped_avframe @ 0x59d38737a880] [dec:wrapped_avframe @ 0x59d38737c180] Terminating thread with return code 0 (success)
[out#0/null @ 0x59d38737aa00] Output file #0 (pipe:):
[out#0/null @ 0x59d38737aa00]   Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (440 bytes); 
[out#0/null @ 0x59d38737aa00]   Total: 1 packets (440 bytes) muxed
[out#0/null @ 0x59d38737aa00] video:0KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown
frame=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=5.88x    
[in#0/lavfi @ 0x59d387109640] Input file #0 (testsrc,format=yuv420p10le):
[in#0/lavfi @ 0x59d387109640]   Input stream #0:0 (video): 13 packets read (5720 bytes); 10 frames decoded; 0 decode errors; 
[in#0/lavfi @ 0x59d387109640]   Total: 13 packets (5720 bytes) demuxed

comment:13 by MasterQuestionable, 16 months ago

Keywords: ictcp color_primaries added; yuv420p10le removed
Summary: "swscale" "auto_scale" "yuv420p10le" "Function not implemented"?"ictcp" colorspace "Function not implemented" unnecessarily failed things
Version: unspecifiedgit-master

͏    Reproduced:
͏    ffmpeg -v debug -hide_banner -nostdin -nostats -f lavfi -i "sws_flags=+print_info; testsrc,format=yuv420p:ictcp" -vframes 1 -f null -

͏    The error source is the peculiar colorspace:
͏    https://trac.ffmpeg.org/wiki/colorspace#color_primaries

͏    Try ignore the input color primaries outright.
͏    (typically still gives acceptable output; or randomly pick some that give sensible enough output...)

͏    Maybe FFmpeg should just assume unknown color primaries and continue:
͏    Instead of such unnecessary critical failure.

comment:14 by ffmpegScale, 16 months ago

THX so much for helping to find the root cause.
Waited some time before reporting it, because my knowledge in ffmpeg is limited.
Maybe the behavior from before could be applied (as in v6 and earlier)

comment:15 by Balling, 16 months ago

About ictcp/bt709/bt709...

Technically ITU tested ICtCp only with PQ, primaries BT.2020. So I disagree you can do that.

Though even with SDR the CL, CI are imporoved. (Constant luminance, constant itensity.)

comment:16 by MasterQuestionable, 16 months ago

͏    An apparent example of the unnecessary complexity:
͏    Simply not being used in any sensible manner...
͏    (I believe past FFmpeg just ignored the handling; and user still deemed the output alright)

Note: See TracTickets for help on using tickets.