ffmpeg

Split Video and Audio to separate files

This has to be done in 2  separate commands First we copy video only and then we copy audio only

ffmpeg -i video_with_audio.mp4 -an -c copy only_video.mp4

ffmpeg -i video_with_audio.mp4 -vn -acodec copy only_audio.mp4

Merge Video and Audio

ffmpeg -i video.mp4 -i audio.mp4 -c:v copy -c:a aac merged_video_audio.mp4

-an # no audio or audio=null

-vn # no video or video=null

Convert stereo audio to mono

ffmpeg -i audio_stereo.mp4 -ac 1 audio_mono.mp4

Normalize Audio

First we analize the audio

ffmpeg -i video_with_audio.mp4 -af "volumedetect" -vn -sn -dn -f null /dev/null

Now we can increase the audio volume by the given dB level.

ffmpeg -i video_with_audio.mp4 -af "volume=10dB" -crf 26 -c:a aac -b:a 192k video_with_normalized_audio.mp4

Sync Audio and video

Delay the audio ( offset in seconds )

ffmpeg -i video_with_audio.mp4 -itsoffset 0.5 -i video_with_audio.mp4 -map 0:v -map 1:a -c copy video_with_delayed_audio.mp4