OS2World OLD-STATIC-BACKUP Forum

OS/2 - SIGs => Rexx => Topic started by: jep on 2008.04.30, 16:05:41

Title: Install MPlayer
Post by: jep on 2008.04.30, 16:05:41
Marked as: Advanced
Hello,

This is a rexx script to configure mplayer, note that you have to unpack mplayer (to %PROGRAMS%\Mplayer ) and the codecs (to %PROGRAMS%\Mplayer\Codecs ) to make this script work all the way as there's no check that the files exist.

I have left out the part to make changes to config.sys, you have to do that by hand if you want or modify the script. If you modify the script, please post it here so other people can see it as well.

Note that the code hasn't been tested much in it present state. Use with caution!!!
Please do post corrections if you see something that you think is wrong or can be changed.

Params:
/WO force Warp Overlay (Possible?)
/DIVE force DiVE
/VO Video Overlay

See "HOW TO: Installing Streaming Audio and Video Support in Firefox/Seamonkey" ( http://www.os2world.com/content/view/17999/1/ (http://www.os2world.com/content/view/17999/1/) ) for more information.

//Jan-Erik

***Corrected some problems I found***

/*  Install MPlayer ( and enable plugin for Firefox in the future) */
'@echo off'

call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs

env = 'ENVIRONMENT'
cfg.wo = ( pos( '/WO', translate( ARG(1) ) ) > 0 )
cfg.dive = ( pos( '/DIVE', translate( ARG(1) ) ) > 0 )
cfg.vo = ( pos( '/VO', translate( ARG(1) ) ) > 0 )

home_path = VALUE( 'HOME',, env )
if length( home_path ) = 0 then
    home_path = OSBootDrive()'\Apps'
   
programs_path = VALUE( 'PROGRAMS',, env )
if length( programs_path ) = 0 then
    programs_path = VALUE( 'MMBASE',, env )
if length( programs_path ) = 0 then
    programs_path = OSBootDrive()

programs_path = programs_path'\MPlayer'

'SET MPLAYER_HOME='home_path'\.mplayer'
'SET MPLAYER_CODECS_DIR='programs_path'\Codecs'
'SET MPLAYER_PATH='programs_path'\mplayer.exe'

if ChkCreatePath( programs_path ) = 0 then
    say 'Installation Directory for MPlayer is ready'
else do
    say "Couldn't create Installation directory"
    Exit -1
end

if ChkCreatePath( VALUE( 'MPLAYER_CODECS_DIR',, env ) ) = 0 then
    say 'Directory to store MPlayer Codecs is ready'
else say 'Codec directory not available'

mplayer_home = VALUE( 'MPLAYER_HOME',, env )
if ChkCreatePath( mplayer_home ) = 0 then
do
    say 'Directory to store MPlayer configuration prepared'
    call WriteCfg mplayer_home'\config'
    call WriteInput mplayer_home'\input.conf'
    say 'Configuration written'
end
else do
    say "Couldn't create directory for MPlayer configuration,"
    say "will use standard settings instead..."
end

prgm.destpath = programs_path
prgm.name = 'mplayer.exe'
prgm.objid = 'MPPLAYER'
prgm.icon = 'Mplayer.ico'
prgm.wpname = 'MPlayer'
prgm.wpdest = '<MMPM2_FOLDER>'
prgm.params = '"%**P\%**F"'
prgm.assocfilter = '*.mpg,*.avi,*.wmv,*.mov,*.divx,*.flv,*.mpeg,*.vob'
rc = CreatePrgmObj()
exit rc

CreatePrgmObj: procedure expose prgm.
    setupstring = 'OBJECTID=<'prgm.objid'>;EXENAME='prgm.destpath'\'prgm.name';PARAMETERS='prgm.params';ASSOCFILTER='prgm.assocfilter';ICONFILE='prgm.icon';'

/*Create program in folder and attach icon*/
    rc = SysCreateObject( 'WPProgram', prgm.wpname, prgm.wpdest, setupstring, 'U' )
    if rc then
        say prgm.wpname' has been successfully installed'
    else
        say  prgm.wpname' failed installation'
Return rc
   
WriteCfg: procedure expose cfg.
    retval = stream( ARG(1), 'C', 'QUERY EXIST' )
    if retval <> '' then '@DEL 'ARG(1)' /F'
    if stream( ARG(1), 'C', 'OPEN WRITE' ) = 'READY:' then
    do
        call lineout ARG(1), '# Settings for stream/file caching'
        call lineout ARG(1), 'cache=12288'
        call lineout ARG(1), 'cache-min=30'
        call lineout ARG(1), ''
        call lineout ARG(1), '# Setting for Browser User Agent response'
        call lineout ARG(1), 'user-agent=NSPlayer/4.1.0.3856'
        if cfg.wo then
        do
            call lineout ARG(1), ''
            call lineout ARG(1), '# Force mPlayer to use WarpOverlay'
            call lineout ARG(1), 'vo=kva:wo'
        end
        else if cfg.dive then
        do
            call lineout ARG(1), ''
            call lineout ARG(1), '# Force mPlayer to use DIVE'
            call lineout ARG(1), 'vo=kva:dive'
        end
        if cfg.vo then
        do
            call lineout ARG(1), ''
            call lineout ARG(1), '# Video Overlay Options and VIO Message Window Options'
            call lineout ARG(1), 'really-quiet=yes'
            call lineout ARG(1), 'fixed-vo=yes'
            call lineout ARG(1), 'colorkey=0x000001'
        end
        call stream ARG(1), 'C', 'CLOSE'
    end
Return 0
   
WriteInput: procedure expose cfg.
    retval = stream( ARG(1), 'C', 'QUERY EXIST' )
    if retval <> '' then '@DEL 'ARG(1)' /F'
    if stream( ARG(1), 'C', 'OPEN WRITE' ) = 'READY:' then
    do
        call lineout ARG(1), '# Settings for User Control of mPlayer playback'
        call lineout ARG(1), 'MOUSE_BTN2 vo_fullscreen'
        call lineout ARG(1), 'PGUP pt_step -1'
        call lineout ARG(1), 'PGDWN pt_step 1'
        call lineout ARG(1), '+ volume 5'
        call lineout ARG(1), '- volume -5'
        call stream ARG(1), 'C', 'CLOSE'
    end
Return 0
   
OSBootDrive: procedure
    BootDrive = substr( value( 'RUNWORKPLACE' ,, 'ENVIRONMENT' ), 1, 2 )

    if BootDrive = '' then
        BootDrive = substr( value( 'COMSPEC' ,, 'ENVIRONMENT' ), 1, 2 )

    if length( BootDrive ) = 0 then
        BootDrive = 'C:'
Return BootDrive
   
ChkCreatePath: procedure
    rc = ( directory( ARG(1) ) = '' )
    if rc = 1 then
        call ChkCreatePath strip( filespec( 'D', ARG(1) )||filespec( 'P', ARG(1) ), 'T', '\' )
    if rc = 1 then
        '@mkdir 'ARG(1)
Return rc
Title: Re: Install MPlayer
Post by: Pete on 2008.05.01, 01:42:12
Hi Jan-Erik

I have not tried your script but it looks like it could be useful - especially for those of us reluctant to try configuring "ported from *nix" software ourselves.

Could I suggest that you offer it to KO Myung-Hun, mplayer porter, for possible inclusion with the next mplayer package? His email is in the mplayer docs.

He may also have ideas for extending and/or fine tuning the script.

Regards

Pete

Title: Re: Install MPlayer
Post by: jep on 2008.05.01, 12:30:43
Just sent the message...

//Jan-Erik
Title: Re: Install MPlayer
Post by: OriAl on 2008.05.01, 23:13:53
I am a know-little, so I appreciate all the help everyone provides.  I am trying to install mplayer.  I have unzipped it to g:\mplayer, and unzipped the win codecs.  I have saved the rex file to disk, and named it mplayer.rex in g:\mplayer.  Is that okay?  I haven't edited config.sys yet - is the rex file run before or afetr, and how is it run?

What files does mplayer display, and how do I set up MPC to view them?  If I missed any of this in the how to file, please let me know and I'll look harder.  I havee a concentration problem, so doing and learning things is difficult for me.

Thanks for providing the app, the instructions, and the help.
Title: Re: Install MPlayer
Post by: RobertM on 2008.05.02, 00:18:42
Hi OriAI,

The REXX file can be run by typing it's name from the commandline of the directory you copied it to. I believe though, that OS/2 requires it to be named with a .cmd extension instead of a .rex extension - so if it does not run, change the extension.

Follow the instructions below to run the script properly to set the correct parameters, or check out the "How To" topic - or both...

Robert
Title: Re: Install MPlayer
Post by: jep on 2008.05.02, 17:24:11
Marked as: Advanced
Hello,

I've modified the code some more so you can't specify both WarpOverlay, SNAP and DIVE at the same time.
I've also added the param "/i" so that you can use if you want to specify where you've unzipped MPlayer, note that you must place it in a folder called MPlayer though, or modify the script below.

If you don't use that param it'll assume you've placed in the programs folder, if that's not present, in the multimedia folder (usually mmos2) and if that's not present either, directly under the boot drive.
1) C:\Programs\MPlayer
2) C:\MMOS2\Mplayer
3) C:\Mplayer

The line:
    if retval <> '' then '@DEL "'ARG(1)'" /N'
enable you to run the script as many times as you want because it'll delete config and input.conf if they're present and rewrite them.

the function ChkCreatePath
call itself recursively to check and create the folder structure needed.

//Jan-Erik

/* Install MPlayer */
'@echo off'

call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs

env = 'ENVIRONMENT'
cfg.wo = ( pos( '/WO', translate( ARG(1) ) ) > 0 )
if cfg.wo = 0 then
do
   cfg.snap = ( pos( '/SNAP', translate( ARG(1) ) ) > 0 )
   if cfg.snap = 0 then
      cfg.dive = ( pos( '/DIVE', translate( ARG(1) ) ) > 0 )
   else cfg.dive = 0
end
else do
  cfg.snap = 0
  cfg.dive = 0
end
cfg.vo = ( pos( '/VO', translate( ARG(1) ) ) > 0 )

home_path = VALUE( 'HOME',, env )
if length( home_path ) = 0 then
    home_path = OSBootDrive()'\OS2'

if pos( '/I', translate( ARG(1) ) ) >  0 then
do
   parse value translate( ARG(1) ) with .'/I'programs_path'/'.
   programs_path = strip( programs_path )
end
else
do
   programs_path = VALUE( 'PROGRAMS',, env )
   if length( programs_path ) = 0 then
      programs_path = VALUE( 'MMBASE',, env )
   if length( programs_path ) = 0 then
      programs_path = OSBootDrive()
end
programs_path = programs_path'\MPlayer' /* Change MPlayer by hand if you use another folder name */

'SET MPLAYER_HOME='home_path'\.mplayer'
'SET MPLAYER_CODECS_DIR='programs_path'\Codecs'
'SET MPLAYER_PATH='programs_path'\mplayer.exe'

if ChkCreatePath( programs_path ) = 0 then
    say 'Installation Directory for MPlayer is ready'
else do
    say "Couldn't create Installation directory"
    Exit -1
end

if ChkCreatePath( VALUE( 'MPLAYER_CODECS_DIR',, env ) ) = 0 then
    say 'Directory to store MPlayer Codecs is ready'
else say 'Codec directory not available'

mplayer_home = VALUE( 'MPLAYER_HOME',, env )
if ChkCreatePath( mplayer_home ) = 0 then
do
    say 'Directory to store MPlayer configuration prepared'
    call WriteCfg mplayer_home'\config'
    call WriteInput mplayer_home'\input.conf'
    say 'Configuration written'
end
else do
    say "Couldn't create directory for MPlayer configuration,"
    say "will use standard settings instead..."
end

prgm.destpath = programs_path
prgm.name = 'mplayer.exe'
prgm.objid = 'MPPLAYER'
prgm.icon = 'Mplayer.ico'
prgm.wpname = 'MPlayer'
prgm.wpdest = '<MMPM2_FOLDER>'
prgm.params = '"%**P\%**F"'
prgm.assocfilter = '*.mpg,*.avi,*.wmv,*.mov,*.divx,*.flv,*.mpeg,*.vob'
rc = CreatePrgmObj()
exit rc

CreatePrgmObj: procedure expose prgm.
    setupstring = 'OBJECTID=<'prgm.objid'>;EXENAME='prgm.destpath'\'prgm.name';PARAMETERS='prgm.params';ASSOCFILTER='prgm.assocfilter';ICONFILE='prgm.icon';'

/*Create program in folder and attach icon*/
    rc = SysCreateObject( 'WPProgram', prgm.wpname, prgm.wpdest, setupstring, 'U' )
    if rc then
        say prgm.wpname' has been successfully installed'
    else
        say  prgm.wpname' failed installation'
Return rc
   
WriteCfg: procedure expose cfg.
    retval = stream( ARG(1), 'C', 'QUERY EXIST' )
    if retval <> '' then '@DEL "'ARG(1)'" /N'
    if stream( ARG(1), 'C', 'OPEN WRITE' ) = 'READY:' then
    do
        call lineout ARG(1), '# Settings for stream/file caching'
        call lineout ARG(1), 'cache=12288'
        call lineout ARG(1), 'cache-min=30'
        call lineout ARG(1), ''
        call lineout ARG(1), '# Setting for Browser User Agent response'
        call lineout ARG(1), 'user-agent=NSPlayer/4.1.0.3856'
        if cfg.wo then
        do
            call lineout ARG(1), ''
            call lineout ARG(1), '# Force MPlayer to use WarpOverlay'
            call lineout ARG(1), 'vo=kva:wo'
        end
        else if cfg.snap then
        do
            call lineout ARG(1), ''
            call lineout ARG(1), '# Force MPlayer to use SNAP'
            call lineout ARG(1), 'vo=kva:snap'
        end
        else if cfg.dive then
        do
            call lineout ARG(1), ''
            call lineout ARG(1), '# Force MPlayer to use DIVE'
            call lineout ARG(1), 'vo=kva:dive'
        end
        if cfg.vo then
        do
            call lineout ARG(1), ''
/* Line wrap adjusted on next row */
            call lineout ARG(1), '# Video Overlay Options and VIO Message Window Options'
            call lineout ARG(1), 'really-quiet=yes'
            call lineout ARG(1), 'fixed-vo=yes'
            call lineout ARG(1), 'colorkey=0x000001'
        end
        call stream ARG(1), 'C', 'CLOSE'
    end
Return 0
   
WriteInput: procedure expose cfg.
    retval = stream( ARG(1), 'C', 'QUERY EXIST' )
    if retval <> '' then '@DEL "'ARG(1)'" /N'
    if stream( ARG(1), 'C', 'OPEN WRITE' ) = 'READY:' then
    do
        call lineout ARG(1), '# Settings for User Control of MPlayer playback'
        call lineout ARG(1), 'MOUSE_BTN2 vo_fullscreen'
        call lineout ARG(1), 'PGUP pt_step -1'
        call lineout ARG(1), 'PGDWN pt_step 1'
        call lineout ARG(1), '+ volume 5'
        call lineout ARG(1), '- volume -5'
        call stream ARG(1), 'C', 'CLOSE'
    end
Return 0
   
OSBootDrive: procedure
    BootDrive = substr( value( 'RUNWORKPLACE' ,, 'ENVIRONMENT' ), 1, 2 )

    if BootDrive = '' then
        BootDrive = substr( value( 'COMSPEC' ,, 'ENVIRONMENT' ), 1, 2 )

    if length( BootDrive ) = 0 then
        BootDrive = 'C:'
Return BootDrive
   
ChkCreatePath: procedure
    rc = ( directory( ARG(1) ) = '' )
    if rc = 1 then
        call ChkCreatePath strip( filespec( 'D', ARG(1) )||filespec( 'P', ARG(1) ), 'T', '\' )
    if rc = 1 then
        '@mkdir 'ARG(1)
Return rc

Updated due to line break...
Another update due to line break...
Title: Re: Install MPlayer
Post by: jep on 2008.05.02, 17:36:26
Hello OriAl,

1) If you try my "new and improved" code save it to a file called InstMplayer.cmd directly on C: if possible.
2) Start a command prompt/window
3) Type
                 instmplayer /I G: /SNAP /VO
4) Done!

if you accidentally type something wrong, missed a parameter or want to try WarpOverlay instead of SNAP, just rerun the command with the parameters you want to use. It'll erase the previous configuration and replace them with the new ones.
WarpOverlay:                 instmplayer /I G: /WO /VO
DIVE:                              instmplayer /I G: /DIVE /VO

The script associate files that you can watch in MPlayer such as AVI, MPG, WMV, DIV, MOV etc. but some formats may have other players set as default that take precedence.

You may want to add 3 lines to config.sys by hand afterward, see the discussion about the proper way to set:
SET MPLAYER_HOME=%HOME%\.mplayer
SET MPLAYER_CODECS_DIR=%PROGRAMS%\Codecs
SET MPLAYER_PATH=%PROGRAMS%\mplayer.exe

//Jan-Erik

Quote from: OriAl on 2008.05.01, 23:13:53
I am a know-little, so I appreciate all the help everyone provides.  I am trying to install mplayer.  I have unzipped it to g:\mplayer, and unzipped the win codecs.  I have saved the rex file to disk, and named it mplayer.rex in g:\mplayer.  Is that okay?  I haven't edited config.sys yet - is the rex file run before or afetr, and how is it run?

What files does mplayer display, and how do I set up MPC to view them?  If I missed any of this in the how to file, please let me know and I'll look harder.  I havee a concentration problem, so doing and learning things is difficult for me.

Thanks for providing the app, the instructions, and the help.
Title: Re: Install MPlayer
Post by: OriAl on 2008.05.09, 02:23:52
I set my config.sys entries for G:\mplayer, g:\mplayer\codecs, and g:\mplayer\mplayer.exe.

I haven't run your .cmd yet.
Title: Re: Install MPlayer
Post by: OriAl on 2008.05.11, 00:03:11
I tried runnng your .cmd, but I get nothing but errors.  How can I save the output to a file for you?
Title: Re: Install MPlayer
Post by: jep on 2008.05.11, 08:51:32
Hello OriAl,

Yes, please do send me the output to me.

//Jan-Eik
Title: Re: Install MPlayer
Post by: OriAl on 2008.05.12, 00:01:32
Here's the output.  Mplayer is in g:\mplayer, codecs in g:\mplayr\codecs.

*******

[C:\]

[C:\]/*  Install MPlayer ( and enable plugin for Firefox in the future) */

[C:\]'@echo off'
[C:\]

[C:\]call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'

[C:\]call SysLoadFuncs
[C:\]

[C:\]env = 'ENVIRONMENT'

[C:\]cfg.wo = ( pos( '/WO', translate( ARG(1) ) )  ) 1>0

[C:\]cfg.dive = ( pos( '/DIVE', translate( ARG(1) ) )  ) 1>0

[C:\]cfg.vo = ( pos( '/VO', translate( ARG(1) ) )  ) 1>0
[C:\]

[C:\]home_path = VALUE( 'HOME',, env )

[C:\]if length( home_path ) = 0 then

Title: Re: Install MPlayer
Post by: jep on 2008.05.12, 09:27:32
Hello OriAl,

open the command-file and add the line:
/**/
on the first row, save and run again.

You probably didn't mark the first row in the code as you copied it to a file.
Rexx scripts need the comment to enter "rexx interpreter mode", otherwise it'll just run it similar to a bat file, without rexx.

//Jan-Erik
Title: Re: Install MPlayer
Post by: OriAl on 2008.05.26, 02:57:53
I'm sorry I haven't gotten back with  you - health issues.

The error message I now get when I run instmplayer  is:

REX0006: Error 6 running C:\instmplayer.cmd, line 104: Unmatched "/*" or quote
Title: Re: Install MPlayer
Post by: ddan on 2008.05.26, 06:49:19
To jep and OriAl:
Line 41 surely isn't right?:
'SET MPLAYER_HOME='home_path'\.mplayer'
                       delete the period ^
Or is my knowledge of command line dot-iness less than perfect?

I got the same 'Unmatched "/*" or quote' error as OriAl. Believe it is caused
by line-wrapping when pasting into file (with "copy con"), because went
through and matched all 218 single quotes, and comments too; came out fine,
then the program ran when I tried it again, reporting:

Installation Directory for MPlayer is ready
Directory to store MPlayer Codecs is ready
Directory to store MPlayer configuration prepared
Configuration written
MPlayer has been successfully installed

OR it's "previous run initialized the variable that you didn't" behavior that
I _BELIEVE_ REXX is prone to. In any case, the script seemed to work for me on
second run, with the one edit mentioned above...

BUT then mplayer complained (besides not running after brief blank screen):
MPlayer dev-SVN-rUNKNOWN-3.3.5 (C) 2000-2007 MPlayer Team
CPU: AMD Duron(tm)  (Family: 6, Model: 8, Stepping: 1)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
The cache option can't be used in a config file.
Error parsing option cache=12288 at line 2
Warning unknown option cache-min at line 3

Commenting out the above lines in your code resulted in MPlayer running,
but without sound. (And after running these from a command line to be sure
were set:
SET MPLAYER_HOME=C:\OS2\MPLAYER
SET MPLAYER_CODECS_DIR=C:\MPLAYER\CODECS
SET MPLAYER_PATH=C\MPLAYER\MPLAYER.EXE)

THEN, I deleted the two config files that your script makes, and I got video
too, plus a LOT of text in the calling window, mostly like:
A:  65.2 V:  65.2 A-V:  0.0022 ct: -0.022 904/904  4%  3%  0.2% 150 0
Is that normal? My experience with MPlayer is nearly 30 seconds at this
instant. Minimizing the calling window seemed to free up the CPU.

By the way, in copying text to an OS/2 window or to a DOS word processor, I
frequently get duplicated characters, not obviously the same one or same
place, except that it seems to particularly like doubling slashes. This is new
to me in plain Warp 4 and now in WSEB. Old problem? Unique to me? Anyone know
of a cure for it?
Title: Re: Install MPlayer
Post by: ddan on 2008.05.26, 07:12:28
Need to clarify the above that I UNWRAPPED in the script a few lines that had wrapped. Couldn't tell whether was my cranky DOS WP, or in the original paste using "copy con".
Title: Re: Install MPlayer
Post by: jep on 2008.05.26, 10:19:16
Hello,

Quote from: ddan on 2008.05.26, 06:49:19
To jep and OriAl:
Line 41 surely isn't right?:
'SET MPLAYER_HOME='home_path'\.mplayer'
                       delete the period ^
Or is my knowledge of command line dot-iness less than perfect?

The link at the top says that it should be a dot in front of mplayer as .mplayer, it's a Linux config directory thingie, very ugly I say, but since they've decided to use that notation, we better accept it, I guess.

It's possible to adjust it as you have done though, but if you set config.sys-entries like that first, you must change the code likewise to reflect the changes!

Quote from: ddan on 2008.05.26, 06:49:19
BUT then mplayer complained (besides not running after brief blank screen):
MPlayer dev-SVN-rUNKNOWN-3.3.5 (C) 2000-2007 MPlayer Team
CPU: AMD Duron(tm)  (Family: 6, Model: 8, Stepping: 1)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
The cache option can't be used in a config file.
Error parsing option cache=12288 at line 2
Warning unknown option cache-min at line 3

If you on the other hand have specified something else in advance in config.sys, then the code won't do you any good, and then rather cause the problem you describe.

Ahh, yes, you've changed the "SET MPLAYER_HOME=" setting, that's probably why!

Quote from: ddan on 2008.05.26, 06:49:19
THEN, I deleted the two config files that your script makes, and I got video
too, plus a LOT of text in the calling window, mostly like:
A:  65.2 V:  65.2 A-V:  0.0022 ct: -0.022 904/904  4%  3%  0.2% 150 0
Is that normal? My experience with MPlayer is nearly 30 seconds at this
instant. Minimizing the calling window seemed to free up the CPU.

Before I wrote the script I got text like that as well. The config entries suppress the output of those messages. Every output can take quite some cpu power and therefore slow down your video experience if you have a slow computer. Minimizing the text window should to my knowledge let it skip updates to that window.

It's though quite instersting to see what codecs each movie require for audio and video, and the time it take to load each codec, but the rest just take cpu cycles.

Quote from: ddan on 2008.05.26, 06:49:19
By the way, in copying text to an OS/2 window or to a DOS word processor, I
frequently get duplicated characters, not obviously the same one or same
place, except that it seems to particularly like doubling slashes. This is new
to me in plain Warp 4 and now in WSEB. Old problem? Unique to me? Anyone know
of a cure for it?

Hmmm, I haven't seen that in PM (GUI) applications, can it have something to do with that it esccpae the '\'?
In C/C++ the character '\' can't be used on its own, it has to be escaped with yet another '\\' to mean what me see as the character "\". '\n' = new_line, '\0' = end_of_text etc.

//Jan-Erik
Fixed a line I think look wrapped in the code above, but now I can't find any more.
Title: Re: Install MPlayer
Post by: ddan on 2008.05.26, 21:42:12
To clarify a little:
I didn't even test with the dot in ".mplayer", just edited it first thing.
Nor did I test with those items "SET" in config.sys, didn't reboot during testing.
Yes, I made directory names match. This is manifestly right. It's obviously finding the \os2\mplayer directory; from the config files there is where mplayer got the cache figures from, though it didn't LIKE them.
Meant to say that the sound only worked (on about the third test), but video did not -- until I DELETED the config files in \os2\mplayer entirely, then got video. This also seems to be manifestly -- visibly, even -- the right way.
Looks to me better to rely on as many defaults as possible.

I'm less than thrilled with results, but don't know how much to discount for that I've only generic unaccelerated driver from SNAP 3.18 for onboard S3 Unichrome. In any case, I won't be adding a separate card, not much interested in video. K Movie Player seems to work better, just fine IF a nice standard codec is used.
Title: Re: Install MPlayer
Post by: OriAl on 2008.05.31, 22:03:19
Could part of my problem be that I have mplayer installed on drive G?  Should it be elsewhere?
Title: Re: Install MPlayer
Post by: ddan on 2008.06.01, 03:28:48
This isn't as difficult as it seeems. I suggest you start over with the setup I give here:
http://www.os2world.com/component/option,com_smf/Itemid,63/topic,970.msg6306/#msg6306

Except that I managed to slightly mangle my own:
SET MPLAYER_PATH=C\MPLAYER\MPLAYER.EXE
                            ^^^^^should be a colon ":" after "C"
That only makes it so you have to be in \mplayer to run it, or explicitly specify the path. Didn't bother me during testing.

Now, to have the mplayer files on "G:", change "C:" to "G:" in those "SET" statements.

I'm going to say disregard all other advice, undoing it where needed, based on the fact that my installation is working, and if _I_ can get it working, then it's easy. -- I've spent much more time on these postings than actually using mplayer.

<Warning: irrelevant diversion follows.>
What might we deduce from the following facts, not unique to the particulars, but presented with good contrast to make a fairly clear case?:

I didn't expect installation to work, didn't much care if it did, spent five minutes at it: result, I have a working mplayer.

OriAl and others presumably expected it to work, hoped that it did, and have spent apparently hours trying. Their result, not working.

Obvious conclusion: Pessimism and Indifference are rewarded in this perverse universe.
Title: Re: Install MPlayer
Post by: Saijin_Naib on 2008.06.01, 07:19:27
Win for the above comment.

My mplayer plugin seems to work in phases with the moon or some other such divinity-based cycle. I've more or less quit caring about it, its a bigger pain in the ass than its worth, Ill just have Firefox temp DL everything for now.
Title: Re: Install MPlayer
Post by: OriAl on 2008.06.02, 20:33:14
I have limited knowledge, so I hope things work.  I still haven't gotten the .cmd file to run, and I don't know if mplayer is working without it.  How can I test it?
Title: Re: Install MPlayer
Post by: jep on 2008.06.03, 09:35:20
Hello OriAl,

Right Click: Free area on the Desktop
Menu select: New Object -> Program
Edit name: MPlayer
Right Click: On new Icon
Menu select: Properties
Field: Path and file name
Type: path to mplayer.exe
e.g. C:\Programs\MPlayer\MPlayer.exe
Field: Parameters
Type: %**P\%**F
where %**P mean the path and %**F mean file with extension
Close window

Drag & drop movie on the newly created icon, a vio window appear with information about the file and after a while the actual movie in a separate window.

Note: It's possible to add more options in the Parameters field, e.g. -framedrop for slow computers etc.

//Jan-Erik
Title: Re: Install MPlayer
Post by: OriAl on 2008.06.08, 01:35:13
I've followed your instructions, and have .  I've never downloaded a movie - where would I find one to test?

Thank you.
Title: PockeMovies and MPlayer?
Post by: BigWarpGuy on 2008.06.09, 20:52:09
http://www.pocketmovies.net (http://www.pocketmovies.net) Here are some movie trailers, short films and animations at this site. I down load the .mpg files and play them using Warp Vision.  ;D
Title: Re: Install MPlayer
Post by: OriAl on 2008.07.25, 04:05:19
I still haven't got mplayer working.  I have the set statements correct for my drive G install (I believe), and the correct plugin.  As I've said, I'm not good with computers, so I really appreciate all the help I get from the eCS-OS/2 community.
Title: Re: Install MPlayer
Post by: RobertM on 2008.07.26, 00:59:54
Quote from: OriAl on 2008.07.25, 04:05:19
I still haven't got mplayer working.  I have the set statements correct for my drive G install (I believe), and the correct plugin.  As I've said, I'm not good with computers, so I really appreciate all the help I get from the eCS-OS/2 community.

In what way is it not working? Are we talking about as a Firefox plugin, or standalone?

Robert
Title: Re: Install MPlayer
Post by: jep on 2008.08.11, 15:05:30
Hi OriAl,

Does it play something for you?

If not, let's determine what may go wrong.

1) You have a folder with some videos in the Multimedia Folder ( Desktop -> Programs -> Multimedia -> Movies
2) Do you have a file that end with the extension .mpg there?
3) If so, drag & drop it on the icon for MPlayer
4) A textmode window should appear with some text on it... after a moment a PM window should appear and the movie shold begin to show.
5) Use the arrow keys ( left/right ) on you keyboard to wind/rewind 10 seconds. Up/Down to wind/rewind 60 seconds. Use Space key to pause.
6) Use / and * (top middle buttons) on the numeric part of you r keyboard to lower and raise the volume.
7) Close the text mode window after you've looked at the movie.

Please tell us if you've managed to look at a movie file this way!

Someone else, more experienced may help us out on how to play movies through the web browser.

//Jan-Erik
Title: Re: Install MPlayer
Post by: OriAl on 2008.08.12, 03:58:15
I'm sorry I haven't gotten back to you.  I'm having more health problems, and my mother is, also.  I'll do these things as soon as I can. 

If I finish this. I'll then try to install ClamAV.  I wish I had more computer knowledge.
Title: Re: Install MPlayer
Post by: RobertM on 2008.08.12, 05:05:49
Quote from: OriAl on 2008.08.12, 03:58:15
I'm sorry I haven't gotten back to you.  I'm having more health problems, and my mother is, also.  I'll do these things as soon as I can. 

If I finish this. I'll then try to install ClamAV.  I wish I had more computer knowledge.

:-[

OriAl: Hope you both do better. My best wishes and thoughts are with you both. Come back to us when you can and we will try to help you out.

Rob
Title: Re: Install MPlayer
Post by: Ben on 2008.08.13, 02:44:57
Quote from: OriAl on 2008.08.12, 03:58:15
I'm having more health problems, and my mother is, also.
Geez, OriAl, I hope it's nothing serious for either of you.

May you both master it soon!

8 )
Title: Re: Install MPlayer
Post by: OriAl on 2008.08.28, 04:48:26
Thank you.

It's serious for my mother, and chronic and worsening for me (quadriplegia with extreme central pain syndrome that negatively impacts the movement I have left and affect my concentration,  memory, and retention, plus other issues),  but I have to try to keep up with eCS and try to learn XP.

The OS/2 community is really patient with me, and I appreciate it.

Are there fairly small files I can download to test mplayer?

Thanks,

Alan
Title: Re: Install MPlayer
Post by: sXwamp on 2012.04.02, 02:35:46
Quote from: jep on 2008.04.30, 16:05:41
Marked as: Advanced
Hello,

This is a rexx script to configure mplayer, note that you have to unpack mplayer (to %PROGRAMS%\Mplayer ) and the codecs (to %PROGRAMS%\Mplayer\Codecs ) to make this script work all the way as there's no check that the files exist.

I have left out the part to make changes to config.sys, you have to do that by hand if you want or modify the script. If you modify the script, please post it here so other people can see it as well.

Note that the code hasn't been tested much in it present state. Use with caution!!!
Please do post corrections if you see something that you think is wrong or can be changed.

...

//Jan-Erik

***Corrected some problems I found***


CreatePrgmObj: procedure expose prgm.
   setupstring = 'OBJECTID=<'prgm.objid'>;EXENAME='prgm.destpath'\'prgm.name';PARAMETERS='prgm.params';ASSOCFILTER='prgm.assocfilter';ICONFILE='prgm.icon';'






To get rid of the extra VIO windows change the above code to:


CreatePrgmObj: procedure expose prgm.
   setupstring = 'OBJECTID=<'prgm.objid'>;PROGTYPE=PM;EXENAME='prgm.destpath'\'prgm.name';PARAMETERS='prgm.params';ASSOCFILTER='prgm.assocfilter';ICONFILE='prgm.icon';'




Also for mPlayer 4.4.5 add to the config file for sound:

ao=kai:dart