[FFmpeg-user] Combining 24fps Video with 23.976fps Audio
Carl Eugen Hoyos
cehoyos at ag.or.at
Sat Sep 21 10:16:57 CEST 2013
Sam Logan <shapableline <at> gmail.com> writes:
> >> ffmpeg -i "Video1.mp4" -i "Video2.mp4" -acodec copy
> >> -vcodec copy -map 0:0 -map 1:1 -map 0:1 "Output.mkv"
> > I don't see how you can change the speed of audio
> > with -codec copy, so below applies to reencoding.
> > -r 24 / -r 24000/1001 might allow to change the
> > video speed even with -vcodec copy.
> I tried -r first as an input option and then as an
> output option. In both cases, it had no effect on the
> generated video, which remained out of sync in one
> audio stream.
Sorry, -r as an input option also requires reencoding.
> >> Which works fine until I play the resulting video,
> >> whereupon I realized that I overlooked that Video1
> >> had a framerate of 24 fps, whereas Video2 has a
> >> framerate of 23.976 fps
> > The atempo and the setpts filter should allow you
> > to change the speed of the files:
> How do I apply these filters to just the audio stream of
> Video2 but not the streams of Video1? If I use -af as an
> output option by putting it before the output file
> parameter, then the filter will get applied to all input
> streams, right?
I don't think so (it seems unlikely to me) but please post
the command line you tried together with the complete,
uncut console output.
The filters allow you to specify the stream they should
work on, please see the filter documentation.
More information about the ffmpeg-user