User Tools

Site Tools


ffmpeg:only_keep_english

This is an old revision of the document!


ffmpeg - Only keep English

ffmpeg -i "input.mkv" -map 0:v -map 0:a:m:language:eng? -c copy -c:s copy -map 0:s:m:language:eng? -map 0:d? -map 0:t? "output.mkv"
 
or
 
fmpeg -i "input.mkv" -map 0:0 -map 0:a:m:language:eng? -c copy -c:s copy -map 0:s:m:language:eng? -map 0:d? -map 0:t? "output.mkv"

NOTE:

  • -map 0:v: Keep the existing Video.
    • -map 0:0: Keep the existing map 0:0. (Assume this is the Video).
  • -map 0:a:m:language:eng? -c copy: Keep only English Audio. (Optional only if Audio exists).
  • -c:s copy -map 0:s:m:language:eng?: Keep only English Subtitles. (Optional only if Subtitles exist).
  • -map 0:d?: Keep Data. (Optional only if Data exists).
  • -map 0:t?: Keep Attachments. (Optional only if Attachments exists).

ffmpeg -i "input.mkv" -c:v copy -map 0:v -map 0:a:m:language:eng? -c:s copy -map 0:s:m:language:eng? -map 0:d? -map 0:t? "output.mkv"

References

ffmpeg/only_keep_english.1698667019.txt.gz · Last modified: 2023/10/30 11:56 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki