Log in

View Full Version : Lossless cutting of M2V video files


specul8
25th February 2003, 13:38
Hi All.

I've come across a situation where I need to trim some video from a raw M2V video file.

The only way I seem to be able to do it is to convert the M2V to an AVI using VFAPI & DVD2AVI, "Trim" and "Direct Stream Copy" in VirtualDub and then extract the M2V file from the resulting AVI file.

I have 2 questions:

1) What application will extract the video from the final AVI file?
2) Is there a faster way with less hassle to do this - eg using vid editing software like Media Studio or Premier or something?

Thanks - Specul8

robz
25th February 2003, 22:32
Hi

Your method might work.. but needs 2 re-encodes which would probably reduce the videoqualtiy and would certainly take a lot of time.
So... that is not so lossless after all...

I would mux the m2v & audio (which I presume you also want cut) into an MPG and cut that with either TMPGenc or some other program that can cut MPEG on I-frames (or was is P? no re-encoding anyway).
then demux and do whatever you always do with the new m2v & audio

Video quality is unaffected, but since it only allows you to cut on I-frames (I...think it is) and not on the frames in between those, it is not always that accurate so you might have to cut off a little but more video.

Hope this helps

blue
26th February 2003, 00:24
I've come across this situation couple of days ago and cutting a m2v file on "non-I-frames" seems to be imposible without reencoding! The only solution is to just reencode the area around the cutting point. But there are only a few programs which can do that. One of the most popular is Cyberlink PowerDirector. Done that and it seems to work fine....cutting on every frame is posible now. :)

specul8
26th February 2003, 07:25
Thanks guys for the ideas, but I still have a problem. I would like to know which tool (preferrably available thru doom9 downloads and therefore free) is capable of cutting raw M2V video files. I don't mind only cutting on I-frames, as the accuracy is not really important, but there does not seem to be much info on cutting M2V files without converting to another format.

I searched the d/l's page using a few keywords I thought might work, but nothing. I searched the forum for "cut m2v lossless" and came up with one thread dealing with audio, so no luck there either. I'm sure this q must have an a, but I can't seem to find it in the material currently on this web site.

@robz - For some reason last night it did not occur to me to mux the vid stream by itself, cut the resulting mpg stream and demux. I can only say that I must have been really tired! Thanks for the idea - this will fix my short term problem until I can get an answer to my other question.

specul8
26th February 2003, 11:56
I've also tried to use MPEG2Cut (Currently in Doom9 News) but it only creates a 0-byte .M2V file - Is this a bug, or is it meant to handle VOB files rather than raw MPEG 2 Video files?

I can't get Dark Avenger's web site up at the moment - it seems to be down, at least temporarialy.

Any ideas or info would be appreciated.

Thanks - Specul8

blue
26th February 2003, 12:21
If accuracy is not really important and you don't want to use TMPGEnc then I have another solution: there's a program called PVACut. With this program you can cut PVA-Files on I-frames. So what about M2V you might ask? Well a PVA and a M2V don't differ very much so you can convert them from M2V->PVA and back again. A usefull program for that is "ds.jar" (it's a Java programm so you need a Java virtual machine which is downloadable from java.sun.com). It can convert M2V to PVA and back! PVACut and ds.jar are free programs.

robz
26th February 2003, 14:51
Specul8,

Do I understand correctly that you need to cut a MPEG stream without the audio?

I think TMPGenc can cut .m2v files just as easily as MPG's?

Matthew
27th February 2003, 03:13
M2Edit Pro is a good program, not free though.

specul8
27th February 2003, 12:32
@blue - Thanks for the suggestion. I will give the PVACut app a shot.

@robz - Yes, I have an M2V video that is 10 minutes and an AC3 audio stream that is 6 minutes. I don't want the first 4 minutes of video. Theoretically I could extend the audio by 4 minutes, mux, trim and demux in TMPGenc, but they would be unnecessary steps if I had an app that trims M2V files, which is why I'm asking the question.

@Matthew - Thanks. Do you know who the creator of this software package is?

If anyone knows of a free, single-step M2V video editing application could they please let me know.

Thanks everyone for their contributions thus far. I have fixed my original problem using TMPGenc, but am interested in seeing if such an application exists.

Also Dark Avenger's web site is up, and he has let me know that his MPEG2Cut app does not cut Raw M2V video streams.

Specul8

auenf
27th February 2003, 13:48
Originally posted by specul8
@robz - Yes, I have an M2V video that is 10 minutes and an AC3 audio stream that is 6 minutes. I don't want the first 4 minutes of video. Theoretically I could extend the audio by 4 minutes, mux, trim and demux in TMPGenc, but they would be unnecessary steps if I had an app that trims M2V files, which is why I'm asking the question.

just mux the m2v with the ac3 (dont worry about the different lengths), then trim the first 4 mins off, iirc tmpgenc will only cut the m2v, not the ac3.

Enf...

robz
27th February 2003, 14:17
Auenf wrote: just mux the m2v with the ac3 (dont worry about the different lengths), then trim the first 4 mins off, iirc tmpgenc will only cut the m2v, not the ac3.

Does this work???
Why would TMPGenc not cut the first 4 minutes off the audio??
Would you not run into all kinds of sync problems?

If sync is not really an issue (background music on a home video or so) then one can just use TMPGenc to cut the M2V, right?
So no need to mux before cutting?

auenf
27th February 2003, 14:52
from my experiences, the TMPGEnc cut 'mpeg tool' cant cut an ac3 file, and i usually end up with a mpeg-2 program stream with video only.

im pretty sure the audio will only be cut if its in m2a, havent tried with PCM.

Enf...

Johnny_Deep_Down_Below
27th February 2003, 16:33
Yes, are 3 good commercial tools for Windows, which are able to cut on every frame without reencoding:

1. M2-Edit Pro 5.0 www.mediawaresolutions.com
2. Honestech DVD Plus 2.0 www.honestech.com
3. Video Clip 2.0 Pro www.vitecmm.com

Try them in that order!

oddyseus
27th February 2003, 17:35
U can use Maestro to trim the unwanted part in timeline by draging its end, though u may cut only in I frame. Export the new m2v.

All these ofcourse possible if u have access to Maestro.

robz
27th February 2003, 20:57
You're right... Scenarist lets you do this also. Quite forgot...

But when I tried it it sometimes left audio out of sync. But since that is not too important...


BTW I have never really experienced any problems in cutting MPG in TMPGenc... It is accurate enough to create seemless links between two separately captured parts of a movie. (HW MPEG2 capture)
But then I don't usually cut the m2v only