Ubuntu – Splitting a video into multiple parts

videovideo-editor

I have several large videos that I want to split into parts. The only way to do that I know is to split one part at a time with OpenShot. I have to split, wait a long time, delete the part, split the next part, …

Is there a better way? I tried to google but it seems all the methods also require splitting one part at a time. This is really inconvenient as I need each video to be split into 20-30 parts. I want to be able to just mark all the split point and come back later and find it all done. Does anyone know a way?

UPDATE:
Now I'm working on a command line solution. I tried this command but the only problem is that there are few seconds of where the video freezes in the beginning (and end) of each output split.

avconv -i x.mp4 -ss 00:00:00 -t 00:01:00 -c:v copy -c:a copy out.mp4  -ss 00:01:00 -t 00:01:00 -c:v copy -c:a copy out1.mp4  -ss 00:02:00 -t 00:01:00 -c:v copy -c:a copy out2.mp4  -ss 00:03:00 -t 00:04:00 -c:v copy -c:a copy out3.mp4

Best Answer

Here is a solution that worked for me.

For example:

avconv -ss 0 -i x.mp4 -t 180  -vcodec copy -acodec copy -metadata track="1" "Part I.mp4"              
avconv -ss 180 -i x.mp4 -t 164  -vcodec copy -acodec copy -metadata track="2" "Part II.mp4"              
avconv -ss 344 -i x.mp4 -t 185  -vcodec copy -acodec copy -metadata track="3" "Part III.mp4"   

I had 50 entries and I put them in a script together. I first put skeletons like

avconv -ss  -i x.mp4 -t   -vcodec copy -acodec copy -metadata track="  " ".mp4"  

Then I filled out the -ss and put the titles. After that, I used libreoffice Calc with space as a delimiter. I got the values for -t and track with a formula and dragging.

Related Question