Audio Support
Created by: RGuilfoyle
I have used filter_complex on an video as below, but the audio stream is lost. I would like to be able to adjust the audio and video playback rate, suggestions?
import ffmpeg stream = ffmpeg.input('input.mp4') stream = ffmpeg.filter_(stream, 'fps', fps=20) stream = ffmpeg.filter_(stream, 'crop', 'iw*.63:ih*.63:iw-(iw*.64):ih-(ih*.833)') stream = ffmpeg.filter_(stream, 'setpts', '0.8333334*PTS') stream = ffmpeg.output(stream, 'output.mp4') ffmpeg.run(stream)
With ffmpeg I can mux back in the audio (also with a speedup); -filter_complex 'crop=iw*.63:ih*.63:iw-(iw*.64):ih-(ih*.833)[vid];[vid]fps=20[vid2];[vid2]setpts=0.8333334*PTS[v];[0:a]atempo=1.2[a]' -map '[v]' -map '[a]'