News:

--

Main Menu

avi -> mp4

Started by UKenGB, September 14, 2017, 11:59:29 AM

Previous topic - Next topic

UKenGB

I have some avi files that I want to convert to mp4, so I open first in AVD (2.7) with 'copy' for audio and video and then save. At the end there was a message about some missing timing information, but it did save an mp4 file that will play in VLC (and AVD), but not in QuickTime, which helpfully just says "can't do that".

I've tried re-muxing it again with other utilities and even AVD again, but nothing I do will make this play in QuickTime. So the obvious question:-

What is the problem and how can I convert an avi file to mp4 and that will play in QT?

eumagga0x2a

Which video codec is used in these AVI files? If h264, you are currently out of luck, because AVI doesn't store presentation time stamps (PTS) of video frames, required for modern codecs like h264. Avidemux needs precise PTS for (almost) all frames to be able to do anything useful with a video. Without this info being provided by the container, the only reliable way to retrieve it is to decode the entire video, which Avidemux currently won't do (it could take hours with long videos and weak hardware).

In doubt, please provide a sample.

UKenGB

Well that sounds about right, but it doesn't look like the first one I tried is H264. Here's the MediaInfo output for this file:-

General
Format                                   : AVI
Format/Info                              : Audio Video Interleave
Format profile                           : OpenDML
Format settings                          : rec
File size                                : 1.17 GiB
Duration                                 : 1h 24mn
Overall bit rate                         : 1 987 Kbps
Writing application                      : AVI-Mux GUI 1.17.8.3, Feb 16 201019:42:50

Video
ID                                       : 0
Format                                   : MPEG-4 Visual
Format profile                           : Advanced Simple@L5
Format settings                          : BVOP2
Format settings, BVOP                    : 2
Format settings, QPel                    : No
Format settings, GMC                     : No warppoints
Format settings, Matrix                  : Default (H.263)
Muxing mode                              : Packed bitstream
Codec ID                                 : XVID
Codec ID/Hint                            : XviD
Duration                                 : 1h 24mn
Bit rate                                 : 1 788 Kbps
Width                                    : 720 pixels
Height                                   : 384 pixels
Display aspect ratio                     : 1.85:1
Frame rate                               : 30.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.216
Stream size                              : 1.05 GiB (90%)
Writing library                          : XviD 66

Audio
ID                                       : 1
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Format settings, Endianness              : Big
Codec ID                                 : 2000
Duration                                 : 1h 24mn
Bit rate mode                            : Constant
Bit rate                                 : 192 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Frame rate                               : 31.250 fps (1536 SPF)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 116 MiB (10%)
Alignment                                : Aligned on interleaves
Interleave, duration                     : 64 ms (1.92 video frames)
Interleave, preload duration             : 192 ms
Title                                    : T2_Audio - English
Service kind                             : Complete Main

eumagga0x2a

So the problem is QuickTime, not Avidemux. Does QuickTime play this video when you reencode it as h264? (Try with a short excerpt first.) If not, don't use QuickTime...

UKenGB

Quote from: eumagga0x2a on September 14, 2017, 12:34:59 PM
So the problem is QuickTime, not Avidemux. Does QuickTime play this video when you reencode it as h264? (Try with a short excerpt first.) If not, don't use QuickTime...

Yes it could be QT, but I'd like to establish what the problem actually is so I can potentially avoid it in future and I prefer it if all my videos play in everything so I know they're correct.

I'll try re-encoding something and see how that works, but what is actually wrong with this file that QT won't play it, yet VLC will?

eumagga0x2a

Quote from: UKenGB on September 14, 2017, 05:00:01 PM
I'll try re-encoding something and see how that works, but what is actually wrong with this file that QT won't play it, yet VLC will?

A video codec which is not supported by QuickTime.

Jan Gruuthuse

Video Codec ID                                 : XVID not playing in QuickTime.

You do have this installed: the DivX codec
source: XviD codec for Mac