On 10/22/18, Steve Bick <[email protected]> wrote: > I'm trying to replace just a segment of audio in an existing video with > another piece of audio. > > > > Goal: I have a video w/ audio, and want to replace just the audio in a > middle segment of the video without affecting the rest of the video and > audio. > > > > The closest I've come is using this: > > > > ----- > > ffmpeg.exe -y -i "Video.mp4" -i "AudioToReplace.mp3" -filter_complex > "[0:a]atrim=0:316,asetpts=PTS-STARTPTS[aud1];[1:a]atrim=0:172,asetpts=PTS-ST > ARTPTS[aud2]" -map 0:v -map "[aout]" -c:v copy -c:a libmp3lame New.mp4 > > ----- > > > > It results in the audio being replaced in the beginning of the video and the > rest of the audio shifted. > > > > I'm having a difficult time understanding what the 'filter_complex' and > 'map' parameters are doing but I think I'm getting close. Can someone please > explain these and help me adjust my command above in order to achieve my > goal?
Currently there is no easy way to do it. Best way is using trim & concat filter/demuxer on audio stream. _______________________________________________ ffmpeg-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
