play a video file (.avi) from a command prompt.
Results 1 to 11 of 11

Thread: play a video file (.avi) from a command prompt.

  1. #1
    Registered User delmer_1's Avatar
    Join Date
    Feb 2001
    Location
    Altoona, PA, USA
    Posts
    748

    play a video file (.avi) from a command prompt.

    hey guys, i need to find a program that will allow me to play a .avi file from a command prompt. i found one that will allow you to play sound files(.wav and .mp3) from the command prompt, but i can't seem to locate one that will do video. I really need to find this today if at all possible. I will continue to look, but i was hoping someone here by some strange chance know of a program that will do this.

    Help me, please.
    Some people are like Slinkies . . . not really good for anything, but you still can't help but smile when you see one tumble down the stairs

  2. #2
    Registered User delmer_1's Avatar
    Join Date
    Feb 2001
    Location
    Altoona, PA, USA
    Posts
    748
    Never mind, i found the command line switches to do it with windows media player:

    here are teh switches:

    /play - plays the desired file
    /close - closes media player after playing file

    so here is how to do it:

    mplay32 /play /close filename
    Some people are like Slinkies . . . not really good for anything, but you still can't help but smile when you see one tumble down the stairs

  3. #3
    Registered User jmani's Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    463
    does anybody know how to eject a cdrom from the command prompt?

    john
    I feel sorry for people who don't drink. When they wake up in the morning, that's as good as they're going to feel all day.

  4. #4
    Registered User Chëëzmønkëy's Avatar
    Join Date
    Nov 2000
    Location
    Lost in a world of confusion, unable to freemymind
    Posts
    226
    Originally posted by jmani
    does anybody know how to eject a cdrom from the command prompt?

    john
    had an old generic dos driver once which had a .com file which did that
    No girl deserves my tears, and the one who does will never make me cry.

  5. #5
    Driver Terrier NooNoo's Avatar
    Join Date
    Dec 2000
    Location
    UK
    Posts
    31,824
    Originally posted by jmani
    does anybody know how to eject a cdrom from the command prompt?

    john
    start run c:\windows\cdplayer.exe -play works to play a cd... so try c:\windows\cdplayer.exe - eject ....

    I can't check this at the moment, just an idea.
    Never, ever approach a computer saying or even thinking "I will just do this quickly."

  6. #6
    Registered User jmani's Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    463
    nope that doesn't work, but thanks for the shot...still open to ideas though. gunna try technet next
    I feel sorry for people who don't drink. When they wake up in the morning, that's as good as they're going to feel all day.

  7. #7
    Registered User Chëëzmønkëy's Avatar
    Join Date
    Nov 2000
    Location
    Lost in a world of confusion, unable to freemymind
    Posts
    226
    .MODEL TINY
    code segment
    assume cs:code,ds:code,es:code
    org 100h
    start:
    MOV AX,150Ch ; Get MSCDEX version
    XOR BX,BX
    INT 2Fh
    CMP BX,020Ah ; You need at least v2.10
    JNB @1
    JMP NoMSCDEX
    @1:
    MOV AX,1500h ; Get number of CD-ROM drive
    MOV BX,00h
    INT 2Fh ; CX (A=0, B=1,...)
    CMP BX,00h
    JNZ @2
    JMP NoMSCDEX
    @2:
    MOV AX, OFFSET STATUS ; Get some status bits.
    MOV word ptr[Trans],AX
    MOV word ptr[Trans+2],DS
    MOV BX,OFFSET IOCTLO
    MOV AX,1510h
    INT 2Fh

    MOV [CCF],12 ; Write IOCTL command in request header
    MOV AX, OFFSET CLOSE ; close command in IOCTL
    MOV BX, OFFSET Stop
    MOV AX,1510h
    INT 2Fh
    MOV AX, OFFSET LockCD ; Unlock Compact.Disc-Read.Only.Memory Drive
    MOV [Bytes],2
    MOV word ptr[Trans],AX
    MOV word ptr[Trans+2],DS
    MOV BX,OFFSET IOCTLO
    MOV AX,1510h
    INT 2Fh
    MOV AX, OFFSET EJECT ; eject
    MOV [Bytes],1
    MOV word ptr[Trans],AX
    MOV word ptr[Trans+2],DS
    MOV BX,OFFSET IOCTLO
    MOV AX,1510h
    INT 2Fh
    NoMSCDEX:
    ;..
    Quit:
    MOV AX,04C00h
    INT 21h
    ;data
    Stop DB 13 ; Request header : Length in bytes of request header
    DB 0 ; Subunit for minor devices
    DB 133 ; Command Code field
    DW 0 ; Status
    DB 8 dup (?) ; Reserved

    LockCD DB 1 ; Lock/UnLock instruction
    DB 0 ; UnLock function, 1 = Lock
    EJECT DB 0 ; Eject instruction
    CLOSE DB 5 ; Close instruction
    STATUS DB 6 ; Device Status instruction

    IOCTLO DB 13 ; Request header : Length in bytes of request header
    DB 0 ; Subunit for minor devices
    CCF DB 3 ; Command Code field
    Action DW 0 ; Status
    DB 8 dup (?) ; Reserved
    DB 0 ; Media descriptor
    Trans DD ? ; Transfer address
    Bytes DW 5 ; Number of bytes to transfer
    DW 0
    DD 0
    code ends
    end start


    16 bit assembly program
    No girl deserves my tears, and the one who does will never make me cry.

  8. #8
    Registered User delmer_1's Avatar
    Join Date
    Feb 2001
    Location
    Altoona, PA, USA
    Posts
    748
    hey guys: we got it working with windows MEdia player, but not working well. It plays teh video, but then hangs there for a little while before closing. we have tried encoding it different ways, but it still doesnt work. any other suggestions?
    Some people are like Slinkies . . . not really good for anything, but you still can't help but smile when you see one tumble down the stairs

  9. #9
    Registered User Ruslan's Avatar
    Join Date
    Jun 2000
    Location
    Toronto,Ontario,Canada
    Posts
    2,479
    But why it is needed?
    there are few DOS-based multi-media viewers/players, for example,here:
    http://www.mpegone.de/
    or here:
    http://www.multimediaware.com/qv/

    About eject - you can find a lot of utils doing that - just type in search "eject.exe" or "eject.zip"...

  10. #10
    Registered User cookin chef's Avatar
    Join Date
    Jul 1999
    Location
    Saskatoon, SK.
    Posts
    1,159
    Originally posted by Chëëzmønkëy
    .MODEL TINY

    16 bit assembly program
    Hey neat there Cheezemonkey.

    Wonder what would happen if I tried that in my HP 8085 Microlab????

  11. #11
    Registered User delmer_1's Avatar
    Join Date
    Feb 2001
    Location
    Altoona, PA, USA
    Posts
    748
    i guess i never really did explain why i want this. My boss is writing a program on the AS400 that is used to display real time productivity rates. He also has some video files he wants to play between teh screens that display the data. (Company logo...bright colors (company color is Bright Green) to attract peoples attention so they look at it. it will be displayed on a 42" plasma screen hanging in the cafeteria) being that this is done on the AS400, he has to use command lines, because he can't really write a program that will point and click. he wants it to go from a IBM client access screen (5250 emulation) to pop up this avi file, fullscreen, and then close it and go back to the client access screen until it is time to play the avi file again. the problem is that sometimes it pops up, plays teh movie, fullscreen, and then after it plays, instead of closing, it switches back into a window for a while before it closes. It works with some of teh movies, but not others. they are all encoded with teh same software, the same way. Right now, they are mpeg4. one of them works, one doesn't. I tried installing mediaplayer 9, but it still doesn't work. i will try some of these other dos programs.
    Some people are like Slinkies . . . not really good for anything, but you still can't help but smile when you see one tumble down the stairs

Bookmarks

Posting Permissions

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