plestick.blogg.se

Ffmpeg copy audio and replace
Ffmpeg copy audio and replace











ffmpeg copy audio and replace

I left it as "mp4" container in this example but you can use raw aac e.g. this is what Im trying to do: ffmpeg -i 2009.mp4 -i birds. copy audio from 10:00 minutes start time, for 1 minute, 5 seconds duration (until 11 minute, 5 second, playing time)Ĭode:ffmpeg -i input.mkv -vn -acodec copy -ss 00:10:00 -t 00:01:05 output.mp4 I want to replace part of the audio in one mp4 file with part of another mp3 file using ffmpeg. Use -ss for start time (in hh:mm: ss.ms notation), and -t for durationĮ.g. If you leave it in the mkv, this will keep the timecodes. ffmpeg -i v.mp4 -i a.wav -MAGIC video-new.mp4 This is very similar to How to replace an audio stream in a video file with multiple audio streams but that question handles multiple audio tracks, which complicates it very much, making it unclear which part of the solution is enough for a simple audio swap. Some mkv's have variable frame rate, and that can cause some programs to give you the running time discrepancies. Don't demux from the original mkv container. You can cut (copy) it accurately with ffmpeg. So I was thinking of copying the audio from the logo of File-A.mkv and copy it instead of the audio of the File-B.mkv's logo. (the rest of the audio is fine, but the logo part not)

ffmpeg copy audio and replace

Both MKV files have a logo, but these logos are different (the sound too). I tried to just demux one audio track to mux it with the other MKV file with a slight delay to have it synchronized, however, the result isn't very satisfying. What I want is take the audio from File-B.mkv and add it to File-A.mkv.

ffmpeg copy audio and replace

I have two MKV files (let's say File-A.mkv and File-B.mkv) which are the same thing but in different languages.













Ffmpeg copy audio and replace