Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] Cutting video files in half
On 2017-06-17 13:46, pit wrote:
Carlos E. R. wrote:

ffmpeg -i "inputfile.ext" -ss 00:00:00 -t 01:00:0 -map 0:0 -map 0:1 -map 0:2
-c:v copy -c:a copy "output_file_part_1.ext"

This will cut one hour from the start point. For the second hour:

ffmpeg -i "inputfile.ext" -ss 01:00:00 -t 01:00:0 -map 0:0 -map 0:1 -map 0:2
-c:v copy -c:a copy "output_file_part_2.ext"

I have not tested any of both lines, but I believe they are correct, because
they are similar to other lines I use for cutting sections.

I first thought the same (I think the -map and separate -c: options are not
needed, just -c copy should do it).

Maybe. The line is not tested, I simply took a previous line with
applied codecs and modified it.

Issue is, this does cut on Iframes, so there is a chance you lose one complete
coding block....

It depend on what strategy it uses for deciding that. If it cuts outside
of the region, it is fine, it it cuts inside, then the result would miss

ffmpeg is 'good' for this only if you want the parts to be valid movie files.

Else the split solution is indeed the way to go...

That's right.

Cheers / Saludos,

Carlos E. R.
(from 42.2 x86_64 "Malachite" at Telcontar)

< Previous Next >