[FFmpeg-user] How to copy all of 5 audio streams to mp4 file

Ulf Zibis Ulf.Zibis at gmx.de
Mon Feb 18 23:27:35 EET 2019


Hi Moritz,

Am 18.02.19 um 22:02 schrieb Moritz Barsnick:
> On Mon, Feb 18, 2019 at 21:13:29 +0100, Ulf Zibis wrote:
>> over 6 GB memory, so my machine heavily swapped
> Probably okay if you reduce the -probesize and -analyzeduration to fit
> your file. Sorry, it's a bit hit and miss.

Yes, it was enough to set -analyzeduration to 15 min.(the input vob
chunks vary between 3 to 12 min.).

> Exactly as Ted said (and I had forgotten). There are basically two
> classes of subtitle streams: text and bitmap. ffmpeg cannot
> convert/encode the latter to the former. The format mp4 does not
> support any type of bitmap subtitles (to my knowledge), so you either
> need a different tool to convert them to text (which is tedious), or
> select a different output container. Matroska should be able to carry
> them.

Thanks! I tried Matroska. Only a little nit seems to be missing. Another
idea? :
$ ffmpeg -probesize 9223372036854775807 -analyzeduration 900000000 -i
"concat:002-C001/VLuN-001.vob|002-C002/VLuN-001.vob|002-C003/VLuN-001.vob|002-C004/VLuN-001.vob|002-C005/VLuN-001.vob|002-C006/VLuN-001.vob|002-C007/VLuN-001.vob|002-C008/VLuN-001.vob|002-C009/VLuN-001.vob|002-C010/VLuN-001.vob|002-C011/VLuN-001.vob|002-C012/VLuN-001.vob|002-C013/VLuN-001.vob|002-C014/VLuN-001.vob|002-C015/VLuN-001.vob|002-C016/VLuN-001.vob"
-map 0 -vf crop=720:552 -c:v libx264 -c:a copy -t 06:00 -movflags
+faststart /media/Sicherung/Filme/VLuN/ffmpeg/002/VLuN_6m.mkv
ffmpeg version 4.1-static https://johnvansickle.com/ffmpeg/  Copyright
(c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
[.....]
Input #0, mpeg, from
'concat:002-C001/VLuN-001.vob|002-C002/VLuN-001.vob|002-C003/VLuN-001.vob|002-C004/VLuN-001.vob|002-C005/VLuN-001.vob|002-C006/VLuN-001.vob|002-C007/VLuN-001.vob|002-C008/VLuN-001.vob|002-C009/VLuN-001.vob|002-C010/VLuN-001.vob|002-C011/VLuN-001.vob|002-C012/VLuN-001.vob|002-C013/VLuN-001.vob|002-C014/VLuN-001.vob|002-C015/VLuN-001.vob|002-C016/VLuN-001.vob':
  Duration: 01:46:25.22, start: 0.280000, bitrate: 7663 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top
first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:2[0x81]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:3[0x82]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:4[0x83]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:5[0x84]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:6[0x26]: Subtitle: dvd_subtitle
    Stream #0:7[0x20]: Subtitle: dvd_subtitle
    Stream #0:8[0x21]: Subtitle: dvd_subtitle
    Stream #0:9[0x22]: Subtitle: dvd_subtitle
    Stream #0:10[0x24]: Subtitle: dvd_subtitle
    Stream #0:11[0x25]: Subtitle: dvd_subtitle
    Stream #0:12[0x27]: Subtitle: dvd_subtitle
    Stream #0:13[0x28]: Subtitle: dvd_subtitle
    Stream #0:14[0x29]: Subtitle: dvd_subtitle
    Stream #0:15[0x2a]: Subtitle: dvd_subtitle
    Stream #0:16[0x2b]: Subtitle: dvd_subtitle
    Stream #0:17[0x2c]: Subtitle: dvd_subtitle
    Stream #0:18[0x23]: Subtitle: dvd_subtitle
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (copy)
  Stream #0:3 -> #0:3 (copy)
  Stream #0:4 -> #0:4 (copy)
  Stream #0:5 -> #0:5 (copy)
  Stream #0:6 -> #0:6 (dvd_subtitle (dvdsub) -> ass (ssa))
  Stream #0:7 -> #0:7 (dvd_subtitle (dvdsub) -> ass (ssa))
  Stream #0:8 -> #0:8 (dvd_subtitle (dvdsub) -> ass (ssa))
  Stream #0:9 -> #0:9 (dvd_subtitle (dvdsub) -> ass (ssa))
  Stream #0:10 -> #0:10 (dvd_subtitle (dvdsub) -> ass (ssa))
  Stream #0:11 -> #0:11 (dvd_subtitle (dvdsub) -> ass (ssa))
  Stream #0:12 -> #0:12 (dvd_subtitle (dvdsub) -> ass (ssa))
  Stream #0:13 -> #0:13 (dvd_subtitle (dvdsub) -> ass (ssa))
  Stream #0:14 -> #0:14 (dvd_subtitle (dvdsub) -> ass (ssa))
  Stream #0:15 -> #0:15 (dvd_subtitle (dvdsub) -> ass (ssa))
  Stream #0:16 -> #0:16 (dvd_subtitle (dvdsub) -> ass (ssa))
  Stream #0:17 -> #0:17 (dvd_subtitle (dvdsub) -> ass (ssa))
  Stream #0:18 -> #0:18 (dvd_subtitle (dvdsub) -> ass (ssa))
Subtitle encoding currently only possible from text to text or bitmap to
bitmap

> What's in these files? Are they really text? (I hadn't heard of srtx so
> far.)
Yes, they are really text. Seem to be an intermediate data file for
dvd::rip. I guess, they record the timestamps for the bitmap subtitles.


More information about the ffmpeg-user mailing list