


Issue your command and wait for the output file (or troubleshoot any errors).

cd (the change directory command) to the directory with the ffmeg.exe, as depicted.Open a Command Prompt (Start > Run > CMD) or on a Mac/Linux open a Terminal.You can use the -to option instead of the -t option, if you want to specify the range, eg for 45 seconds: 00:03:05 + 45 = 00:03:50 If you don't specify the -t option it will go to the end. The timestamps need to be in HH:MM:SS.xxx format or in seconds. If you want to extract a portion of audio from a video use the -ss option to specify the starting timestamp, and the -t option to specify the encoding duration, eg from 3 minutes and 5 seconds in for 45 seconds: ffmpeg -i sample.avi -ss 00:03:05 -t 00:00:45.0 -q:a 0 -map a sample.mp3 It works for some decoders but also breaks several others and breaks compatibility with a lot of players because it's a totally out of spec hack.To encode a high quality MP3 or MP4 audio from a movie file (eg AVI, MP4, MOV, etc) or audio file (eg WAV), I find it's best to use -q:a 0 for variable bit rate and it's good practice to specify -map a to exclude video/subtitles and only grab audio: ffmpeg -i sample.avi -q:a 0 -map a sample.mp3 What OBS and FFMpeg do to get around this limit is flag any and all tracks as default which hopefully forces a decoder to play back all tracks at once. A decoder would then play the default track and ignore the others unless the decoder also had the ability to switch to a different track and the end user elected to do so at which point the newly selected track was played back and all others ignored. While it is feasible to have multiple audio tracks in an MP4 the intent was for additional tracks to be Secondary Audio Programs like additional languages with one track being flagged as the default track. When HitFilm does add support for multi-channel audio there's a good chance you're still going to have problems because what some packages like OBS are doing is technically out of spec. Transcoding to fast decode AVC for timeline performanceįor everybody else that thinks it's stupid or whatever else yes it is annoying but unfortunately there isn't a clear cut solution that's going to satisfy everyone and everything. You could modify FFMpeg scripts to do it all in one shot making your life a lot easier.
