ffmpeg:remove_video_audio_streams_by_language
Table of Contents
ffmpeg - Remove video/audio streams by language
Use the map command to remove streams from media files.
- The stream index begins at 0, so, for example, to remove the first stream in the file you would use -map -0:0, to remove the second stream you'd use -map -0:1:
ffmpeg -i "input.mkv" -map 0 -map -0:1 -c copy "output.mkv"
NOTE: The minus sign in front of the -0:1 is what counts as a removal.
- To retain that map, remove that minus sign, so it becomes 0:1.
Enhanced version to only keep English
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"
Tdarr Plugins
You can automate this process on your files using the following Tdarr Plugins:
To remove subtitle streams:
Tdarr_Plugin_x7ab_Remove_Subs
To remove audio streams based on language:
Tdarr_Plugin_MC93_Migz3CleanAudio
ffmpeg/remove_video_audio_streams_by_language.txt · Last modified: 2023/10/30 11:03 by peter