From 9d1d1f071465e412a2a26cad17f254f0d6f5eb08 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 4 Oct 2020 20:18:11 +0100 Subject: [PATCH] Add note about stripping streams with ffmpeg --- notes/ffmpeg-remove-stream.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 notes/ffmpeg-remove-stream.md diff --git a/notes/ffmpeg-remove-stream.md b/notes/ffmpeg-remove-stream.md new file mode 100644 index 0000000..1715193 --- /dev/null +++ b/notes/ffmpeg-remove-stream.md @@ -0,0 +1,19 @@ +--- +title: Strip audio / subtitle stream with ffmpeg +tags: + - Media +emoji: 🎵 +link: https://stackoverflow.com/a/38162168 +--- + +```bash +ls -1 *.mp4 | xargs -I{} ffmpeg -y -i {} -map 0 -map -0:a:0 -c copy /path/to/out/{} +``` + +`-map -0:a:0` removes the 0th audio stream. + + +- v - video, such as `-map -0:v` +- a - audio, such as `-map -0:a` +- s - subtitles, such as `-map -0:s` +- d - data, such as `-map -0:d`