User Tools

Site Tools


ffmpeg:only_keep_english

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ffmpeg:only_keep_english [2023/10/30 11:48] peterffmpeg:only_keep_english [2023/10/30 17:13] (current) – [ffmpeg - Only keep English] peter
Line 2: Line 2:
  
 <code bash> <code bash>
-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"+ffmpeg -i "input.mkv" -c copy -map 0:v -map 0:a:m:language:eng? -map 0:s:m:language:eng? -map 0:d? -map 0:t? "output.mkv" 
 +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 
 + 
 +ffmpeg -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" 
 +ffmpeg -i "input.mkv" -c 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"
 </code> </code>
  
Line 8: Line 14:
 **NOTE:**   **NOTE:**  
  
-  * **-map 0:0**:  Keep the existing map 0:0. +  * **-c:s copy**:  Using stream copy to remux (no encoding). 
-  * **-map 0:a:m:language:eng? -c copy**:  Keep only English Audio. (Optional only if Audio exists). +  * **-map 0:v**:  Keep the existing Video. 
-  * **-c:s copy -map 0:s:m:language:eng?**:  Keep only English Subtitles. (Optional only if Subtitles exist).+    * **-map 0:0**:  Keep the existing map 0:0.  (Assume this is the Video)
 +  * **-map 0:a:m:language:eng?**:  Keep only English Audio. (Optional only if Audio exists). 
 +  * **-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:d?**:  Keep Data. (Optional only if Data exists).
   * **-map 0:t?**:  Keep Attachments. (Optional only if Attachments exists).   * **-map 0:t?**:  Keep Attachments. (Optional only if Attachments exists).
Line 19: Line 27:
  
 <code bash> <code bash>
-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? "out2.mkv"+ 
 +# QUICK. 
 +ffmpeg -i "input.mkv" -c 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? "out1.mkv" 
 + 
 +# SLOW, BUT SLIGHTLY SMALLER. 
 +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" 
 + 
 +# VERY SLOW, BUT SMALLER. 
 +ffmpeg -i "input.mkv" -map 0:v -c:a copy -map 0:a:m:language:eng? -c:s copy -map 0:s:m:language:eng? -map 0:d? -map 0:t? "output.mkv" 
 + 
 +# EXTREMELY SLOW, BUT SMALLEST. 
 +ffmpeg -i "input.mkv" -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" 
 +ffmpeg -i "input.mkv" -map 0:v -map 0:a:m:language:eng? -map 0:s:m:language:eng? -map 0:d? -map 0:t? "output.mkv" 
 </code> </code>
  
ffmpeg/only_keep_english.1698666486.txt.gz · Last modified: 2023/10/30 11:48 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki