Author Topic: MCIWndCreate  (Read 2296 times)


  • Member
  • *****
  • Posts: 13661
  • Assembly is fun ;-)
    • MasmBasic
« on: June 05, 2017, 08:49:33 AM »
I am working on a little MCI player, as discussed in this old thread.

The good news: It works fine with .wav, .mp3, .mid, .cda, .asf, .avi, .mpg, .wmv, whatever.
The bad news: No sound with any of the videos.

Sound works fine with the audio formats. Video and sound work fine with the FLV and VLC players. So the codecs must be installed...

Any ideas? This is Win7-64.

*** hours later: ***

SOF saved me :t

You can use ffpmeg (Windows builds here) with the -i switch:
ffmpeg -i myfile.avi

So I went there and downloaded ffmpeg. It turns out there is no ffmpeg but mplayer.exe instead. So, being courageous, I ran that one... and ... scary things happen :(

For whatever reasons, mplayer scans all Windows fonts. Fortunately, it does it only once, and afterwards it actually played my video correctly, with sound :eusa_dance:

And it gave me some info (the error was really in red):
Requested audio codec family [g726] (afm=acm) not available.
Enable it at compilation.

Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 8000 Hz, 1 ch, s16le, 32.0 kbit/25.00% (ratio: 4000->16000)
Selected audio codec: [ffg726] afm: ffmpeg (FFmpeg G.726 Audio)

Oh well... so I found that codec at free-codecs and installed it. With miraculous effects: My ultra-simple code works :t

Why couldn't MCI give me that simple info? A case of lousy documentation and lousy error messages, Windows at its best.

There was still a "problem with the device driver" error with an avi file: "There was a problem with the device driver. Request a new driver to the device manufacturer.". Since I have no idea which device Windows means, and who is the device manufacturer, I guessed, based on 25 years of experience with Windoze, that changing the extension to wmv might be worth a try. Problem solved, it works 8)

Btw even after a reboot VLC and FLV are still complaining that they can't play the videos. Not my problem any more :biggrin:
« Last Edit: June 05, 2017, 10:49:15 AM by jj2007 »