I ended up taking this route. Worked like a charm.
Create [s1]: aevalsrc=0:d=N[s1], where N is the number of seconds (to
match video offset (itsoffset))
Concat [s1] and overlayvideo¹s audio (where [s1] is placed before [1:a]):
[s1][1:a]concat=n=2:v=0:a=1[ovrla].
Amix audio from basevideo ([0:a]) with [ovrla]
Ffmpeg -y -i basevideo.mp4 -itsoffset 4 -i overlayvideo.mov
-filter_complex
"aevalsrc=0:d=4[s1];[s1][1:a]concat=n=2:v=0:a=1[ovrla];[1:v]scale=1280:720[
ovrl];[0:v][ovrl]overlay=eof_action=pass[outv];[0:a][ovrla]amix[outa]"
-map [outv] -map [outa] -c:v mpeg4 -strict experimental -qscale:v 10
finalvideo.mp4
On 8/30/15, 12:48 PM, "ffmpeg-user on behalf of Chad Horton"
wrote:
>Hi,
>
>I need it to offset the audio of the overlay to match where I offset the
>video of the overlay. The audio of the underlay video
>(output_2015-08-29_12-53-21.mp4) should not be moved.
>
>
>
>-Original Message-
>From: ffmpeg-user [mailto:ffmpeg-user-boun...@ffmpeg.org] On Behalf Of
>Paul B Mahol
>Sent: Sunday, August 30, 2015 12:46 AM
>To: FFmpeg user questions
>Subject: Re: [FFmpeg-user] overlay with video offset not starting audio
>with same offset
>
>On 8/30/15, Chad Horton wrote:
>> Thanks.
>>
>> Playing around with atrim and while the video processes, not only does
>> the overlay video freeze in places (it^1s choppy), the audio is also
>>off still.
>> But I don^1t know if it^1s just an artifact of the video not
>> processing correctly.
>>
>> I did notice that if I execute with offset 00:00:00.000 and without
>> using the atrim filter, the video processes, the overlay plays cleanly.
>>
>> The difference in output when I execute with the itsoffset and atrim
>> is in the version with itsoffset > 0 and matching atrim, there^1s what
>> appears to be warnings - for example, "[Parsed_overlay_1 @
>> 0x7fef18c21000] [framesync @ 0x7fef1900b028] Buffer queue overflow,
>>dropping."
>
>Shouldn't you atrim [0:a] and not [1:a] ?
>>
>> Ffmpeg command and full output provided below.
>>
>>
>> ffmpeg -y -i output_2015-08-29_12-53-21.mp4 -itsoffset 2 -i
>> animations/chimp-01.mov -filter_complex
>> "[1:v]scale=1280:720[ovrl];[0v][ovrl]overlay=eof_action=pass[outv];[1:
>> a]atr im=2[1a];[0:a][1a]amix[outa]" -map [outv] -map [outa] -c:v mpeg4
>> -strict experimental -qscale:v 10 final_video_temp.mp4
>>
>>
>> ffmpeg version 2.6.2-tessus Copyright (c) 2000-2015 the FFmpeg
>>developers
>> built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM
>>3.5svn)
>> configuration: --cc=/usr/bin/clang
>> --prefix=/Users/helmutt/data/ext/ffmpeg/sw --as=yasm
>> --extra-version=tessus --disable-shared --enable-static
>> --disable-ffplay --enable-gpl --enable-pthreads --enable-postproc
>> --enable-libmp3lame --enable-libtheora --enable-libvorbis
>> --enable-libx264 --enable-libx265 --enable-libxvid --enable-libspeex
>> --enable-bzlib --enable-zlib --enable-libopencore-amrnb
>> --enable-libopencore-amrwb --enable-libxavs --enable-libsoxr
>> --enable-libwavpack --enable-version3 --enable-libvo-aacenc
>> --enable-libvo-amrwbenc --enable-libvpx --enable-libgsm
>> --enable-libopus --enable-libmodplug --enable-fontconfig
>> --enable-libfreetype --enable-libass --enable-libbluray
>> --enable-filters --disable-indev=qtkit --disable-indev=x11grab_xcb
>>--enable-runtime-cpudetect
>> libavutil 54. 20.100 / 54. 20.100
>> libavcodec 56. 26.100 / 56. 26.100
>> libavformat56. 25.101 / 56. 25.101
>> libavdevice56. 4.100 / 56. 4.100
>> libavfilter 5. 11.102 / 5. 11.102
>> libswscale 3. 1.101 / 3. 1.101
>> libswresample 1. 1.100 / 1. 1.100
>> libpostproc53. 3.100 / 53. 3.100
>> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
>>'output_2015-08-29_12-53-21.mp4':
>> Metadata:
>> major_brand : mp42
>> minor_version : 0
>> compatible_brands: isommp42
>> creation_time : 2015-08-29 19:53:36
>> Duration: 00:00:13.19, start: 0.00, bitrate: 10149 kb/s
>> Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
>> 1280x720, 10004 kb/s, SAR 1:1 DAR 16:9, 29.98 fps, 30.02 tbr, 90k tbn,
>> 180k tbc (default)
>> Metadata:
>> creation_time : 2015-08-29 19:53:36
>> handler_name: VideoHandle
>> encoder : MOTO
>> Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
>> stereo, fltp, 128 kb/s (default)
>> Metadata:
>> creation_time : 2015-08-29 19:53:36
>> handler_name: SoundHandle
>> Guessed Channel Layout for Input Stream #1.1 : mono Input #1,
>> mov,mp4,m4a,3gp,3g2,mj2, from 'animations/chimp-01.mov':
>> Metadata:
>> major_brand : qt
>> minor_version : 537199360
>> compatible_brands: qt
>> creation_time : 2013-02-16 01:09:15
>> Duration: 00:00:07.67, start: 0.00, bitrate: 18997 kb/s
>> Stream #1:0(eng): Video: png (png