Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] Cutting video files in half
On 2017-06-16 13:03, Constant Brouerius van Nidek wrote:
First of all, I am not trying to find a video editor. I just want to cut
video files in half in order to send them to a family member oversees.

Thanks to the help of list members and ongoing discussions about video
editors I have read multiple man pages etc. googled around and have seen
to it that i have multiple editors installed.

I have chosen WeTransfer for the transport which only allows a maximum
of 2 gigabyte per session. The video files are all approximately 4
gigabyte and I need a simple method to cut these MOV files in half.

Looking at video editors in alphabetical order Avidemux, ffmpeg,
kdenlive and Openshot I am just looking for a program that just cuts
the 4Gb videos in half.

ffmpeg seems the most logical candidate but finding the right command
line sequence is problematic.
Could somebody give me just the lines that work?

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.
If there are subtitles, they are not copied; if there are any tell me and I'll
look it up again in the manual. I don't have the option handy because when I
tried last it failed.

When you try, see if the duration of the first chunk is correct, and the start
of the second one is correct. Specifying exact times for ffmpeg is sometimes an
art.

I did not specify file sizes, though; first I do not know how, second I would
not know how to specify the start point of the second chunk. So I used times,
one hour.
If your files are still too big, well, easy: switch to half an hour ;-)



However, there is another easier solution.

If your friend is not going to play the chunks separately, but is going to join
them into one single file, then it is best to simply cut with scissors:

split --bytes=2000KB --numeric-suffixes videofile.ext videofile.ext__

It doesn't matter if he can not play parts separetely. He just does:

cat videofile.ext__1 > videofile.ext
cat videofile.ext__2 >> videofile.ext




--
Cheers / Saludos,

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

< Previous Next >
Follow Ups