> -----Original Message----- > From: ffmpeg-user [mailto:[email protected]] On Behalf Of > Gabriel Altabarani > Sent: 28 July 2016 11:03 > To: [email protected] > Subject: [FFmpeg-user] MKV With Multiple Audio Streams > > So I have an MKV video file with the following streams: > > > > Stream#0:0: Video > > Stream#0:1: Audio > > Stream#0:2: Subtitle > > Stream#0:3: Audio > > Stream#0:4: Attatchment > > Stream#0:5: Attatchment > > Stream#0:6: Attatchment > > > > I just want Stream#0:0 and 0:3. However I don't want to re-encode, I just > want to change containers to mp4/webm. > > The only way I've gotten it to work is by using this line of code: > > > > ffmpeg -i "Ep.1 Mirai Nikki [Future Diary] (Dual Audio) 1080p.mkv" -map 0 -c:v > copy -map -0:a:0 -map -0:s:0 -map -0:t:0 -map -0:t:1 -map -0:t:2 > OUTPUT.mp4 > > > > But even then I still have to re-encode the second audio stream. My > question, is there a way to change the container and select one of the audio > streams without re-encoding at all?
You have to specify the 'copy' codec for audio also, either by adding '-c:a copy', or better yet replacing '-c:v copy' with '-c copy'. I'm a little rusty on this so please check my syntax, and you may also need to be careful with command line option sequencing. > > > > Thanks, > > Gabe > > _______________________________________________ > ffmpeg-user mailing list > [email protected] > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email [email protected] > with subject "unsubscribe". _______________________________________________ ffmpeg-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
