Re: [FFmpeg-user] MKV With Multiple Audio Streams
Hi, On Thu, Jul 28, 2016 at 9:02 AM, Gabriel Altabaraniwrote: > 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. Please post your full command line and console output. If you only want those streams, then you could do: ffmpeg -i anime.mkv -c:v copy -c:a copy -map 0:0 -map 0:3 output_anime.mp4 Also I think another issue in your original command line was that you included -c:v copy, but you never added -c:a copy, which is why the audio stream was reencoded. Best, Kieran. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] MKV With Multiple Audio Streams
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"a écrit : > > -Original Message- > > From: ffmpeg-user [mailto:ffmpeg-user-boun...@ffmpeg.org] On Behalf Of > > Gabriel Altabarani > > Sent: 28 July 2016 11:03 > > To: ffmpeg-user@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@ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org > > with subject "unsubscribe". > > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] MKV With Multiple Audio Streams
> -Original Message- > From: ffmpeg-user [mailto:ffmpeg-user-boun...@ffmpeg.org] On Behalf Of > Gabriel Altabarani > Sent: 28 July 2016 11:03 > To: ffmpeg-user@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@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org > with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".