[FFmpeg-user] Subtitle track command consolidation
Robert Schwalbe
dev-null at inode.com
Sun Feb 16 22:11:58 EET 2025
Greetings!
Have mercy ...
I have one input file that contains a single video track and two
audio tracks. I discard the unwanted audio
track with the following command:
ffmpeg -i input.mp4 -map 0:v -map 0:a:1 -c copy tmp.mp4
From an input file containing one subtitle track, I add the subtitle
with the following command:
ffmpeg -i tmp.mp4 -i input.srt -c copy -c:s mov_text
-metadata:s:s:0 language=eng output.mp4
Is there a way to consolidate these two commands into a single
command? In particular, adding in the
subtitle. I am using "ffmpeg version 4.4.5".
If you are so inclined, I would be more than amenable to criticisms
as to how I am going about my business. I
constantly strive for best practices but after a lot of trial and
error I just settled upon the above.
Seems I can do better.
With sincere appreciation and gratitude for this list. Thank you.
More information about the ffmpeg-user
mailing list