[FFmpeg-trac] #11248(ffmpeg:new): mapping of optional streams selected by language broken
FFmpeg
trac at avcodec.org
Wed Oct 16 15:10:29 EEST 2024
#11248: mapping of optional streams selected by language broken
--------------------------------+--------------------------------------
Reporter: Jakob | Type: defect
Status: new | Priority: normal
Component: ffmpeg | Version: git-master
Keywords: map | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
--------------------------------+--------------------------------------
Summary of the bug:
I used to use `-map 0:s:m:language:eng?` to map only english subtitles
into the output, but don't fail if there is no such subtitle. This worked
fine until I updated ffmpeg to the latest version (#9601 also suggests
that this used to work).
Using either `-map 0:s:0?` or `-map 0:s:m:language:eng`, i.e. optional map
by number or mandatory map by language, works as expected.
How to reproduce:
{{{
% ffmpeg -i 0.mkv -c copy -map '0:s:m:language:eng?' out.srt
ffmpeg version N-117538-g9ce63e65d6-20241015 Copyright (c) 2000-2024 the
FFmpeg developers
built with gcc 14.2.0 (crosstool-NG 1.26.0.120_4d36f27)
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static
--pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu-
--arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-
debug --enable-iconv --enable-zlib --enable-libfreetype --enable-
libfribidi --enable-gmp --enable-libxml2 --enable-openssl --enable-lzma
--enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-
opencl --enable-libpulse --enable-libvmaf --enable-libxcb --enable-xlib
--enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth
--enable-chromaprint --enable-libdav1d --enable-libdavs2 --enable-
libdvdread --enable-libdvdnav --disable-libfdk-aac --enable-ffnvcodec
--enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar
--enable-libaribcaption --enable-libass --enable-libbluray --enable-libjxl
--enable-libmp3lame --enable-libopus --enable-librist --enable-libssh
--enable-libtheora --enable-libvpx --enable-libwebp --enable-libzmq
--enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg
--enable-libopenmpt --enable-librav1e --enable-librubberband --disable-
schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1
--enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi
--enable-libvidstab --enable-vulkan --enable-libshaderc --enable-
libplacebo --enable-libvvenc --enable-libx264 --enable-libx265 --enable-
libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-
cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-libs='-ldl -lgomp'
--extra-ldflags=-pthread --extra-ldexeflags=-pie --cc=x86_64-ffbuild-
linux-gnu-gcc --cxx=x86_64-ffbuild-linux-gnu-g++ --ar=x86_64-ffbuild-
linux-gnu-gcc-ar --ranlib=x86_64-ffbuild-linux-gnu-gcc-ranlib --nm=x86_64
-ffbuild-linux-gnu-gcc-nm --extra-version=20241015
libavutil 59. 43.100 / 59. 43.100
libavcodec 61. 22.100 / 61. 22.100
libavformat 61. 9.100 / 61. 9.100
libavdevice 61. 4.100 / 61. 4.100
libavfilter 10. 6.100 / 10. 6.100
libswscale 8. 6.100 / 8. 6.100
libswresample 5. 4.100 / 5. 4.100
libpostproc 58. 4.100 / 58. 4.100
Input #0, matroska,webm, from '0.mkv':
[... listing of all input streams ...]
Stream map '' matches no streams.
To ignore this, add a trailing '?' to the map.
Failed to set value '0:a:m:language:eng?' for option 'map': Invalid
argument
Error parsing options for output file out.mkv.
Error opening output files: Invalid argument
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11248>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list