[FFmpeg-user] Subtitle metadata
Peter van den Houten
petervdh at gmail.com
Thu May 14 19:52:37 EEST 2020
On 12/05/2020 17:29, Peter van den Houten wrote:
> Hi, I'm seeing a change in the way FFmpeg handles metadata options, particularly for subtitles. I can't say when and which version cause it to change.
>
> FFmpeg now appears to ignore the "-disposition:s:s:0 none" option which I would previously use to copy but not display subtitles by default:
>
> ~/temp$ ffmpeg -i in.mkv -c copy -metadata:s:v:0 title="" -metadata:s:v:0 language=eng -disposition:s:v:0 default -metadata:s:a:0 title="" -metadata:s:a:0 language=eng -disposition:s:a:0 default -metadata:s:s:0 title="" -metadata:s:s:0 language=eng -disposition:s:s:0 none -y out.mkv
>
> ffmpeg version N-97747-gffae62d96c Copyright (c) 2000-2020 the FFmpeg developers
> built with gcc 9 (Debian 9.2.1-30)
> configuration: --enable-ffplay --enable-ffprobe --enable-filters --enable-gpl --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-nonfree
> libavutil 56. 45.100 / 56. 45.100
> libavcodec 58. 84.100 / 58. 84.100
> libavformat 58. 43.100 / 58. 43.100
> libavdevice 58. 9.103 / 58. 9.103
> libavfilter 7. 80.100 / 7. 80.100
> libavresample 4. 0. 0 / 4. 0. 0
> libswscale 5. 6.101 / 5. 6.101
> libswresample 3. 6.100 / 3. 6.100
> libpostproc 55. 6.100 / 55. 6.100
> Input #0, matroska,webm, from 'in.mkv':
> Metadata:
> ENCODER : Lavf58.43.100
> Duration: 00:21:53.43, start: 0.000000, bitrate: 964 kb/s
> Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709/unknown/unknown, progressive), 720x404 [SAR 404:405 DAR 16:9], SAR 254:255 DAR 3048:1717, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
> Metadata:
> DURATION : 00:21:53.362000000
> Stream #0:1(eng): Audio: aac (LC), 44100 Hz, stereo, fltp (default)
> Metadata:
> DURATION : 00:21:53.434000000
> Stream #0:2(eng): Subtitle: subrip (default)
> Metadata:
> ENCODER : Lavc58.84.100 subrip
> DURATION : 00:21:20.002000000
> Output #0, matroska, to 'out.mkv':
> Metadata:
> encoder : Lavf58.43.100
> Stream #0:0(eng): Video: h264 (High) (H264 / 0x34363248), yuv420p(tv, bt709/unknown/unknown, progressive), 720x404 [SAR 254:255 DAR 3048:1717], q=2-31, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default)
> Metadata:
> DURATION : 00:21:53.362000000
> Stream #0:1(eng): Audio: aac (LC) ([255][0][0][0] / 0x00FF), 44100 Hz, stereo, fltp (default)
> Metadata:
> DURATION : 00:21:53.434000000
> Stream #0:2(eng): Subtitle: subrip
> Metadata:
> DURATION : 00:21:20.002000000
> ENCODER : Lavc58.84.100 subrip
> Stream mapping:
> Stream #0:0 -> #0:0 (copy)
> Stream #0:1 -> #0:1 (copy)
> Stream #0:2 -> #0:2 (copy)
> Press [q] to stop, [?] for help
> frame=31487 fps=0.0 q=-1.0 Lsize= 154617kB time=00:21:53.41 bitrate= 964.4kbits/s speed=1.65e+03x
> video:133441kB audio:20523kB subtitle:15kB other streams:0kB global headers:0kB muxing overhead: 0.414239%
>
>
>
If anyone is interested, I'm using MKVMERGE to set subtitles off by default until the FFMPEG multiplexer code is fixed (or someone can point out if/how formatting has changed).
The "--default-track 2:0" option sets track 2 (subs) to 0/none/off:
for f in *; do mkvmerge -o ~/temp/subs_off/$f --default-track 2:0 $f; done
More information about the ffmpeg-user
mailing list