Author Topic: Lossless append,cut&paste of MP4 digicam videos possible?  (Read 12197 times)

pstein

  • Jr. Member
  • **
  • Posts: 87
Lossless append,cut&paste of MP4 digicam videos possible?
« on: February 05, 2012, 08:35:12 AM »
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
« Last Edit: February 05, 2012, 08:38:00 AM by pstein »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6051
Re: Lossless append,cut&paste of MP4 digicam videos possible?
« Reply #1 on: February 05, 2012, 09:07:03 AM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3163
Re: Lossless append,cut&paste of MP4 digicam videos possible?
« Reply #2 on: February 05, 2012, 11:07:55 AM »
Quote
Try 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

  • Hero Member
  • *****
  • Posts: 533
Re: Lossless append,cut&paste of MP4 digicam videos possible?
« Reply #3 on: February 05, 2012, 12:04:40 PM »
Quote
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?

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

  • Hero Member
  • *****
  • Posts: 6051
Re: Lossless append,cut&paste of MP4 digicam videos possible?
« Reply #4 on: February 05, 2012, 12:27:49 PM »
Quote
Try with MPEG-PS with copy for both Video & Audio.
You meant MP4?
Was put on wrong foot withSony psp reference. :-[

fjawodfc

  • Newbie
  • *
  • Posts: 2
Re: Lossless append,cut&paste of MP4 digicam videos possible?
« Reply #5 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.

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6051
Re: Lossless append,cut&paste of MP4 digicam videos possible?
« Reply #6 on: March 12, 2012, 08:00:14 AM »
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.
« Last Edit: March 12, 2012, 08:02:38 AM by Jan Gruuthuse »

styrol

  • Hero Member
  • *****
  • Posts: 533
Re: Lossless append,cut&paste of MP4 digicam videos possible?
« Reply #7 on: March 12, 2012, 09:31:19 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

  • Newbie
  • *
  • Posts: 2
Re: Lossless append,cut&paste of MP4 digicam videos possible?
« Reply #8 on: March 12, 2012, 01:58:47 PM »
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.
« Last Edit: March 12, 2012, 02:10:33 PM by fjawodfc »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6051
Re: Lossless append,cut&paste of MP4 digicam videos possible?
« Reply #9 on: March 12, 2012, 04:50:47 PM »
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

  • Hero Member
  • *****
  • Posts: 533
Re: Lossless append,cut&paste of MP4 digicam videos possible?
« Reply #10 on: March 12, 2012, 07:12:19 PM »
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.