Today, we show how to copy video, audio, subtitles, data, chapters streams between videos! All parameters can be customized to your own needs so that you can extract and transfer any streams from 1 video to another. Enjoy!
In our examples below, we will be using the following sample files containing the following streams:
file ""input_new.mkv"" containing:
Stream 0. (v)ideo: Grey colored
Stream 1. (a)udio: Beeping sound
Stream 2. (s)ubtitle: Spanish
Stream 3. (s)ubtitle: French
file ""input_old.mkv"" containing:
Stream 0. (v)ideo: Sepia colored
Stream 1. (a)udio: Music
Stream 2. (s)ubtitle: English
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
EXAMPLES
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
❶ Replaces the original audio, keeps the original video, keeps the original subtitles, addressing the streams per types (audio, video, …)
→ ffmpeg -i input_new.mkv -i input_old.mkv -map 0:v:0 -map 1:a:0 -map 0:s output01.mkv
with:
-i input_new.mkv = Reads file «input_new.mkv» and …
-i input_old.mkv = … file «input_old.mkv»…
-map 0:v:0 = … copying from the 1st (0) input file (i.e. input_new.mkv): the 1st (0) video (v) stream, …
-map 1:a:0 = … from the 2nd (1) input file (i.e. input_old.mkv): the 1st (0) audio (a) stream …
-map 0:s = … and from the first (0) input file (i.e. input_new.mkv): all the subtitles (s) streams…
output01.mkv = … and outputs the result to file «output01.mkv»
❷ Replaces the subtitles, keeps the original audio, keeps the original video, addressing the streams per position
→ ffmpeg -i input_new.mkv -i input_old.mkv -map 0:0 -map 0:1 -map 1:2 output02.mkv
with:
-i input_new.mkv = Reads file «input_new.mkv» and …
-i input_old.mkv = … file «input_old.mkv»…
-map 0:0 = … copying from the 1st (0) input file (i.e. input_new.mkv): the 1st stream (0) (i.e. the video stream), …
-map 0:1 = … from the 1st (0) input file (i.e. input_new.mkv): the 2nd stream (1) (i.e. the audio stream), …
-map 1:2 = … and from the second (1) input file (i.e. input_old.mkv): the third (2) stream (i.e. the subtitle)…
output02.mkv = … and outputs the result to file «output02.mkv»
❸ Replaces the audio, adds an extra subtitle, keeps the original video, addressing the streams per types (audio, video, …)
→ ffmpeg -i input_new.mkv -i input_old.mkv -map 0:v:0 -map 1:a:0 -map 0:s:1 -map 1:s:0 -map 0:s:0 output03.mkv
with:
-i input_new.mkv = Reads file «input_new.mkv» and …
-i input_old.mkv = … file «input_old.mkv»…
-map 0:v:0 = … copying from the 1st (0) input file (i.e. input_new.mkv): the 1st (0) video (v) stream, …
-map 1:a:0 = … from the 2nd (1) input file (i.e. input_old.mkv): the 1st (0) audio (a) stream …
-map 0:s:1 = … from the 1st (0) input file (i.e. input_new.mkv): the 2nd (1) subtitle stream (s), …
-map 1:s:0 = … from the 2nd (1) input file (i.e. input_old.mkv): the 1st (0) subtitle stream (s) …
-map 0:s:0 = … from the 1st (0) input file (i.e. input_new.mkv): the 1st (0) subtitle stream (s) …
output03.mkv = … and outputs the result to file «output03.mkv»
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
→ Catch up with the FFMPEG guy Channel
• ALL THE VIDEOS FROM THE CHANNEL
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
MUSIC
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
→ So Lit - Max McFerren
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
An FFMPEG question?
Ask the FFMPEG guy
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
Watch video How to copy video, audio, subtitles, data streams between videos | Stream copy online without registration, duration hours minute second in high quality. This video was added by user The FFMPEG guy 08 May 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 679 once and liked it 13 people.