I'm trying to concat a video (mp4) and an audio (mp4 or aac) - both cut out using -ss
and -t
from the same mp4 file. I'd like to basically freeze the last frame from the video and then append the audio.
I've tried using the concat demuxer -f conat
and -c copy
, but it produces a video of wrong duration (much longer than it should be, so I'm thinking some PTS are wrong in the audio, how can I reset them?). Also, bad output using -i concat:video_cut.mp4|audio_cut.mp4
I also wonder if it's possible to do whole treat in one call of ffmpeg making use of filter_complex
: apply certain filters to one part of video (drawbox
, drawtext
), then freeze a frame and continue audio as is.
Thank you!
ffmpeg -to 5 -i input.mp4 -ss 3 -to 4 -i input.mp4 -lavfi "drawtext=text='test',drawbox,freezeframes=first=50:last=125" -c:a copy out.mp4