Results 1 to 12 of 12

Thread: [RESOLVED] Can mciSendString Open rm File?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Resolved [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

  2. #2
    Fanatic Member FireXtol's Avatar
    Join Date
    Apr 2010
    Posts
    874

    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.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: Can mciSendString Open rm File?

    Quote Originally Posted by FireXtol View Post
    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.
    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.

  4. #4
    Fanatic Member FireXtol's Avatar
    Join Date
    Apr 2010
    Posts
    874

    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?

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: Can mciSendString Open rm File?

    Quote Originally Posted by FireXtol View Post
    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.
    Attached Images Attached Images  

  6. #6

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    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&#37

    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%)

  8. #8

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: Can mciSendString Open rm File?

    Quote Originally Posted by FireXtol View Post
    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:

    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.

  9. #9
    Fanatic Member FireXtol's Avatar
    Join Date
    Apr 2010
    Posts
    874

    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.

  10. #10

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: Can mciSendString Open rm File?

    Quote Originally Posted by FireXtol View Post
    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.

  11. #11
    Fanatic Member FireXtol's Avatar
    Join Date
    Apr 2010
    Posts
    874

    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

  12. #12

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: Can mciSendString Open rm File?

    Quote Originally Posted by FireXtol View Post
    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
    Thank you very much.
    That means if we installed codec, mciSendString can open all of the media formats.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width