You are not logged in.

#1 2011-06-10 15:26:12

jlindgren
Member
Registered: 2011-02-27
Posts: 260

Tool to split MPEG video losslessly?

I have 4 roughly hour-long videos copied from DVD which I need to split into 15-minute segments (to upload to YouTube).  I would like to do this without reencoding if possible.  Google found me a tool called "mpg2cut2", but it seems to only work in Windows (crashed in Wine).  Any suggestions?

Offline

#2 2011-06-10 15:40:19

damacas
Member
From: Ontario, Canada
Registered: 2011-05-27
Posts: 50

Re: Tool to split MPEG video losslessly?

I believe avidemux should be able to do this, however I have experienced audio syncing issues when dealing with ripped vob files from DVDs.  Avidemux allows you to adjust the audio timing, but just be aware to check it.

EDIT, just noticed you have them in MPEG format, so shouldn't be an issue, but doesn't hurt to check.

Last edited by damacas (2011-06-10 15:42:00)

Offline

#3 2011-06-10 16:16:27

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: Tool to split MPEG video losslessly?

i've used dvbcut (http://dvbcut.sourceforge.net/) on my mpg files. Simple and lossless. Don't know if it's in the repos though. But it compiles easily.


EDIT: it's in AUR:
aur/dvbcut 0.6.0-4
    Qt3 application for cutting parts out of DVB streams

Last edited by swanson (2011-06-10 16:17:22)

Offline

#4 2011-06-10 17:36:03

jlindgren
Member
Registered: 2011-02-27
Posts: 260

Re: Tool to split MPEG video losslessly?

Thanks for the replies.  I installed avidemux and it seems to work fine.  I haven't been able to detect any A/V sync problems, either.

Offline

#5 2011-06-10 19:43:41

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: Tool to split MPEG video losslessly?

The command line way to do it is:

ffmpeg -ss <start time in hh:mm:ss.whatever format>-t <duration in hh:mm:ss.whatever format>-i in.mpeg -acodec copy -vcodec copy out.mpeg

In the cut this produces, you can end on whatever frame you want but you can NOT start on whatever frame you want! The "-ss" argument will round to the nearest keyframe and I've checked... avidemux does this too.

To have a frame exact splitting (copy everything and only do a small amount of re-encoding in the vicinity of the cut) you need something like dvbcut. I am not sure if there is a more modern replacement for that. Either that or manually identify which pieces need to be re-encoded and join those peices onto what you copy.

As someone who has had many painful experiences rejoining split files that I download from youtube, I must say this: please look into frame exact splitting. Using avidemux or something similar will result in files that have annoying overlap upon rejoining.


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

Board footer

Powered by FluxBB