Skip to content

Instantly share code, notes, and snippets.

@MahbbRah
Last active August 5, 2019 11:17
Show Gist options
  • Save MahbbRah/001d2b2cf24cef9d35977f4edc2f13bb to your computer and use it in GitHub Desktop.
Save MahbbRah/001d2b2cf24cef9d35977f4edc2f13bb to your computer and use it in GitHub Desktop.
I will try to include useful commands for ffmpeg video processing library :)

#Extract Audio from video ffmpeg -i 'input_file' -f mp3 -ab 192000 -vn 'output.mp3'

#Remove Audio From Video ffmpeg -i 'input_video_file' -vcodec copy -an 'output_video_file'

#Merge audio with a video. ffmpeg -i video.mp4 -i audio.wav \ -c:v copy -c:a aac -strict experimental output.mp4

#Replacing audio stream ffmpeg -i video.mp4 -i audio.wav \ -c:v copy -c:a aac -strict experimental \ -map 0:v:0 -map 1:a:0 output.mp4

#Copying the audio without re-encoding ffmpeg -i video.mp4 -i audio.wav -c copy output.mkv

Helpful Link: https://www.ostechnix.com/20-ffmpeg-commands-beginners/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment