News:

--

Main Menu

Lossless converting AVI to MP4 possible?

Started by thoste, February 05, 2022, 08:40:39 PM

Previous topic - Next topic

thoste

I plan to convert a couple of old AVI videos to MP4 (container).

More precisely: to re-package them lossless from AVI container to MP4 container WITHOUT re-encoding.

Therefore I drag & drop an AVI file onto newest AVidemux, then select MP4 output and video+audio "copy" and the save it.

Will this result in a full MP4 video?
As far as I can see no re-encoding takes places.
Is this really a full conversion or is this only a stupid partial workaround?

Does it depend from the used video codec (e.g. Xvid or AVC H.264)?

eumagga0x2a

Quote from: thoste on February 05, 2022, 08:40:39 PMvideo+audio "copy" and the save it.

Will this result in a full MP4 video?

Yes, unless it fails due to an incompatible codec or broken timing in the source file (don't forget, AVI container doesn't provide presentation timestamps (PTS) needed for all codecs like H.264 which work with frame reordering known as "B-frames" so that applications have to create a proper timing themselves based on decode timestamps only).

Quote from: thoste on February 05, 2022, 08:40:39 PMIs this really a full conversion or is this only a stupid partial workaround?

I fear, I don't follow you. If Avidemux succeeds reconstructing information missing by design in AVI like PTS and the audio and video streams are compatible with the MP4 container, the MP4 muxer outputs a MP4 file with all streams copied frame for frame (Annex B type H.264 losslessly converted to ISO type stream).

Quote from: thoste on February 05, 2022, 08:40:39 PMDoes it depend from the used video codec (e.g. Xvid or AVC H.264)?

Yes, it does. Many rarely used codecs (i.e. not H.264 and not Xvid), accepted in AVI, are not compatible with MP4, in which case you get an error message and no MP4 file is generated.