Hello,
I have a video that I need to extract two parts of it and merge together those
parts. I can accomplish this using the TRIM/ATRIM filter together with the
concat demuxer:
$ ffmpeg -i video.mp4 -vf "trim=start=7:end=1173,setpts=PTS-STARTPTS" -af
"atrim=start=7:end=1173,asetpts=PTS-STARTP
On 10-07-2020 01:01 am, Leonardo via ffmpeg-user wrote:
$ ffmpeg -i video.mp4 -vf "trim=start=7:end=1173,setpts=PTS-STARTPTS" -af
"atrim=start=7:end=1173,asetpts=PTS-STARTPTS" part1.mp4
$ ffmpeg -i video.mp4 -vf "trim=start=1260:end=1430,setpts=PTS-STARTPTS" -af
"atrim=start=1260:end=1430,a
On Friday, July 10, 2020, 1:37:39 AM GMT-3, Gyan Doshi
wrote:
Yes, using the concat filter.
ffmpeg -i video.mp4 -filter_complex
"[0:v]trim=start=7:end=1173,setpts=PTS-STARTPTS[v1];[0:v]trim=start=1260:end=1430,setpts=PTS-STARTPTS[v2];[0:a]atrim=start=7:end=1173,asetpts=PTS-STARTP
guess it'll make jumps in pts, maybe genps on output would be useful
On Fri, Jul 10, 2020 at 1:46 PM Leonardo via ffmpeg-user <
ffmpeg-user@ffmpeg.org> wrote:
>
>
> On Friday, July 10, 2020, 1:37:39 AM GMT-3, Gyan Doshi <
> ffm...@gyani.pro> wrote:
>
>
> Yes, using the concat filter.
>
>