Hi All,<br>Please find attached patch for bug fixes in AVI mux module. More details below<br><br>Description<br>===================<br>Fixed bugs in AVI mux to support creation of AVI files with following popular video/audio combinations<br>
(a) MPEG4 video (aka XVID) with MP3/AC3/PCM Audio<br>(b) MJPEG video with PCM audio.<br>AVI as such is not used for storing other formats like H.264, AAC etc<br><br>Bug fix details<br>===================<br>(a) 'hdrl' list size was wrong. It incorrectly included some parts of MOVI list, size taken by hdrl LIST tag and its size and Size of 'RIFF', File size and 'AVI ' type.<br>
(b) Block Align was set to 0 in case of MP3/AC3. It has to be non-zero. It has to been set to 1.<br>(c) XVID video decoders expect header to present as part of first frame. Added code to append header present at end of BITMAPINFOHEADER to beginning of the first video frame in case of XVID video.<br>
(d) nAvgBytesPerSec of Waveformatex was not properly being set in case of PCM audio.<br>(e) Last index entry value was set to garbage due to incorrect index size calculation.<br><br><br>Test PC configuration<br>===================<br>
Tested with Windows Media Player 11 installed on Windows XP Service pack 3 machine with following directshow filters installed<br>(a) XVID MPEG4 video decoder filter for MPEG4 video decoding<br>(b) LAME MP3 codec for MP3 audio decoding<br>
<br><br>Combinations tested<br>====================<br>(a) MPEG4/MP3 transcode<br>vlc -I dummy "Mr_MrsSmith-h264_aac.mp4" :sout="#transcode{vcodec=mp4v,vb=1024,fps=25,acodec=mpga,ab=128}:standard{mux=avi,access=file,dst=out.avi}" vlc://quit<br>
<br>(b) MPEG4/AC3 transcode       <br>vlc -I dummy "Mr_MrsSmith-h264_aac.mp4" :sout="#transcode{vcodec=mp4v,vb=1024,fps=25,acodec=a52, ab=128}:standard{mux=avi,access=file,dst=out.avi}" vlc://quit<br><br>
(c) MPEG4/PCM(16bit) transcode       <br>vlc -I dummy "Mr_MrsSmith-h264_aac.mp4" :sout="#transcode{vcodec=mp4v,vb=1024,fps=25,acodec=s16l}:standard{mux=avi,access=file,dst=out.avi}" vlc://quit<br><br>(d) MPEG4/PCM(24 bit) transcode       <br>
vlc -I dummy "Mr_MrsSmith-h264_aac.mp4" :sout="#transcode{vcodec=mp4v,vb=1024,fps=25,acodec=s24l}:standard{mux=avi,access=file,dst=out.avi}" vlc://quit<br><br>(e) MPEG4/PCM(32bit) transcode       <br>vlc -I dummy "Mr_MrsSmith-h264_aac.mp4" :sout="#transcode{vcodec=mp4v,vb=1024,fps=25,acodec=s32l}:standard{mux=avi,access=file,dst=out.avi}" vlc://quit<br>
<br>(f) MJPEG/PCM(32bit) transcode       <br>vlc -I dummy "Mr_MrsSmith-h264_aac.mp4" :sout="#transcode{vcodec=mjpeg,vb=1024,fps=25,acodec=s32l}:standard{mux=avi,access=file,dst=out.avi}" vlc://quit<br>
<br>Regards<br>Ashok<br><br><div style="visibility: hidden; left: -5000px; position: absolute; z-index: 9999; padding: 0px; margin-left: 0px; margin-top: 0px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 130%;" id="avg_ls_inline_popup">
</div>