Cutting video files in half

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Cutting video files in half

Constant Brouerius van Nidek
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?

--
opensuse:tumbleweed:20170613
Qt: 5.9.0
KDE Frameworks: 5.34.0
kf5-config: 1.0
KDE Plasma: 5.10.1
plasmashell 5.10.1
Kernel: 4.11.4-1-default
Linux User 183145 working on a Pentium IV .


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cutting video files in half

Per Jessen
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?

It doesn't sound like you need anything special, look up 'split'.



--
Per Jessen, Zürich (24.1°C)
http://www.hostsuisse.com/ - dedicated server rental in Switzerland.


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cutting video files in half

David Haller-4
In reply to this post by Constant Brouerius van Nidek
Hello,

On Fri, 16 Jun 2017, 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.
[..]
>Could somebody give me just the lines  that work?

Splitting:
$ mkvmerge --split 2G -o part.mkv input.mov

Merging:
$ mkvmerge -o output.mkv part-*.mkv

Doesn't work with all (mostly old) codecs though (e.g. Sorenson v1).

HTH,
-dnh

--
... at least I thought I was dancing, 'til somebody stepped on my hand.
                -- J. B. White

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cutting video files in half

Constant Brouerius van Nidek
In reply to this post by Per Jessen
On Friday, June 16, 2017 8:14:04 PM WIB Per Jessen wrote:
> 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.

> >
> > ffmpeg seems the most logical candidate but finding the right
> > command
> > line sequence is problematic.
> > Could somebody give me just the lines  that work?
>
> It doesn't sound like you need anything special, look up 'split'.

That us the program I hoped for and do need. Got it in the meantime and
am eager to start splitting


--
opensuse:tumbleweed:20170615
Qt: 5.9.0
KDE Frameworks: 5.34.0
kf5-config: 1.0
KDE Plasma: 5.10.1
plasmashell 5.10.1
Kernel: 4.11.4-1-default
Linux User 183145 working on a Pentium IV .


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cutting video files in half

Carlos E. R.-2
In reply to this post by Constant Brouerius van Nidek
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)


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cutting video files in half

Peter Suetterlin
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).

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

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...

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cutting video files in half

Carlos E. R.-2
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
sections.


> 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)


signature.asc (188 bytes) Download Attachment
Loading...