We all know Window Media Player can't play rm file by default if we haven't installed extra codec. K-Lite Mega Codec Pack or ffdshow can't help. But After PC install Alternative 2.0.2,Window Media Player is able to play rm file. Here is the link http://www.free-codecs.com/download/...lternative.htm.
Is it possible to play rm using mciSendString API? What is the devicename for rm file?
Code:
' Specify the name of the device
Select Case DeviceType
Case cdaudio
DeviceName = "cdaudio"
Case AVIVideo
DeviceName = "avivideo"
Case Sequencer
DeviceName = "Sequencer"
Case WaveAudio
DeviceName = "WaveAudio"
Case MPEGVideo
DeviceName = "mpegvideo"
Case MPEGVideo2
DeviceName = "mpegvideo2"
Case MPEGVideo4
DeviceName = "mpegvideo4"
Case VCR
DeviceName = "vcr"
Case VideoDisc
DeviceName = "videodisc"
Case Overlay
DeviceName = "overlay"
Case REALPLAYER
DeviceName = "RealPlayer"
Case OtherDeviceType
DeviceName = "other"
Case Else
DeviceName = "other"
End Select
General
Complete name : C:\Movie\Incoming\Ladybird.rm
Format : RealMedia
File size : 261 MiB
Duration : 1h 20mn
Overall bit rate : 450 Kbps
Movie name : Ladybird
Video
ID : 1
Format : RealVideo 4
Codec ID : RV40
Codec ID/Info : Based on AVC (H.264), Real Player 9
Duration : 1h 20mn
Bit rate : 386 Kbps
Width : 320 pixels
Height : 240 pixels
Display aspect ratio : 4:3
Frame rate : 30.000 fps
Bits/(Pixel*Frame) : 0.167
Stream size : 222 MiB (85%
Audio
ID : 0
Format : Cooker
Codec ID : cook
Codec ID/Info : Based on G.722.1, Real Player 6
Duration : 1h 20mn
Bit rate : 64.1 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Bit depth : 16 bits
Stream size : 36.9 MiB (14%)
I am sure the code can't be wrong. I can open most of common format like AVI,MOV,MP3... except of "rm", "ram", "ra","flv"...etc.
Go back to old question:
If mciSendString can open rm (based on Window Media Player can open rm after installed Alternative 2.0.2),what is the devicetype name I should put: is it pmegvideo or other or realplayer or...???
Here are the openstring in debug window:
open mpegvideo!C:\Movie\ladybird.rm alias MCIMedia wait parent 918236 shareable style child
or
open other!C:\Movie\ladybird.rm alias MCIMedia wait parent 918236 shareable style child
or
open realplayer!C:\Movie\ladybird.rm alias MCIMedia wait parent 918236 shareable style child
Last edited by Jonney; Jun 17th, 2010 at 01:29 AM.
1. Regedit.exe to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions
2. Add a new string value and name it the extension you desire(mine was "rmvb"), and make the data: MPEGVideo
Should work, also, clearly use "devicename" MPEGVideo in your VB6 code. Or just omit it, and MCI will detect it automatically.
1. Regedit.exe to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions
2. Add a new string value and name it the extension you desire(mine was "rmvb"), and make the data: MPEGVideo
Should work, also, clearly use "devicename" MPEGVideo in your VB6 code. Or just omit it, and MCI will detect it automatically.