Seperate video and multitrack audio EASILY with FFMPEG | Guide

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up guys my name is techn over here for troubleshoot and today I'm gonna show you what is probably the most important tip for me and my editing and of course a few edited videos somewhat similar to how I do then you'll also find this a very useful what am I talking about well over here I have an MKV file and I have a Premiere Pro project the two don't mix very well it just says file format not supported so what do you need to do well you need two remarks the MKV into an mp4 they're basically the same thing you just need to copy it and paste it using a special piece of software called ffmpeg or any other kind of video converter now of course you used to the normal conversion technique of just saying ffmpeg I the name of the input file followed by the output file at the very end very basic very simple and by doing that you'll have both the audio and the video copied across which would work for this however I have three audio channels in my video file and of course doing that would leave me only with the first one and copying across the rest of there might be extra effort so something I like to do is both the remax and do a bit more in one line of code basically I'll take this MKV with three audio tracks copy it out into one mp4 followed by three audio tracks one for each of the tracks inside of this video over here which makes editing hell of a lot easier for me basically this is the command down here that I use ffmpeg - I file name map 0 V meaning map the first video - - C copy so don't changes the format at all and put it into an mp4 file by doing this over here you'll simply take the input file and copy the first video track into an output file yes you can have more than one video track in a single mp4 or MKV file then we have map 0 a 0 which is the 0 with audio track and we're coughing it to zero don ase map 0 a 1 which is the first audio track - 1 dot AAC + 2 - 2 dayz etc etc you could add as many of these as you wish however I only record in 3 tracks my PC sound my discord or chat sound and my voice at the very end so of course this file over here is a bit more confusing than having to one line as such this file in fact iterates over every MKV file in the same folder it's in it then gets the name of the file it removes the extension at the very end tells it an output file tells me what is currently doing and then goes ahead and remixes the input file into the input file name dot mp4 underscore zero done AAC one AC to AAC etc etc so if I just go ahead and run this you'll see it's busy remarking it into this folder over here where we have a video file and three audio tracks so basically I'm successfully splitting the video and the audio tracks into separate files and of course this is quite modular you can expand it or contract it as much as you need so press any key to continue I'm going to close it and as you can see I have a video file audio track 0 1 2 and I can drag them all into Premiere Pro because their formats that Premiere likes and of course I can make a new sequence drag an audio 1 audio 2 and audio 3 zoom in a bit and you can see that all of the audio tracks are here I don't exactly have anything going in my chat so as you can see I've got a bit of music and the rest is me talking and that's basically it this is how to separate the audio from the video it's using ffmpeg which if you need to know how to install will be linked down in the description below and once you have it installed you can simply use this command line over here basically how it works is as such so we'll go ahead and make this command a bit more human readable if you'd like to enter it yourself so we have input mp4 and over here we have the output video file name so output dot mp4 then we have the first audio track so we'll call it output underscore is 0.8 C and then we also have output 1 and output toom and of course if you have more than three audio tracks you can simply copy from before the map to after the final file name you can change the two to a three to two or three can do it again to a fourth one etc etc as many times as you need so we'll take a TL but MKV as the input and all simply run this command inside of command prompt as such and you can see 0 a three matches those dreams so we'll just get rid of three and four copy paste it remove these files interim and it starts automatically remarketing it from one file into these ones here quite fast and of course if you want for your audio tracks we can get rid of certain ones of these as such then we can simply copy it CMD paste it and it comes out as so with just the zero at the audio track we can also change us that it only takes that the third audio track number two and it'll output that alongside at the video as such and we have the audio track over here super simple and really easy to do this file will be linked down in the description below or at least the code for it if you'd like it to iterate through every file inside of a folder simply change it from start at MKV to say mp4 and edit the rest as you like our name is the folder that it goes into so I've got it in my H Drive slash temp slash exclamation mark name so this is where it will go basically only need to change is this file location over here and besides that that's basically it of course you'll need to remove as many of these audio tracks as you're not going to use or possibly even add more save it run it and you're done anyways thank you all for watching - means techno be here for troubleshoot this has been a rather quick possibly confusing video but if you understand what's going on this is going to be incredibly useful for you anyways I'll see you all next time ciao
Info
Channel: TroubleChute
Views: 18,393
Rating: undefined out of 5
Keywords: audio, ffmpeg, video, how to extract audio from video, video editing, multitrack audio, split audio from video, extract audio from video, extract audio from a video, how to extract audio from a video, export audio from video, match audio and video, split audio from video sony vegas, how to take audio from a video, shadowplay 2 seperate audio files, sync audio and video, sync audio with video
Id: I0buEOp3l1k
Channel Id: undefined
Length: 5min 51sec (351 seconds)
Published: Thu Jan 30 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.