[opensuse] Cutting video files in half
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: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
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: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
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: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
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: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hello, On Fri, 16 Jun 2017, David Haller wrote:
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
Oops. Sorry. That should be: mkvmerge -o output.mkv $(ls part-*.mkv | sed '1n;s/^/+/g' | xargs) (you need to prefix the second and following parts with a '+', but _not_ the first part, thus the sed | xargs)... HTH, -dnh -- Calvin: People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. Hobbes: Isn't your pants' zipper supposed to be in the front? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
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)
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: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
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)
participants (5)
-
Carlos E. R.
-
Constant Brouerius van Nidek
-
David Haller
-
Per Jessen
-
pit