Opened 15 years ago

Closed 15 years ago

#4225 closed bug (fixed)

OpenDML type AVIs does not work with avi_reader (and h264 codec table fix patch)

Reported by: herdemir Owned by: stippi
Priority: normal Milestone: R1
Component: Audio & Video/Codecs Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Actually not just problems about the subject, but also some other problems during investigation:

  • While avi_reader can handle standart AVI files, it cannot handle OpenDML type AVI files. Tested with some avi files with both types and seen that avi_reader can only hanlde 'AVI ' chunk(1-2MB), which shows ~ 5secs video/audio, then gets end of file error. In OpenDML after the 'AVI ' comes 'AVIX' chunk which rest of the stream (179 MB) is, cannot be played. As a temporary solution I switched to ffmpegs AVI reader and it was fine. So, it would be better for the time being to switch to ffmpegs avi reader, until avi_reader can handle it.
  • While testing avi files, some of them was using H264 video codec, which should play normally, but wasn't working. After some investigation the H264 section of B_AVI_FORMAT_FAMILY in CodecTable was entered wrongly. After fixing it, I could watch them correctly. A fix is attached.
  • Another problem was, while playing Standart AVI files(XVID & MP3), the sounds get muted after some time or after seeking. Tried with several combinations:
    - avi_reader & ffmpeg mp3 decoder
    - ffmpeg avi reader & (native)mp3Decoder
    - ffmpeg avi reader & ffmpeg mp3 decoder
    
    still it didn't solve the mute problem. I suspect it's related to MediaPlayer, not codec related.
  • Last problem I could remember is related to ffmpeg. While using avi_reader with an h264 avi file, the video was playing in B_YCbCr422 colorspace. But when using with ffmpeg avi reader, the color space it was using was B_RGB32 and (in some avis, not all) half of the video was showing in green. Even tough some videos did show normal, the conversion to B_RGB32 then to Overlay was consuming much more CPU then B_YCbCr422 to Overlay. It is related either to the ffmpeg reader or MediaPlayer.

Sorry for writing it long. And just one question left. I'm trying to learn BeOS/Haiku API and its kit, to contribute in the future. I don't have much pratical experience(except Java & .Net), even though I'm computer engineering student :P. I'm trying to update mp3decoder with the mpg123 1.8.1 library. While trying to update i encountered with stack alignment problem. Is the stack alignment problem fixed in Haiku? If it is how can I clear this stack alignment problem? Some tips could be also enough. Again sorry for writing it sooo long.

Tested with hrev32270 GCC4. The stack alignment problem is tested with GCC2 one, didn't test with GCC4 one.

Attachments (3)

h264_codec_table_fix.diff (1.1 KB ) - added by herdemir 15 years ago.
AVI_MP3_Decoder_crash.txt (1.7 KB ) - added by herdemir 15 years ago.
AVI_MP3_Decoder_crash2.txt (1.5 KB ) - added by herdemir 15 years ago.

Download all attachments as: .zip

Change History (10)

by herdemir, 15 years ago

Attachment: h264_codec_table_fix.diff added

comment:1 by axeld, 15 years ago

Owner: changed from marcusoverhagen to stippi

Since I'm not sure whether stippi just got it wrong, or actually has AVIs with reversed FourCC codes, I'm assigning this to him to have another look.

comment:2 by herdemir, 15 years ago

Version: R1/pre-alpha1R1/Development

The problem with avi_reader not opening OpenDML files is actually not a bug, but an unimplemented class in OpenDMLIndex.cpp file. Tried to force to use FallbackIndex but it didn't worked.

comment:3 by dlmcpaul, 15 years ago

An example AVI file that fails would be useful.

comment:4 by dlmcpaul, 15 years ago

I have added support for ODML Indexes. Please restest your ODML files.

comment:5 by herdemir, 15 years ago

Sorry for late response. In short it works, before I write my long answer. Even avi files with H264 codec works, if you update the codec table like the above patch.

Now the problem I have maybe unrelated to this. Any video file MP4, AVI or MPG has problems with audio. The video/audio is not in sync and the audio plays either quickly (MP4, non ODML AVI, MPG) or plays random parts of the audio(ODML AVI). The video parts play fine without a problem. I don't know after which rev. it began to occur, but I think it's related to the recent Chunk size changes in Media Kit or MediaPlayer related.

Just audio files, like MP3, M4A(AAC LC), plays fine except that, when you open them they start to play at 5~10 sec. position of the file. I have to manually seek to back again to listen from start.

All files plays fine with VLC.

Tested with hrev34370.

I will also upload some crash logs from opening some avi files, that crashes audio decoder, while the video play fine in background.

by herdemir, 15 years ago

Attachment: AVI_MP3_Decoder_crash.txt added

by herdemir, 15 years ago

Attachment: AVI_MP3_Decoder_crash2.txt added

comment:6 by nielx, 15 years ago

patch: 1

comment:7 by stippi, 15 years ago

Resolution: fixed
Status: newclosed

Applied in hrev36847. Thanks and sorry for the long delay!

Note: See TracTickets for help on using tickets.