Using ffmpeg I add a video overlay successfully over an origin video (origin has audio, overlay doesn't). However the audio of the origin video doesn't appear in the result video.
Even if I execute the following separate command on the result of the previous command - still no audio appears in the new result video.Code:ffmpeg -i source.mp4 -i overlay.mp4 -filter_complex "[0:v]setpts=PTS-STARTPTS, scale=1280x720[top]; [1:v]setpts=PTS-STARTPTS, scale=1280x720, format=yuva420p, colorchannelmixer=aa=0.2[bottom]; [top][bottom]overlay=shortest=1" -shortest -acodec copy -vcodec libx264 result1.mp4
ThanksCode:ffmpeg -i result1.mp4 -i audio.mp3 -c:v copy -c:a aac result2.mp4
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 3 of 3
Thread
-
-
You should use map (https://trac.ffmpeg.org/wiki/Map) to specify which input provides the audio and which the video.
Cu Selurusers currently on my ignore list: deadrats, Stears555 -
For example, use the video from the first file, the audio from the second:
Code:-map 0:v -map 1:a
Similar Threads
-
Guys please I need help with my ffmpeg command
By Fidla in forum Video ConversionReplies: 1Last Post: 21st Jan 2021, 17:36 -
[ffmpeg]: overlay logo over vstack/hstack composition
By mapg in forum Newbie / General discussionsReplies: 4Last Post: 22nd Sep 2019, 10:19 -
FFMPEG: how to overlay to video some data?
By marcorocchini in forum Newbie / General discussionsReplies: 1Last Post: 1st Oct 2017, 04:46 -
ffmpeg nvenc command
By hanaluluelle in forum Video ConversionReplies: 8Last Post: 27th Jul 2017, 02:42 -
Please help: This ffmpeg command won't convert AND copy/passthru audio
By mp4_guy in forum AudioReplies: 2Last Post: 24th Jun 2016, 08:15