How can I delete the last stream from this video file?
$ ffmpeg -i video.mp4
...
Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p10le, 480x270 [SAR 1:1 DAR 16:9], 172 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : SoundHandler
timecode : 00:00:00:00
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 119 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream #0:2(eng): Data: none (tmcd / 0x64636D74)
Metadata:
handler_name : SoundHandler
timecode : 00:00:00:00
At least one output file must be specified
I want to delete the stream called Stream #0:2.
I tried
ffmpeg -i video.mp4 -map 0 -map -0:2 out.mp4
But that still has three streams.
I've also tried
ffmpeg -i video.mp4 -map 0 -map -0:d:0 out.mp4
and -map -0:d
according to my interpretation of this answer, but the ffmpeg -i
results still show that there are three tracks in the output.
I have also tried these two
ffmpeg -i in.mp4 -c:v copy -c:a copy -map_chapters -1 out.mp4
ffmpeg -i in.mp4 -c copy -dn -map_metadata:c -1 out.mp4
from this question but neither work. There are still three streams and they look identical to ffmpeg -i in.mp4