Merge Audio and Video in Seconds with FFmpeg

  Рет қаралды 12,232

CODE IS EVERYTHING

CODE IS EVERYTHING

Күн бұрын

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:
ffmpeg -i input.mp4 -i input.wav -c:v copy -c:a aac -map 0:v -map 1:a output.mp4
(Replace input.mp4 with your video file, input.wav with your audio file, and output.mp4 with your desired output file name)
You can learn more about FFmpeg on their site: ffmpeg.org/
Let me know if you have any cool FFmpeg commands you run.
#ffmpeg #videoediting #opensource

Пікірлер: 27
@Kodularturkiye
@Kodularturkiye 2 жыл бұрын
ffmpeg -i input.mp4 -i input.mp3 -c:v copy -c:a aac -map 0:v -map 1:a output.mp4
@chawlingtechtests6101
@chawlingtechtests6101 9 ай бұрын
Thank you :)
@sujansinhthakor2314
@sujansinhthakor2314 6 ай бұрын
thanks,i was having trouble using ffmpeg and found out your vid and it worked like a charm
@koopdawhoop.
@koopdawhoop. Жыл бұрын
I used this combined with yt-dlp to download KZbin videos and oh is it so beautiful
@flesz_
@flesz_ 11 ай бұрын
that's what I am looking for. Did it work without re-encoding ?
@Guishan_Lingyou
@Guishan_Lingyou 4 ай бұрын
That's the only thing I could see you using this for anytime soon. I haven't tried it yet though.
@JCNeupert
@JCNeupert 10 ай бұрын
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
@dan_crim
@dan_crim Жыл бұрын
i always run `ffmpeg -i input.mkv output.mp4` to reduce the video size for yt uploading
@LuKoFi
@LuKoFi Жыл бұрын
thanks, really helpful and well explained
@ceyoz143
@ceyoz143 3 ай бұрын
How do I point ffmpeg to the directory which has those files I want to combine so I can execute the code? This explanation is skipped.. you can't run the command in cmd randomly and expect it to work.
@easyvideott7505
@easyvideott7505 Жыл бұрын
Very nice.... works like a charm :)
@SakuraHougetsu28
@SakuraHougetsu28 Жыл бұрын
Thank you, another question, is there a way to extract audio from a video, loseless with ffmpeg?
@dahawk8574
@dahawk8574 11 ай бұрын
SPLIT audio track out from an .mp4 as .m4a without re-encoding: -------- ffmpeg -i input.mp4 -map 0:a:0 -c copy output.m4a -------- I just learned this a few minutes ago from this tutorial: v=I0buEOp3l1k&t=3m30s I have not tested my tweaks to fit your request, but I expect it should work.
@Matty-pn9fy
@Matty-pn9fy 13 күн бұрын
"ffmpeg seems inaccessible and esoteric" *makes a tutorial using terminal lingo only 3% of the population may know* right
@flesz_
@flesz_ 11 ай бұрын
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
@CODE_IS_EVERYTHING
@CODE_IS_EVERYTHING 11 ай бұрын
Yeah the -c:v copy means it'll just copy the existing without re-encoding. I believe that if you tried to output to a different video format that doesn't support the codec from the original it will automatically try and re-encode. But if you're just doing mp4 -> mp4, or different types but that support the same codec it shouldn't re-encode.
@flesz_
@flesz_ 11 ай бұрын
@@CODE_IS_EVERYTHING thanks
@weeb3277
@weeb3277 8 ай бұрын
0:41 your audio file is much bigger than your video file? interesting 🤔
@CODE_IS_EVERYTHING
@CODE_IS_EVERYTHING 8 ай бұрын
Haha whenever I use Adobe audition it balloons my audio file size
@bielclashfire
@bielclashfire 10 ай бұрын
Thanks, dude.
@MordorSensei
@MordorSensei 5 ай бұрын
Thanks a lot.
@StocksMafia
@StocksMafia 2 ай бұрын
upload for windows users also please
@yasinalbayrak2744
@yasinalbayrak2744 3 ай бұрын
bro fuck ffmpeg but your voice is amazing
@christopherrimplington3643
@christopherrimplington3643 2 жыл бұрын
Gimme the code!!!!!! :)
@mothman7786
@mothman7786 9 ай бұрын
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 :)
@CODE_IS_EVERYTHING
@CODE_IS_EVERYTHING 9 ай бұрын
Haha fair point, thanks for bringing that up, I've added the command to the description.
@mothman7786
@mothman7786 9 ай бұрын
@@CODE_IS_EVERYTHING oh damn, thanks :o And sorry about that, I was just trying to find a quick solution to merge my friend's audio layers for a video into a single MP4, but most videos either don't use windows or assume I'm not completely new to using ffmpeg
FFmpeg for Screencasts and Recording 📹
11:55
Bryce Vandegrift
Рет қаралды 10 М.
Why Are Open Source Alternatives So Bad?
13:06
Eric Murphy
Рет қаралды 698 М.
Ice Cream or Surprise Trip Around the World?
00:31
Hungry FAM
Рет қаралды 21 МЛН
Do you love Blackpink?🖤🩷
00:23
Karina
Рет қаралды 16 МЛН
Fastest way to automatically split video into shorter segments
7:18
Combining Audio & Video with FFmpeg
13:04
Michael Chu
Рет қаралды 3,7 М.
Very Useful Small Computing Things
12:28
ExplainingComputers
Рет қаралды 321 М.
I Replaced ALL my ADOBE APPS with these [free or cheaper] Alternatives!
10:18
Best 10 Items I Tested in 2024!
20:12
Project Farm
Рет қаралды 393 М.
How to use FFMPEG
12:49
0612 TV w/ NERDfirst
Рет қаралды 662 М.
How to Optimize Videos for the Web with FFmpeg
13:04
Eric Murphy
Рет қаралды 10 М.
Become a shell wizard in ~12 mins
12:25
CODE IS EVERYTHING
Рет қаралды 259 М.
Programming Is Cooked
9:30
ThePrimeTime
Рет қаралды 164 М.