


-ac sets the number of audio channels (here 2).-ar defines the frequency (here it's 44100).the second -map defines where to start the audio in the audio fileĮncode audio file to mp3 ffmpeg -i input.opus -ar 44100 -ac 2 -b:a 128k output.mp3.the first -map defines where to start the audio in the video file.the -c copy avoid re-encoding the streams ffmpeg -i videofile audiofile This makes a simple conversion from a video file (MP4, AVI, MKV) into an audio file (MP3, WAV, M4A).Use -c copy to avoid re-enconding the videos (they need to have the same base codec)Īdd audio to video ffmpeg -i input.mp4 -i input.mp3 -c copy -map 0:v:0 -map 1:a:0 output.mp4.use -crf to define quality (lesser is better)Ĭoncatenate videos ffmpeg -f concat -i input.txt -c copy output.mp4Ĭreate a text file with the files you want to concatenate into a single video or audio file.to avoid re-enconding the video, use stream copy via -c, define the video with v and the codec ( libx264 in the example).use ss to select the starting and ending time Channels are conjoint tracks within a single stream, so a stereo audio WAV has one stream which contains two channels.Cut a part of a video : ffmpeg -i input.mp4 -ss 00:00 -to 00:10 -c:v libx264 -crf 30 output.mp4

For more commands check the ffmpeg documentation page. ffmpeg -i input.mov -map 0:a:0 output0.wav -map 0:a:1 output1.wav -map 0:a:2 output2.wav -map. ffmpeg is super powerful and can sometimes be enough for quick media manipulations. Each audio stream will be output as single, individual files. This page contains ffmpeg commands that I find useful. Editorial New + Inter Open Dyslexic Atkinson Hyper Legible
