Opened 4 months ago
#11113 new defect
output option `-f ffmetadata` may stop the filter chain application
Reported by: | Hunter Hogan | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | ffmetadata |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
In some configurations, -f ffmetadata
as an output option will prevent the filter chain from being applied.
How to reproduce:
% ffmpeg -hide_banner -i test.wav -filter "astats=measure_perchannel=none:measure_overall=Entropy" -f ffmetadata -c pcm_f32le basic_no_map.ffmeta
But, -filter_complex
works:
ffmpeg -hide_banner -i test.wav -filter_complex "astats=measure_perchannel=none:measure_overall=Entropy" -f ffmetadata -c pcm_f32le complex_no_map.ffmeta
As does -f lavfi -i amovie=
:
ffmpeg -hide_banner -f lavfi -i "amovie=test.wav,astats=measure_perchannel=none:measure_overall=Entropy" -f ffmetadata -c pcm_f32le lavfi_no_map.ffmeta
But, this triad is different:
-filter
does not work:
ffmpeg -hide_banner -i test.wav -filter "astats=measure_perchannel=none:measure_overall=Entropy" -f ffmetadata basic_no_map_no_codec.ffmeta
And -filter_complex
gives an error:
ffmpeg -hide_banner -i test.wav -filter "astats=measure_perchannel=none:measure_overall=Entropy" -c pcm_f32le -f ffmetadata basic_codec_ffmetadata_map_null.ffmeta -map 0 -f null - [aost#0:0 @ 0000022a8a09aa40] Automatic encoder selection failed Default encoder for format ffmetadata (codec none) is probably disabled. Please choose an encoder manually.
But, -f lavfi -i amovie=
works correctly:
ffmpeg -hide_banner -f lavfi -i "amovie=test.wav,astats=measure_perchannel=none:measure_overall=Entropy" -f ffmetadata lavfi_no_map_no_codec.ffmeta
The same thing happens with aspectralstats
(stdout is empty):
ffmpeg -hide_banner -i test.wav -filter "aspectralstats=measure=mean,ametadata=print:file=-" -f ffmetadata -c pcm_f32le aspectralstats_basic_no_map.ffmeta
The same triad with signalstats
:
-filter
does not work:
ffmpeg -hide_banner -i test/testVideo11sec.mkv -filter "signalstats,metadata=print:file=-" -f ffmetadata signalstats_basic_no_map_no_codec.ffmeta
-filter_complex
gives an error:
ffmpeg -hide_banner -i test/testVideo11sec.mkv -filter_complex "signalstats,metadata=print:file=-" -f ffmetadata signalstats_complex_no_map_no_codec.ffmeta [vost#0:0 @ 000001c885cc8040] Automatic encoder selection failed Default encoder for format ffmetadata (codec none) is probably disabled. Please choose an encoder manually.
-f lavfi -i movie=
works:
ffmpeg -hide_banner -f lavfi -i "movie=test/testVideo11sec.mkv,signalstats,metadata=print:file=-" -f ffmetadata signalstats_lavfi_no_map_no_codec.ffmeta
The contents of the FFmetadata file sometimes correlates with success or failure.
Success: complex_no_map.ffmeta:
;FFMETADATA1 encoder=Lavf61.3.104 [STREAM] encoder=Lavc61.7.100 pcm_f32le [CHAPTER] TIMEBASE=1/48000 START=132003 END=302400 title=bike\\shed
Failure: basic_no_map.ffmeta:
;FFMETADATA1 encoder=Lavf61.3.104 [CHAPTER] TIMEBASE=1/48000 START=132003 END=302400 title=bike\\shed
Can also reproduce, at a minimum, with:
ffmpeg -hide_banner -i test.wav -filter "astats=measure_perchannel=none:measure_overall=Entropy" -c pcm_f32le -f ffmetadata basic_codec_ffmetadata_map_null.ffmeta -map 0 -f null - ffmpeg -hide_banner -i test.wav -filter "astats=measure_perchannel=none:measure_overall=Entropy" -c pcm_f32le -f ffmetadata basic_codec_map_null.ffmeta -map 0 -f null - ffmpeg -hide_banner -i test.wav -filter "astats=measure_perchannel=none:measure_overall=Entropy" -map 0 -f ffmetadata basic_map_no_codec.ffmeta ffmpeg -hide_banner -i test.wav -filter "astats=measure_perchannel=none:measure_overall=Entropy" -f ffmetadata basic_map_null.ffmeta -map 0 -f null - ffmpeg -hide_banner -i test.wav -filter "astats=measure_perchannel=none:measure_overall=Entropy" -c pcm_f32le -f ffmetadata basic_no_map_codec_first.ffmeta ffmpeg -hide_banner -i test.wav -filter "astats=measure_perchannel=none:measure_overall=Entropy" -f ffmetadata basic_no_map_no_codec.ffmeta
FFmpeg version:
ffmpeg version N-115666-gae00db87ca-g417957ec5e+3 Copyright (c) 2000-2024 the FFmpeg developers built with gcc 14.1.0 (Rev3, Built by MSYS2 project) configuration: --pkg-config=pkgconf --cc='ccache gcc' --cxx='ccache g++' --ld='ccache g++' --extra-cxxflags=-fpermissive --extra-cflags=-Wno-int-conversion --disable-autodetect --enable-amf --enable-bzlib --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-zlib --enable-sdl2 --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libdav1d --enable-libaom --disable-debug --enable-libfdk-aac --enable-fontconfig --enable-libass --enable-libfreetype --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libopenmpt --enable-version3 --enable-librav1e --enable-libsrt --enable-libgsm --enable-libvmaf --enable-libsvtav1 --enable-chromaprint libavutil 59. 21.100 / 59. 21.100 libavcodec 61. 7.100 / 61. 7.100 libavformat 61. 3.104 / 61. 3.104 libavdevice 61. 2.100 / 61. 2.100 libavfilter 10. 2.102 / 10. 2.102 libswscale 8. 2.100 / 8. 2.100 libswresample 5. 2.100 / 5. 2.100 libpostproc 58. 2.100 / 58. 2.100
FFreport logs for many examples