[Resolved] Why can't I play .avi videos in natively installed Haiku?

I have both Haiku (r29155) and Senryu (r29143) installed natively on my Asus EeePC 901 and, in general, both operate well.
While .mp3 files play without problems in both, when I try to play a .avi video, I can get the sound but not the video.
This happens whether I use the MediaPlayer or VLC 0.8.6d (I’ve also tried VLC 0.8.6c with the same results).
I’ve received comments from others that the problem may be related to my .avi file. However, this plays perfectly in VLC 0.8.6e on the Ubuntu partition on the same machine.
Somebody else mentioned that this may be a Haiku bug. However, this video tutorial shows video working perfectly in Haiku.
Additionally, this post mentions exactly the same problem (sound but no video) but claims “that will soon change, maybe as soon as tomorrow”. Given that this post is almost three years old, it’s not unreasonable to conclude that “tomorrow” has arrived already.
Can anybody please un-confuse me?

Just a little more information on this problem:

  1. The graphics card in my EeePC 901 is described as “Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)”.
    This suggests that the apparent inability of media players to play videos in Haiku (or Senryu) on this machine may be related to the bug referred to in this ticket.
  2. Videos play fine (well, almost) in VLC-0.8.6d in Senryu VM (VMware Server) on an old Dell 4550 which has a nVidia GeForce4 MX 420 card. The videos are watchable but just a little choppy. However, nearly everything in this Senryu VM is slowish on my Dell 4550.
    This observation strengthens my belief that my inability to play videos in Haiku on the EeePC 901 is because of Haiku’s incompatibility with the Intel 945GM graphics card.

Only thing I could maybe recommend trying is to disable Overlay in the VLC video settings. I know the Overlay has been sketchy and broken on some intel extreme video chips using the Haiku driver.

Until recently it failed on my i865 as well, unless i disabled the overlay - but Axel recently fixed it on that chip.

Magic!
That simple tweak worked perfectly in both Haiku (r29246) and Senryu (r29143) on the EeePC 901.
Thanks a lot.

Video should play fine as long as the codec is supported.

Perhaps you can run MediaPlayer from the terminal and attach the output to this forum.

Some more information about the video would also help.

Cheers
David

[quote=dlmcpaul]
Perhaps you can run MediaPlayer from the terminal and attach the output to this forum.[/quote]

~> MediaPlayer
_ExponentialToLinear 6.0000 => 6.0000
_ExponentialToLinear -60.0000 => -60.0000
_ExponentialToLinear 0.0000 => 0.0000
MainWin::_SetupWindow
FrameResized enter: newWidth 297, newHeight 73
video view hidden: 0
FrameResized leave
MainWin::MessageReceived: B_SIMPLE_DATA
open ref: 00031.avi
MainWin::OpenFile
PluginManager::CreateDecoder: can’t get decoder for format: Bad media format
MediaExtractor::CreateDecoder _plugin_manager.CreateDecoder failed for stream 0, format: cvideo;0;2.23505e+06;2.98007e+06;0;(15.0001;0x0;1;320;240;0;TopLR;1;1)
Controller::SetTo: 1 audio track, 1 video track
AudioAdapter() - using format converter
AudioAdapter() - using resampler
AudioAdapter() - using channel converter
MediaTrackVideoSupplier::_SwitchFormat() - fVideoTrack->DecodedFormat(): Initialization failed - retrying with B_RGB32
MediaTrackVideoSupplier::_SwitchFormat() - fVideoTrack->DecodedFormat(): Initialization failed - giving up
VideoView::SetPlaying(0)
VideoView::SetPlaying(0)
running without video node
BMediaEventLooper: SchedulingLatency is 0
BMediaRoster::SetTimeSourceFor: node 4 time source 2 enter
BMediaRoster::SetTimeSourceFor: node 4 time source 2 leave
AudioAdapter() - using format converter
AudioAdapter() - using resampler
AudioAdapter() - using channel converter
BMediaRoster::Connect connection established!
performance time for 90477869: 64286627
B_START: start time: 64286627
VideoView::SetPlaying(1)
MainWin::_SetupWindow
VideoView::SetPlaying(0)

The first seven lines appeared when I launched MediaPlayer from the terminal. All of the subsequent lines resulted after I dropped in the video file (.avi)

The video was a simple .avi that I shot using a Canon Powershot A640

The relevant part is here

PluginManager::CreateDecoder: can’t get decoder for format: Bad media format
MediaExtractor::CreateDecoder _plugin_manager.CreateDecoder failed for stream 0, format: cvideo;0;2.23505e+06;2.98007e+06;0;(15.0001;0x0;1;320;240;0;TopLR;1;1)

There is likely no codec for the video. Showing the info window might give more information about what the codec needed is.

If you can make the video available then I can look into it further.

Thanks.
The GetInfo window for this video (which I was unable to copy) gives no additional information other than that this is a AVI Movie (which is hardly a surprise).
I sent you the .avi file by PM.

I have sent you some test codecs to try.

But for others who might read this thread.

The MJPEG codec did not correctly recognise the codec id in the file. I fixed that.
The file was not a complete AVI file, it was truncated and so was missing an index. I have a change that creates indexes for such files.
The MJPEG codec does not support RGB32 output so it will only work where the video driver supports overlay (YUV).

As always I am interested in media files that do not work under MediaPlayer.

I have commited a number of fixes to avi_reader and avcodec that should improve video playback for avi files.

The revised codecs (avcodec and avi_reader) that David kindly sent me have completely resolved the issues I had in getting MediaPlayer to play .avi files on my Asusu EeePC 901.