Log in

View Full Version : Croping/Triming Mpeg-5 AVC files for Idiots (without re-encoding)


mkanet
20th March 2008, 05:10
Does anyone know of a ridiculously simple app that trims/crops AVC files (ripped Blu-ray files) that doesn't re-encode... and most importantly... has a video/audio preview window?

TSremux seems to do everything except actually offer a preview Window.

I'm just looking for something like VideoReDo... with Mpeg4 AVC support.

I don't mind paying for a very basic program that does this.

Thanks so much in advance,
Michael

cestfait
20th March 2008, 07:58
Quicktime Pro can do this on macs with the Perian codecs installed On a mac, I prefer this method, as it can go frame by frame without the hassle of using high-end video editors.

On the windows side, I'm not sure, although it would seem pretty easy to do with neuron2's new avc decoding plugin and trim. I've never used avisynth script without feeding something into an encoder, though, so I'm not sure it you would have to re-encode after all. It would seem pretty ridiculous if you had to re-encode when you've got tools as versatile as avisynth plugins at your command...

Good luck!

bond
20th March 2008, 12:03
for trimming use avidemux.
for cropping without reencoding there is no possibility yet (altough its theoretically possible). i have asked trahald to add it to h264info but it seemes he didnt find the time till now:
http://forum.doom9.org/showthread.php?t=123392

btw using avisynth needs reencoding

mkanet
20th March 2008, 14:14
Thanks. I'm surprised there's no tool that does this. It ridiculous to re-encode something that doesnt need to be re-encoded (if you want to end up it already extremely efficient AVC files. I found TSRemuxer, but it doesnt have a preview window, and the trimming function appears to be broken anyway. The people who talk about it on this forum dont seem to care if it has a preview window or not; just blind cropping.

cestfait
20th March 2008, 20:50
God, I'm an idiot. Just mux it into a Matroska container and use the splitting in mkvtoolnix. You can preview beforehand in some frameserver and then use mkvtoolnix to split it up by timecode. The downside is that you have to split up the whole file (i.e. you can't just cut out one piece-- the one piece comes along with the rest of the video pieces). Shouldn't be to hard though. I think that I actually did this once...

You can probably even use mkvextract to get your raw h264 stream back somehow, too.

Oh, yeah, duh about the avisynth. I can't imagine denoising without re-encoding, for example... Oops!

mkanet
20th March 2008, 21:07
Thanks for the response. I'm actually looking for just a small app that does this (trimming/muxing/preview). The people who made VideoReDO sure had the right idea... too bad it only supports Mpeg1/Mpeg2.

God, I'm an idiot. Just mux it into a Matroska container and use the splitting in mkvtoolnix. You can preview beforehand in some frameserver and then use mkvtoolnix to split it up by timecode. The downside is that you have to split up the whole file (i.e. you can't just cut out one piece-- the one piece comes along with the rest of the video pieces). Shouldn't be to hard though. I think that I actually did this once...

You can probably even use mkvextract to get your raw h264 stream back somehow, too.

Oh, yeah, duh about the avisynth. I can't imagine denoising without re-encoding, for example... Oops!

cestfait
25th March 2008, 17:30
mpeg streamclip.

http://www.squared5.com/

you'll need some quicktime codecs, but it should work...

I guess buying quicktime pro would work, too, since you're using quicktime.

mkanet
25th March 2008, 17:35
I have quicktime pro already on my machine. I'll try it to see if it does this without re-encoding. If it can cut with frame level accuracy with the preview window working, it would be the first app to do this. I'll try it later tonight.

mpeg streamclip.

http://www.squared5.com/

you'll need some quicktime codecs, but it should work...

I guess buying quicktime pro would work, too, since you're using quicktime.

cestfait
26th March 2008, 01:15
If quicktime can decode your video (which it can with the new perian if the clip is x264) than it CAN cut with frame-level accuracy without a re-encode. It will put the streams you select (video, audio, subs) in a .mov container. Just select the clip, cut, and paste into a new project-- then save and you're done unless you want to mux it into another container. I've done this with videos I've encoded with the latest x264 builds, 16 reference/b-frame frame settings and all.

It works!

mkanet
26th March 2008, 16:05
Wow, I didn't realize Quicktime could be used as a cutting tool. I didn't get a chance to try it last night. But, I'm pretty motivated to try it now. It's weird how something so popular and common... on almost every machine... nobody seems to know it can do this!

If quicktime can decode your video (which it can with the new perian if the clip is x264) than it CAN cut with frame-level accuracy without a re-encode. It will put the streams you select (video, audio, subs) in a .mov container. Just select the clip, cut, and paste into a new project-- then save and you're done unless you want to mux it into another container. I've done this with videos I've encoded with the latest x264 builds, 16 reference/b-frame frame settings and all.

It works!

nm
26th March 2008, 16:15
Wow, I didn't realize Quicktime could be used as a cutting tool. I didn't get a chance to try it last night. But, I'm pretty motivated to try it now. It's weird how something so popular and common... on almost every machine... nobody seems to know it can do this!
cestfait is talking about Quicktime Pro, not Quicktime Player.

mkanet
26th March 2008, 16:19
Sorry, but Quicktime doesn't support standard blu-ray format files. I guess nobody tried to see if it actually works.

I just had this feeling it wasn't going to be that easy, or someone would have already suggested it a long time ago..

Error - 2048: Couldn't open the file test.mp4 because it is not a file that QuickTime understands.

I have tried changing the extension of the file, but it doesnt really make any difference. Quicktime just doesn't support these files yet.

mkanet
26th March 2008, 16:49
I have upgraded to the Quicktime Pro version of the player, it doesnt play these standard files.

cestfait is talking about Quicktime Pro, not Quicktime Player.

cestfait
27th March 2008, 05:05
have you installed codecs (i.e. perian)? I have opened 1080p stuff in it before (in an mkv container). Maybe you want to try muxing it into a matroska container?

mkanet
27th March 2008, 05:46
These files are remuxed as .ts files. They playback perfectly in Windows using any directshow media player. I'm not sure how to make it into .mkv.

Thanks for helping..

have you installed codecs (i.e. perian)? I have opened 1080p stuff in it before (in an mkv container). Maybe you want to try muxing it into a matroska container?

cestfait
27th March 2008, 18:54
I think I mentioned mkvtoolnix. Google it and learn it-- it will be worth your time. The matroska container is so amazing!

mkanet
27th March 2008, 20:16
Is there a mkv remuxer for m2ts files that doesnt require to install cgywin? I think just to do a cut on an existing file that already plays in directshow shouldnt require so much trouble. TS has been around a long time. I just remux m2ts to ts.

I think I mentioned mkvtoolnix. Google it and learn it-- it will be worth your time. The matroska container is so amazing!

cestfait
27th March 2008, 21:30
transport streams? I don't know if you can "mux" those... I'm rather uninformed on this count, but I believe your stream needs to be indexed to be put into a container correctly. Could be wrong.

On another note, does "m2ts" mean mpeg-2 transport stream? I thought you said x264?

You might be better off re-encoding anyway. Most BluRay could use a bit of denoising anyways. ;)

mkanet
27th March 2008, 22:02
Thanks for trying to help, but I can't make much sense of what you're saying. The whole point is to not touch the original h.264 encoding, so you don't lose video/audio quality with each new generation of encoding.

TS is a container than holds audio video program streams; just like mkv and m2ts; except much more popular (although, lately mkv a starting to get a little bit more popular). It's easy to remux between these containers if you have the right app; without losing any quality

I guess I'm looking for something that isn't available yet. But, I'm sure one day M2TS will be as common as VOB's; with many different basic tools to choose from.

transport streams? I don't know if you can "mux" those... I'm rather uninformed on this count, but I believe your stream needs to be indexed to be put into a container correctly. Could be wrong.

On another note, does "m2ts" mean mpeg-2 transport stream? I thought you said x264?

You might be better off re-encoding anyway. Most BluRay could use a bit of denoising anyways. ;)

nm
28th March 2008, 04:38
I guess I'm looking for something that isn't available yet. But, I'm sure one day M2TS will be as common as VOB's; with many different basic tools to choose from.
http://forum.doom9.org/showthread.php?t=124080

mkanet
28th March 2008, 04:40
Right.. I saw that, no way I'm doing that that for something this simple. But thanks anyway.

http://forum.doom9.org/showthread.php?t=124080

nm
28th March 2008, 05:29
As far as I can see, you only need Haali's gdsmux. Things get slightly more difficult only if that doesn't work.

mkanet
28th March 2008, 06:35
Oh okay... I was under the impression it requires installing software other than Haali's gdsmux. I'm just used to dragging and droping into a self-contained app (no external dependancies) and select the output file name... thats it. TSMuxer does that.


As far as I can see, you only need Haali's gdsmux. Things get slightly more difficult only if that doesn't work.