I'm having trouble muxing the video from one source with the audio from another because the audio drifts over time. As I mentioned in the title, the sources are at different frame rates, the video's source is at 23.976, and the audio's source is at 29.97.
Maybe my current code will help to better understand the situation:
ffmpeg -y -i source1.mkv -itsoffset 0.85 -i source2.mp4 -map 0:0 -map 1:1 -c:v libx264 -crf 23 -c:a aac -b:a 112k output.mp4
The audio source's audio starts a bit early, hence the 0.85 second delay.
I'm using FFmpeg version: 20170904-6cadbb1
ffprobe file -show_streams
audio length = video length - offset
and mux with the offset. This assumes that the drift is linear.ffmpeg -y -i videosource.mkv -itsoffset 0.85 -i audiosource.aac -map 0:0 -map 1:0 -af atempo=(video source's length - the offset) / video source's length -c:v libx264 -crf 23 out.mp4
? If so, it didn't work.video stream's length - the offset
.