Lossless append,cut&paste of MP4 digicam videos possible?

Started by pstein, February 05, 2012, 08:35:12 AM

Previous topic - Next topic

pstein

I have a couple of *.MP4 videos from a digicam which I want to append or cut with Avidemux.

Is this LOSSLESS (!) possible with Avidemux?

The used codecs as are shown in the following snapshot from MediaInfo:

http://www.bild.me/bild.php?file=4986772Capture-20120205-093005.png

If I want/need to re-encode the videos: Which codec should I use?

Thank you
Peter

Jan Gruuthuse

Try with MPEG-PS with copy for both Video & Audio. Content should stay the same. Then the end result could be re-packaged/re-encoded to suit your needs. Repackaging is with copy for both Video & Audio, just selecting another format: MKV, TS, AVI, ... depending on the capabilities of the device(s) you want to play the video on.  Try with small sample video and find out what works best for you.
Documentation: http://www.avidemux.org/admWiki/doku.php

Agent_007

QuoteTry with MPEG-PS with copy for both Video & Audio.
You meant MP4?
I am away between 15th of May - 15th of June. (yes, I am playing D3)

styrol

QuoteI have a couple of *.MP4 videos from a digicam which I want to append or cut with Avidemux.

Is this LOSSLESS (!) possible with Avidemux?

Yes it is, if your videos are from the same source and use the same settings (codecs, resolution, sample rate, frame rate). As your camera uses MPEG-4 ASP to encode, even smart copy is available and you shouldn't run into AV sync problems using Avidemux 2.5.

Use "Video:Copy", "audio:Copy"and "MP4" as container format.

Jan Gruuthuse

Quote from: Agent_007 on February 05, 2012, 11:07:55 AM
QuoteTry with MPEG-PS with copy for both Video & Audio.
You meant MP4?
Was put on wrong foot withSony psp reference. :-[

fjawodfc

What does the save window look like for a lossless trim?  I opened an MP4, trimmed a few minutes off, and saved with settings copy/copy/MP4, but the progress window said "encoding" and took about 60 seconds for 1.6 GB.  If it was a straight save then it should have taken 30 seconds or less at 50 MB/s, which is already conservative.

Jan Gruuthuse

#6
That windows always shows encoding when saving and shows the estimated time. With avidemux 2.6 i'm getting 2.1 GB mp4 clip on average in 6 seconds on 64-bit ubuntu with cpu Core i5-2500K 16 GB ram on SATA-600 Caviar Black WD1002FAEX hard disk
Don't think this is due to avidemux: has no control over this. Bottleneck could be any where: System load, hard disk, os, memory, ...
Test: loading mp4 2.32 Gib resolution 720x576
Doing exact the same, clipping at the end, keeping 1 hour of video.

styrol

Quote from: fjawodfc on March 12, 2012, 06:58:22 AM
What does the save window look like for a lossless trim?  I opened an MP4, trimmed a few minutes off, and saved with settings copy/copy/MP4, but the progress window said "encoding" and took about 60 seconds for 1.6 GB.  If it was a straight save then it should have taken 30 seconds or less at 50 MB/s, which is already conservative.
What really matters is the fact you can do lossless trimming/editing at all (most other software always forces you to re-encode). And if smart editing is possible (MPEG-4 ASP), there are some frames to be re-encoded / rearranged what makes it a bit more time consumptive than just copying.

fjawodfc

I have an i7-2600K and a 7200 RPM drive in Windows 7 x64.  I tried writing to my SSD and it finished in 22 seconds, and then when I immediately saved again to the HDD it took only 5 seconds.  I guess it's a mix of delayed writing, memory caching, etc.

Still, is there any way to confirm whether it re-encoded or not?  I can't compare bit rates because it's VBR and trimming a couple of minutes will always change the average rate.  The time is about the same if I save to a different format like AVI, which suggests that it's doing the same thing regardless.

Jan Gruuthuse

When using video:copy audio:copy no re-encoding takes place in video and audio content. The content is taken from one container and put in another container.

styrol

Quote from: fjawodfc on March 12, 2012, 06:58:22 AM
the progress window said "encoding" and took about 60 seconds for 1.6 GB
H.264 encoding of 1.6 GB video in 1 minute - that would be great...

As Jan already mentioned, if you are in Copy mode, there is no re-encoding.