[FFmpeg-user] Multiple parts of a video

Cecil Westerhof Cecil at decebal.nl
Sun May 29 18:22:45 EEST 2022


Paul B Mahol <onemda at gmail.com> writes:

> On Sun, May 29, 2022 at 12:27 PM Cecil Westerhof <Cecil at decebal.nl> wrote:
>
>  Paul B Mahol <onemda at gmail.com> writes:
>
>  > On Sat, May 28, 2022 at 9:46 PM Cecil Westerhof via ffmpeg-user <ffmpeg-user at ffmpeg.org> wrote:
>  >
>  >  Paul B Mahol <onemda at gmail.com> writes:
>  >
>  >  > On Sat, May 28, 2022 at 4:28 PM Cecil Westerhof via ffmpeg-user <ffmpeg-user at ffmpeg.org> wrote:
>  >  >
>  >  >  When I just want to have a certain part of a video, I can do something
>  >  >  like:
>  >  >      ffmpeg -y -i input.MTS     \
>  >  >             -ss 00:08           \
>  >  >             -to 00:17           \
>  >  >             -acodec copy        \
>  >  >             -vcodec libx264     \
>  >  >             -preset veryfast    \
>  >  >             output.mp4
>  >  >
>  >  >  But what if I want several parts of a video in my video?
>  >  >  Do I need to cut the different parts out of the video and concatenate
>  >  >  them, or is it possible to do it with one command?
>  >  >
>  >  > Using concat filter.
>  >
>  >  That is exactly what I already know: cutting the different parts.
>  >  Probably one command for each part and then concatenate them.
>  >  So n + 1 commands.
>  >  My question was: can it be done with one command?
>  >
>  > This IS ONE command with concat FILTER.
>
>  I am going to ignore you. You do not read my question and when I say
>  that your reply does not answer my question you double down to 'prove'
>  you are right.
>
>  Before I CAN USE concat I have the create the n cuts I need to put
>  into the concat.
>
> And that can be used already, just specify  -ss for all inputs you gonna use.
> So you create cuts with ffmpeg all into single commad. Note that -c:a(v) copy does not work precisely with most of lossy
> codecs.
> So best and precise cut can be done inside all of libavfilter, by
> using (a)trim filters.

It seems I completely misunderstood you. My excuses about that.


> I'm really sorry if you gonna ignore my constructive help.

I eat my words.


> If you want to still use -c copy with lossy codecs, than you have
> opened a can of worms.

Should not do that.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


More information about the ffmpeg-user mailing list