Opened 15 months ago

Last modified 15 months ago

#10131 new defect

Cannot use tee muxer with libsvtav1

Reported by: Joe Amenta Owned by:
Priority: normal Component: undetermined
Version: 5.1.2 Keywords: tee libsvtav1 muxer
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

I originally found this with a much more complicated command-line (i.e., one that makes more interesting use of the tee muxer), but I've reduced it down to this.

When I send a libsvtav1 encoded stream directly to an output file, ffmpeg consistently processes it as expected. See attached FFREPORT log file 'CODEC:libsvtav1_OUTPUT:file_SUCCESS.log'

When I send a libvpx-vp9 encoded stream through the tee muxer, ffmpeg consistently processes it as expected. See attached FFREPORT log file 'CODEC:libvpx-vp9_OUTPUT:tee_SUCCESS.log'

When I put the two together and try to send a libsvtav1 encoded stream through the tee muxer, ffmpeg consistently reports error 'av_interleaved_write_frame(): Invalid data found when processing input' and terminates immediately. See attached FFREPORT log file 'CODEC:libsvtav1_OUTPUT:tee_FAILURE.log'

How to reproduce:

% ffmpeg -f x11grab -video_size 2560x1440 -framerate 25 -i $DISPLAY -r 25 -c:v libsvtav1 -preset 7 -crf 30 -map 0 -f tee '[select=v]test.mkv' 
ffmpeg started on 2023-01-03 at 09:19:45
Report written to "ffmpeg-20230103-091945.log"
Log level: 48
ffmpeg version n5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
[x11grab @ 0x56127ddf2c40] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, x11grab, from ':0':
  Duration: N/A, start: 1672755585.723029, bitrate: 2949120 kb/s
  Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 2560x1440, 2949120 kb/s, 25 fps, 1000k tbr, 1000k tbn
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> av1 (libsvtav1))
Press [q] to stop, [?] for help
Svt[info]: -------------------------------------------
Svt[info]: SVT [version]:	SVT-AV1 Encoder Lib v1.4.1-dirty
Svt[info]: SVT [build]  :	GCC 12.2.0	 64 bit
Svt[info]: LIB Build date: Dec 14 2022 06:04:17
Svt[info]: -------------------------------------------
Svt[info]: Number of logical cores available: 24
Svt[info]: Number of PPCS 88
Svt[info]: [asm level on system : up to avx2]
Svt[info]: [asm level selected : up to avx2]
Svt[info]: -------------------------------------------
Svt[info]: SVT [config]: main profile	tier (auto)	level (auto)
Svt[info]: SVT [config]: width / height / fps numerator / fps denominator 		: 2560 / 1440 / 25 / 1
Svt[info]: SVT [config]: bit-depth / color format 					: 8 / YUV420
Svt[info]: SVT [config]: preset / tune / pred struct 					: 7 / PSNR / random access
Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type 			: 161 / 16 / key frame
Svt[info]: SVT [config]: BRC mode / rate factor 					: CRF / 30 
Svt[info]: -------------------------------------------
SvtMalloc[info]: SVT Memory Usage:
SvtMalloc[info]:     total allocated memory:       4.99 GB
SvtMalloc[info]:         malloced memory:          1006.59 MB
SvtMalloc[info]:         callocated memory:        355.63 MB
SvtMalloc[info]:         allocated aligned memory: 3.66 GB
SvtMalloc[info]:     mutex count: 20173
SvtMalloc[info]:     semaphore count: 2992
SvtMalloc[info]:     thread count: 752
SvtMalloc[info]:     hash table fulless: 0.183174, hash bucket is healthy
SvtMalloc[info]: top 10 malloced memory locations:
SvtMalloc[info]: (313.89 MB): /build/svt-av1/src/SVT-AV1/Source/Lib/Encoder/Codec/EbCodingUnit.c:121
SvtMalloc[info]: (126.78 MB): /build/svt-av1/src/SVT-AV1/Source/Lib/Encoder/Codec/EbPictureControlSet.c:124
SvtMalloc[info]: (91.58 MB): /build/svt-av1/src/SVT-AV1/Source/Lib/Common/Codec/EbBitstreamUnit.c:36
SvtMalloc[info]: (84.05 MB): /build/svt-av1/src/SVT-AV1/Source/Lib/Encoder/Codec/EbPictureControlSet.c:1586
SvtMalloc[info]: (82.41 MB): /build/svt-av1/src/SVT-AV1/Source/Lib/Encoder/Codec/EbPictureControlSet.c:125
SvtMalloc[info]: (53.31 MB): /build/svt-av1/src/SVT-AV1/Source/Lib/Encoder/Codec/EbModeDecisionProcess.c:215
SvtMalloc[info]: (46.69 MB): /build/svt-av1/src/SVT-AV1/Source/Lib/Encoder/Codec/EbPictureControlSet.c:1590
SvtMalloc[info]: (35.94 MB): /build/svt-av1/src/SVT-AV1/Source/Lib/Encoder/Codec/EbPictureControlSet.c:1201
SvtMalloc[info]: (28.75 MB): /build/svt-av1/src/SVT-AV1/Source/Lib/Encoder/Codec/EbPictureControlSet.c:1178
SvtMalloc[info]: (17.97 MB): /build/svt-av1/src/SVT-AV1/Source/Lib/Encoder/Codec/EbPictureControlSet.c:1174
Output #0, tee, to '[select=v]test.mkv':
  Metadata:
    encoder         : Lavf59.27.100
  Stream #0:0: Video: av1, yuv420p(tv, progressive), 2560x1440, q=2-31, 25 fps, 25 tbn
    Metadata:
      encoder         : Lavc59.37.100 libsvtav1
[tee @ 0x56127ddfe800] All tee outputs failed.00.00 bitrate=N/A dup=16 drop=14 speed=   0x    
av_interleaved_write_frame(): Invalid data found when processing input
frame=   77 fps= 19 q=25.0 Lsize=N/A time=00:00:03.08 bitrate=N/A dup=16 drop=14 speed=0.743x    
video:282kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
SvtMalloc[info]: you have no memory leak
Conversion failed!

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Attachments (3)

CODEC:libsvtav1_OUTPUT:file_SUCCESS.log (133.6 KB ) - added by Joe Amenta 15 months ago.
CODEC:libvpx-vp9_OUTPUT:tee_SUCCESS.log (117.4 KB ) - added by Joe Amenta 15 months ago.
CODEC:libsvtav1_OUTPUT:tee_FAILURE.log (20.9 KB ) - added by Joe Amenta 15 months ago.

Download all attachments as: .zip

Change History (4)

by Joe Amenta, 15 months ago

comment:1 by Joe Amenta, 15 months ago

Summary: Cannot use tee pseudo-muxer with libsvtav1Cannot use tee muxer with libsvtav1
Note: See TracTickets for help on using tickets.