[RESOLVED] Can mciSendString Open rm File?
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
Re: Can mciSendString Open rm File?
Have you tried digitalvideo? Or perhaps overlay? Maybe other?
http://social.msdn.microsoft.com/Sea...ery=mci+device
I tried it with the MMControl, and MPEGVideo seems to work just fine for rmvb.
Re: Can mciSendString Open rm File?
Quote:
Originally Posted by
FireXtol
I have tried every Devicetype,but it doesn't work. Noted: I used MCISendString API instead of MMControl.
I haven't yet successfully googled a result about MCISendString to open rm file.
Re: Can mciSendString Open rm File?
How are you calling it?
AFAIK the MMControl uses MCI.
Furthermore, what's the return value when you attempt to open an RM? Have you passed it to mciGetErrorString? If so, what is the error description?
1 Attachment(s)
Re: Can mciSendString Open rm File?
Quote:
Originally Posted by
FireXtol
How are you calling it?
AFAIK the MMControl uses MCI.
Furthermore, what's the return value when you attempt to open an RM? Have you passed it to mciGetErrorString? If so, what is the error description?
See attached pic.
I haven't seen any VB example using mciSendString to open rm file yet. I am not sure "MMControl uses MCI". I will do a search.
Re: Can mciSendString Open rm File?
So what's the actual line of code you're using?
Re: Can mciSendString Open rm File?
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%)
Re: Can mciSendString Open rm File?
Quote:
Originally Posted by
FireXtol
So what's the actual line of code you're using?
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:
Quote:
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
Re: Can mciSendString Open rm File?
Well, I just got it to work.
Here's how:
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.
Enjoy.
Re: Can mciSendString Open rm File?
Quote:
Originally Posted by
FireXtol
Well, I just got it to work.
Here's how:
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.
Enjoy.
hahahaha, it works!!! THANKS.
Re: Can mciSendString Open rm File?
Found this link on MS Support about MOV(QuickTime) not working in some MS product(PowerPoint), and that was the solution(eg. name:MOV data:MPEGVideo).
http://support.microsoft.com/kb/266983
Re: Can mciSendString Open rm File?
Quote:
Originally Posted by
FireXtol
Thank you very much.
That means if we installed codec, mciSendString can open all of the media formats.