mencoder produces AVI with no audio if it is just above ODML chunk boundary

Bug #1329145 reported by Johan Ehnberg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mplayer (Ubuntu)
New
Undecided
Unassigned

Bug Description

Ubuntu 14.04 LTS mplayer 2:1.1+dfsg1-0ubuntu3

This bug is easy to reproduce. I noticed it while uncompressing scenes from my camera for editing.

My projects have 1-100 clips and I stumble upon this about 1 in 15 uncompressed files, indicating that the concerned AVI files are around ODML chunk boundary to chunk+(chunk/15) in size, something like 1020-1080 MB. For example, one testfile I use for this bug report lands at 1122064044 bytes.

Consider an input file with 1920x1080p at 30000/1001 (~29.970) FPS video and with 48000 Hz 16 bit 2 channel audio. Format should not matter - when uncompressed to raw yv12 and PCM, at 12 seconds, it lands at the above size.

Playing back the original works with audio:
mplayer source.mp4 -endpos 00:00:12.000

Uncompressing the same clip and playing back results in no audio playback:
mencoder -oac pcm -ovc raw source.mp4 -endpos 00:00:12.000 -o test.avi
mplayer test.avi

Chaging the end position earlier or later results in audio stream working like it should:
mencoder -oac pcm -ovc raw source.mp4 -endpos 00:00:11.000 -o test.avi
mplayer test.avi
OR
mencoder -oac pcm -ovc raw source.mp4 -endpos 00:00:13.000 -o test.avi
mplayer test.avi

Tests done to rule out other factors:
- shifting starting position does not change result
- changing source file does not change result
- running on another computer does not change result (both 3rd gen Intel core, but uncompressed should not be algorithm related?)
- running another version (12.04 LTS mplayer 2:1.0~rc4.dfsg1+svn34540-1) does not change result
- playing back with VLC does not change result

Workarounds:
- splitting a scene in two clips
- changing scene duration

There are two specific rows to look for indicating the issue was triggered. mencoder informs about the ODML chunk just before finishing the file (I think the number or MB varies between 1021 and 1023):
Pos: 11.5s 347f (39%) 23.47fps Trem: 0min 2615mb A-V:0.035 [741439:1536]]
ODML: Starting new RIFF chunk at 1022MB.
Pos: 12.0s 361f (40%) 23.50fps Trem: 0min 2658mb A-V:0.046 [741607:1536]

Flushing video frames.

And mplayer informs about the audio stream missing:
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
AVI: ODML: Building ODML index (1 superindexchunks).

Badly interleaved AVI file detected - switching to -ni mode...
AVI: No audio stream found -> no sound.
VIDEO: [YV12] 1920x1080 12bpp 29.970 fps 741607.2 kbps (90528.2 kbyte/s)

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: mencoder 2:1.1+dfsg1-0ubuntu3
ProcVersionSignature: Ubuntu 3.13.0-27.50-generic 3.13.11
Uname: Linux 3.13.0-27-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Jun 12 10:32:53 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2012-09-05 (644 days ago)
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120823.1)
SourcePackage: mplayer
UpgradeStatus: Upgraded to trusty on 2014-03-16 (87 days ago)

Revision history for this message
Johan Ehnberg (johan-ehnberg) wrote :
description: updated
description: updated
description: updated
Revision history for this message
Johan Ehnberg (johan-ehnberg) wrote :

Further testing shows that it actually only occurs just after the first chunk end. With the description's specifications, that is between 11.550-12.500 seconds of video or 1078431852-1165705924 bytes of output file size, tested with 0.05 second precision.

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.