[FFmpeg-user] keeping two subtitle streams

Jim Worrall coniophora at gmail.com
Wed Apr 27 16:40:20 CEST 2011


I'm converting a .mkv to .m2ts and having subtitle trouble.  The source .mkv has both English and Chinese subtitles and I would like to keep both.  ffmpeg seems to recognize both in the source file, but is only making one subtitle stream in the output.  I tried -scodec copy 2x but didn't make a difference.  Doesn't seem to be a mapping issue since there is only one subtitle stream in the output.  Would appreciate a pointer on how to specify that I want two subtitle streams.  
Thank you!

ffmpeg -y -i 01.mkv -f mpegts \
> -vcodec libx264 -s hd720 -r 23.976 -b 1800K -vbsf h264_mp4toannexb \
> -acodec ac3 -ab 640K -ar 48K \
> -scodec copy \
> 01.m2ts
FFmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers
  built on Apr 21 2011 18:00:17 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
  configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --arch=x86_64 --enable-runtime-cpudetect
  libavutil    51.  0. 0 / 51.  0. 0
  libavcodec   53.  0. 0 / 53.  0. 0
  libavformat  53.  0. 0 / 53.  0. 0
  libavdevice  53.  0. 0 / 53.  0. 0
  libavfilter   2.  0. 0 /  2.  0. 0
  libswscale    0. 13. 0 /  0. 13. 0
[matroska,webm @ 0x101812400] max_analyze_duration reached
[matroska,webm @ 0x101812400] Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 47.95 (5000000/104271) -> 23.98 (24000/1001)
Input #0, matroska,webm, from '01.mkv':
  Duration: 00:42:43.58, start: 0.000000, bitrate: N/A
    Stream #0.0(eng): Video: h264 (High), yuv420p, 1024x576, PAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0.1(eng): Audio: aac, 48000 Hz, 5.1, s16 (default)
    Stream #0.2(chi): Subtitle: [0][0][0][0] / 0x0000 (default)
    Stream #0.3(eng): Subtitle: [0][0][0][0] / 0x0000
[buffer @ 0x101306040] w:1024 h:576 pixfmt:yuv420p
[scale @ 0x10132feb0] w:1024 h:576 fmt:yuv420p -> w:1280 h:720 fmt:yuv420p flags:0x4
[libx264 @ 0x1019a2600] Default settings detected, using medium profile
[libx264 @ 0x1019a2600] using SAR=1/1
[libx264 @ 0x1019a2600] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x1019a2600] profile High, level 3.1
[mpegts @ 0x10185a200] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to '01.m2ts':
  Metadata:
    encoder         : Lavf53.0.0
    Stream #0.0(eng): Video: libx264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], q=2-31, 1800 kb/s, 90k tbn, 23.98 tbc (default)
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s (default)
    Stream #0.2(eng): Subtitle: [0][0][0][0] / 0x0000
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
  Stream #0.3 -> #0.2



More information about the ffmpeg-user mailing list