[FFmpeg-user] MKV With Multiple Audio Streams
kv pham
pkv.stream at gmail.com
Thu Jul 28 11:37:37 EEST 2016
Ffmpeg -i input -map 0:v -vcodec copy -map 0:3 -acodec copy output.mkv
If the audio track is indeed stream 3 (check the output of the command)
Le 28 juil. 2016 10:33 AM, "Francois Visagie" <francois.visagie at gmail.com>
a écrit :
> > -----Original Message-----
> > From: ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] On Behalf Of
> > Gabriel Altabarani
> > Sent: 28 July 2016 11:03
> > To: ffmpeg-user at ffmpeg.org
> > 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
> > ffmpeg-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org
> > with subject "unsubscribe".
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list