MPlayer an example HOW TO WRITE A "RAW" COMMAND IN SHELL
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    osco
    Posts: 680 from 2009/10/21
    From: Boston, USA
    Fab,
    rexx port for MPlayer

    Anyway, if you need a list, type in a shell:

    rx "options results; address MPLAYER.1; 'help'; say result"

    Note that the "raw" command expects an internal mplayer command (which are described in mplayer documentation), so in fact, all mplayer commands can be reached from mplayer rexx port, that way.

    Guessing? System:Applications/MPlayer>rx "options results; address MPLAYER; RAW-get_time_pos

    I have a video playing--press the period button--the video pauses--How to get the time at that position in the video file?

    The command in the MPlayer list of commands says "get_time_pos

    Osco grumbling :-? http://aminet.net/util/rexx/ARexxGuide2_0A.lha AN ONLINE AREXX MANUAL

    Be BAck in awhile :-D

    [ Edited by osco on 2010/1/24 12:25 ]
    Mac Mini 1.5GHz, 1G, 250G Drive, Apple Cinema Display, MorphOS 3.1 registered, MacOS 10 PowerBook (5,8) 1.67Hz, 2G, 80G Drive,........Waiting
    PowerBook (5,8) 1.67Hz, 2G, 40G MorphOS 3.1 unregisterd
  • »24.01.10 - 15:05
    Profile
  • Fab
  • MorphOS Developer
    Fab
    Posts: 1331 from 2003/6/16
    The raw commands meant to return a value will probably not work, since they just display it to mplayer stdout, IIRC. Anyway, you could use the special rexx command for that:
    rx "options results; address MPLAYER.1; 'query position percent'; say result" would give you the position in %.
  • »24.01.10 - 19:28
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    osco
    Posts: 680 from 2009/10/21
    From: Boston, USA
    Fab on 2010/1/24 15:28:10

    The raw commands meant to return a value will probably not work, since they just display it to mplayer stdout, IIRC. Anyway, you could use the special rexx command for that:
    rx "options results; address MPLAYER.1; 'query position percent'; say result" would give you the position in %.


    A votre sante!
    :-D
    Mac Mini 1.5GHz, 1G, 250G Drive, Apple Cinema Display, MorphOS 3.1 registered, MacOS 10 PowerBook (5,8) 1.67Hz, 2G, 80G Drive,........Waiting
    PowerBook (5,8) 1.67Hz, 2G, 40G MorphOS 3.1 unregisterd
  • »24.01.10 - 21:32
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    osco
    Posts: 680 from 2009/10/21
    From: Boston, USA
    The command returns the the amount of time elapsed in the video.

    It is given in whole seconds. The video is in 30 frames/second.
    I think MPLayer can read in 1/1000 per second.
    Can position time be expressed in 1/100 of a second?

    rx "options results; address MPLAYER.1;'query position time';say result"
    Sacre Blue!
    Mac Mini 1.5GHz, 1G, 250G Drive, Apple Cinema Display, MorphOS 3.1 registered, MacOS 10 PowerBook (5,8) 1.67Hz, 2G, 80G Drive,........Waiting
    PowerBook (5,8) 1.67Hz, 2G, 40G MorphOS 3.1 unregisterd
  • »24.01.10 - 21:58
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    igracki
    Posts: 416 from 2003/2/24
    From: Berlin
    Hi,

    if you want it a little shorter, use this:
    rxcmd MPLAYER.1 "QUERY POSITION PERCENT"
  • »25.01.10 - 11:26
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    osco
    Posts: 680 from 2009/10/21
    From: Boston, USA
    The raw commands meant to return a value will probably not work, since they just display it to mplayer stdout. How do access mplayer stdout??
    Mac Mini 1.5GHz, 1G, 250G Drive, Apple Cinema Display, MorphOS 3.1 registered, MacOS 10 PowerBook (5,8) 1.67Hz, 2G, 80G Drive,........Waiting
    PowerBook (5,8) 1.67Hz, 2G, 40G MorphOS 3.1 unregisterd
  • »19.02.10 - 17:24
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    igracki
    Posts: 416 from 2003/2/24
    From: Berlin
    Start MPlayer from a shell window.
  • »20.02.10 - 15:57
    Profile Visit Website