rowleya / vicovre

Automatically exported from code.google.com/p/vicovre
0 stars 0 forks source link

WMV/MP4 files broken #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
WMV and MP4 files that have been downloaded will not play with their respective 
default players, WMP and QT, on Windows. It appears that the audio stream in 
these files is truncated after testing with mplayer:

mplayer -ao null -vo null <file.[wmv|mp4]>

Original issue reported on code.google.com by james.pe...@googlemail.com on 16 Sep 2011 at 4:19

GoogleCodeExporter commented 9 years ago
I'll look into it soon.

Original comment by james.pe...@googlemail.com on 20 Sep 2011 at 10:16

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
There appear to be two issues:

1.
The number of packets specified in the header is an estimate of the maximum. 
Extra empty packets are written if the compression is smaller than predicted 
(+ve number of 'extra packets' written). However it over seems to be often that 
the the maximum is exceeded (-ve number of 'extra packets' written).

2.
Files can be fixed by repackaging them using SUPER. Set container to WMV and 
copy video and audio streams.

Windows reports different properties for the files before and after. eg for a 
small wmv file:

Before:
Bitrate 528kbps

After:
Bitrate 128kbps
Dimensions: 528x320

Original comment by james.pe...@googlemail.com on 16 Feb 2012 at 3:27

GoogleCodeExporter commented 9 years ago
The over run packets are not (sent?) written out. eg

Written 25 packets
Writing -3 extra packets

The wmv file only contains 22 packets 

Original comment by james.pe...@googlemail.com on 20 Feb 2012 at 2:18

GoogleCodeExporter commented 9 years ago
Packet miscalc caused by video track bitrate being set to 400000 +/-16000 for 
528x320

According to MPEG4Encoder.java formula is 200000 * w*h/(320*240) =>440000 +/- 
17600

Simple rounding error!

Original comment by james.pe...@googlemail.com on 20 Feb 2012 at 5:39

GoogleCodeExporter commented 9 years ago
MP4

mp4box -info <file>

does a great job of reporting issues:

[iso file] Box "mdhd" has 4 extra bytes
[iso file] Box "dref" has 12 extra bytes
[ODF] Error reading descriptor (tag 4 size 60): Invalid MPEG-4 Descriptor
[iso file] Box "mdhd" has 4 extra bytes
[iso file] Box "dref" has 12 extra bytes
[ODF] Error reading descriptor (tag 8 size 6): Invalid MPEG-4 Descriptor
[ODF] Error reading descriptor (tag 4 size 17): Invalid MPEG-4 Descriptor

etc

Original comment by james.pe...@googlemail.com on 21 Feb 2012 at 4:12

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1022.

Original comment by `` on 21 Feb 2012 at 4:56

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1023.

Original comment by `` on 22 Feb 2012 at 12:09

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1024.

Original comment by `` on 22 Feb 2012 at 1:55

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1025.

Original comment by `` on 22 Feb 2012 at 2:00

GoogleCodeExporter commented 9 years ago
WMV now play from r1021, they is still an issue with computing npackets too 
small which causes the audio to be truncated at the end of the file. Opened 
issue 15 to tackle this.

MP4 issues were fixed by r1024

Original comment by james.pe...@googlemail.com on 22 Feb 2012 at 2:17

GoogleCodeExporter commented 9 years ago

Original comment by james.pe...@googlemail.com on 22 Feb 2012 at 2:20