[FFmpeg-user] MP4 with 9 subtitle streams

Mark Filipak markfilipak.imdb at gmail.com
Sat Sep 23 04:26:55 EEST 2023


Why doesn't this work? I made an MP4 with 9 subtitle streams via
HandBrake. I think ffmpeg and HandBrake use the same libraries. I need
to use ffmpeg. I'm grateful for any help.

Thanks!
Mark.

ffmpeg -i c:\test\foo1.mkv -i c:\test\sub1.srt -i c:\test\sub2.srt -i
c:\test\sub3.srt -i c:\test\sub4.srt -i c:\test\sub5.srt -i
c:\test\sub6.srt -i c:\test\sub7.srt -i c:\test\sub8.srt -i
c:\test\sub9.srt -map 0:v -codec:v copy -map 0:a -codec:a copy -map 1
-map 2 -map 3 -map 4 -map 5 -map 6 -map 7 -map 8 -map 9 -codec:s
subrip c:\test\foo.mp4 -y
ffmpeg version 2023-08-10-git-d9d5695390-full_build-www.gyan.dev
Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static
--disable-w32threads --disable-autodetect --enable-fontconfig
--enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp
--enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib
--enable-librist --enable-libsrt --enable-libssh --enable-libzmq
--enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2
--enable-libaribb24 --enable-libaribcaption --enable-libdav1d
--enable-libdavs2 --enable-libuavs3d --enable-libzvbi
--enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom
--enable-libjxl --enable-libopenjpeg --enable-libvpx
--enable-mediafoundation --enable-libass --enable-frei0r
--enable-libfreetype --enable-libfribidi --enable-libharfbuzz
--enable-liblensfun --enable-libvidstab --enable-libvmaf
--enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid
--enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va
--enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan
--enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme
--enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb
--enable-libmp3lame --enable-libshine --enable-libtheora
--enable-libtwolame --enable-libvo-amrwbenc--enable-libcodec2
--enable-libilbc --enable-libgsm --enable-libopencore-amrnb
--enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa
--enable-libbs2b --enable-libflite --enable-libmysofa
--enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      58. 16.101 / 58. 16.101
  libavcodec     60. 23.100 / 60. 23.100
  libavformat    60. 10.100 / 60. 10.100
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 10.100 /  9. 10.100
  libswscale      7.  3.100 /  7.  3.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
Input #0, matroska,webm, from 'c:\test\foo1.mkv':
  Metadata:
    ENCODER         : Lavf60.10.100
  Duration: 00:18:12.06, start: 0.000000, bitrate: 8027 kb/s
  Stream #0:0: Video: hevc (Main), yuv420p(tv, progressive), 1920x1080
[SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn
    Metadata:
      ENCODER         : Lavc60.23.100 libx265
      DURATION        : 00:18:12.049000000
  Stream #0:1: Audio: dts (DTS-HD MA), 48000 Hz, 7.1, s32p (24 bit) (default)
    Metadata:
      DURATION        : 00:18:12.053000000
  Stream #0:2: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
    Metadata:
      DURATION        : 00:18:12.064000000
  Stream #0:3: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
    Metadata:
      DURATION        : 00:18:12.064000000
  Stream #0:4: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
    Metadata:
      DURATION        : 00:18:12.064000000
  Stream #0:5: Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s
    Metadata:
      DURATION        : 00:18:12.064000000
  Stream #0:6: Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s
    Metadata:
      DURATION        : 00:18:12.064000000
Input #1, srt, from 'c:\test\sub1.srt':
  Duration: N/A, bitrate: N/A
  Stream #1:0: Subtitle: subrip
Input #2, srt, from 'c:\test\sub2.srt':
  Duration: N/A, bitrate: N/A
  Stream #2:0: Subtitle: subrip
Input #3, srt, from 'c:\test\sub3.srt':
  Duration: N/A, bitrate: N/A
  Stream #3:0: Subtitle: subrip
Input #4, srt, from 'c:\test\sub4.srt':
  Duration: N/A, bitrate: N/A
  Stream #4:0: Subtitle: subrip
Input #5, srt, from 'c:\test\sub5.srt':
  Duration: N/A, bitrate: N/A
  Stream #5:0: Subtitle: subrip
Input #6, srt, from 'c:\test\sub6.srt':
  Duration: N/A, bitrate: N/A
  Stream #6:0: Subtitle: subrip
Input #7, srt, from 'c:\test\sub7.srt':
  Duration: N/A, bitrate: N/A
  Stream #7:0: Subtitle: subrip
Input #8, srt, from 'c:\test\sub8.srt':
  Duration: N/A, bitrate: N/A
  Stream #8:0: Subtitle: subrip
Input #9, srt, from 'c:\test\sub9.srt':
  Duration: N/A, bitrate: N/A
  Stream #9:0: Subtitle: subrip
[mp4 @ 0000000002b2e040] track 1: codec frame size is not set
[mp4 @ 0000000002b2e040] track 2: codec frame size is not set
[mp4 @ 0000000002b2e040] track 3: codec frame size is not set
[mp4 @ 0000000002b2e040] track 4: codec frame size is not set
[mp4 @ 0000000002b2e040] track 5: codec frame size is not set
[mp4 @ 0000000002b2e040] track 6: codec frame size is not set
[mp4 @ 0000000002b2e040] Could not find tag for codec subrip in stream
#7, codec not currently supported in container
[out#0/mp4 @ 0000000000667a80] Could not write header (incorrect codec
parameters ?): Invalid argument
Error opening output file c:\test\foo.mp4.
Error opening output files: Invalid argument


More information about the ffmpeg-user mailing list