This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
utils_video_encoding [2020/06/14 21:31] xavier |
utils_video_encoding [2020/06/18 16:19] (current) xavier |
||
|---|---|---|---|
| Line 12: | Line 12: | ||
| Do not re-encode streams, keep all subtitles and select English and French audio languages:\\ | Do not re-encode streams, keep all subtitles and select English and French audio languages:\\ | ||
| - | ''$ ffmpeg -i input -map 0:v -map 0:s -map 0:m:language:eng -map 0:m:language:fre -c copy output''\\ | + | ''$ ffmpeg -i input -map 0:v -map 0:s -map 0:m:language:eng -map 0:m:language:fre? -c copy output''\\ |
| => -c copy to avoid re-encoding streams\\ | => -c copy to avoid re-encoding streams\\ | ||
| => -map:0:v to keep all video streams\\ | => -map:0:v to keep all video streams\\ | ||
| => -map 0:s to keel all subtitle streams\\ | => -map 0:s to keel all subtitle streams\\ | ||
| => -map 0:m:language:eng to keep streams with english metadata defined (all types of streams but impacting only audio (a) since we're keeping all subtitles in this case)\\ | => -map 0:m:language:eng to keep streams with english metadata defined (all types of streams but impacting only audio (a) since we're keeping all subtitles in this case)\\ | ||
| + | => the ? at the end of -map instruction avoids failure if the matching input is missing\\ | ||
| + | |||
| + | ===== Script examples ===== | ||