ffmpeg-tv
ffmpeg-tv copied to clipboard
map argument is allowed only once
ffmpeg takes multiple "map" arguments, one for each output stream, like
ffmpeg \
-i in.mkv \
-map 0:v:0 \
-map 0:a:0 \
-map 0:a:1 \
-map 0:s:0 \
out.mkv
ffmpeg-tv.py allows only one "map" argument. fix:
# line 90
#map="0"
map=[] # empty list
# line 150
#if (args.map):
# ffmpeg_query += ['-map', args.map]
for m in args.map:
ffmpeg_query += ['-map', m]
so we can use
ffmpeg-tv.py -m 0:v:0 -m 0:a:0 -m 0:a:1 -m 0:s:0 in.mkv out.mkv
the default case of "-map 0" will simply use all input streams
to list input streams we can use
ffprobe in.mkv -v error -of flat \
-show_entries stream=index,codec_type,width,height:stream_tags=language
streams.stream.0.index=0
streams.stream.0.codec_type="video"
streams.stream.0.width=720
streams.stream.0.height=404
streams.stream.1.index=1
streams.stream.1.codec_type="audio"
streams.stream.1.tags.language="ger"
streams.stream.2.index=2
streams.stream.2.codec_type="audio"
streams.stream.2.tags.language="eng"
streams.stream.3.index=3
streams.stream.3.codec_type="subtitle"
streams.stream.3.width="N/A"
streams.stream.3.height="N/A"
streams.stream.3.tags.language="ger"
streams.stream.4.index=4
streams.stream.4.codec_type="subtitle"
streams.stream.4.width=1920
streams.stream.4.height=1080
streams.stream.4.tags.language="ger"