Merge Audio and Video in Seconds with FFmpeg

preview_player
Показать описание
FFmpeg is an incredible tool that can seemingly do anything provided you can find the right incantation. I've been using this command a bunch recently and it has saved me a ton of time already.

The command:

Let me know if you have any cool FFmpeg commands you run.

#ffmpeg #videoediting #opensource
Рекомендации по теме
Комментарии
Автор

ffmpeg -i input.mp4 -i input.mp3 -c:v copy -c:a aac -map 0:v -map 1:a output.mp4

Kodularturkiye
Автор

thanks, i was having trouble using ffmpeg and found out your vid and it worked like a charm

sujansinhthakor
Автор

thanks, really helpful and well explained

LuKoFi
Автор

Thank you very much. I try to encode two stereo streams (front & rear) into one binaural stereo file. The docs tell me to use sofa profiles. I found those, but no docs which one to use. Is there any straight forward command line like (GPT suggests):
ffmpeg -i front.wav -i rear.wav \
-filter_complex "[0:a]af=earwax=0.6[b0];[1:a]af=earwax=0.6[b1];[b0][b1]amerge=inputs=2, pan=stereo|FL=FL+0.30*FR|FR=FR+0.30*FL[a]" -map "[a]" -ac 2 -c:a pcm_s16le -y out.wav

JCNeupert
Автор

Thank you, another question, is there a way to extract audio from a video, loseless with ffmpeg?

SakuraHougetsu
Автор

I used this combined with yt-dlp to download YouTube videos and oh is it so beautiful

koopdawhoop.
Автор

does it do it without re-encoding?
I have downloaded youtube video using yt-dlp and have audio and video separately . All it needs is merging together

flesz_
Автор

i always run `ffmpeg -i input.mkv output.mp4`
to reduce the video size for yt uploading

dan_crim
Автор

0:41 your audio file is much bigger than your video file? interesting 🤔

weeb
Автор

Gotta love simple videos that skip half the information you need to actually complete the process

And also don't post the command in the description or where to put it :)

mothman