Simular key press por command line. ¿Se podrá?

Carlos A. Sepulveda M. casep en tuxpan.com
Lun Mayo 9 12:33:05 CLT 2005


Andrés Ruz Salinas wrote:

> Hola lista,
> 
> 	Esto viene como parte del tema "Necesito controlar la reproducción
> por línea comandos". He buscado info sobre como simular el presionado de
> teclas y aún no doy con nada. La idea es controlar el reproductor por línea
> de comandos.
> 
> 	¿Alguno de ustedes habrá hecho lo que yo estoy intentando?
> 

Holas:
Supongo por repoductor entiendes un reproductor de "multimedia"
Si es ese el caso mplayer es full controlable via linea de comando con 
teclas.
# mplayer --help
Usage:   mplayer [options] [url|path/]filename

Basic options: (complete list in the man page)
  -vo <drv[:dev]>  select video output driver & device ('-vo help' for a 
list)
  -ao <drv[:dev]>  select audio output driver & device ('-ao help' for a 
list)
  vcd://<trackno>   play (S)VCD (Super Video CD) track (raw device, no 
mount)
  dvd://<titleno>   play DVD title from device instead of plain file
  -alang/-slang    select DVD audio/subtitle language (by 2-char country 
code)
  -ss <timepos>    seek to given (seconds or hh:mm:ss) position
  -nosound         do not play sound
  -fs              fullscreen playback (or -vm, -zoom, details in the 
man page)
  -x <x> -y <y>    set display resolution (for use with -vm or -zoom)
  -sub <file>      specify subtitle file to use (also see -subfps, 
-subdelay)
  -playlist <file> specify playlist file
  -vid x -aid y    select video (x) and audio (y) stream to play
  -fps x -srate y  change video (x fps) and audio (y Hz) rate
  -pp <quality>    enable postprocessing filter (details in the man page)
  -framedrop       enable frame dropping (for slow machines)

Basic keys: (complete list in the man page, also check input.conf)
  <-  or  ->       seek backward/forward 10 seconds
  up or down       seek backward/forward  1 minute
  pgup or pgdown   seek backward/forward 10 minutes
  < or >           step backward/forward in playlist
  p or SPACE       pause movie (press any key to continue)
  q or ESC         stop playing and quit program
  + or -           adjust audio delay by +/- 0.1 second
  o                cycle OSD mode:  none / seekbar / seekbar + timer
  * or /           increase or decrease PCM volume
  z or x           adjust subtitle delay by +/- 0.1 second
  r or t           adjust subtitle position up/down, also see -vf expand

* * * SEE THE MAN PAGE FOR DETAILS, FURTHER (ADVANCED) OPTIONS AND KEYS 
* * *

-- 
    ___      Carlos A. Sepulveda M.      | JID: casep en tuxpan.com
   |___|     http://www.tuxpan.com/casep | ICQ: 31472448
(o\_|_/o)   May the TUX be with You     | user #292837 counter.li.org
  U     U    '76 1300 L "Bob Esponja"


Más información sobre la lista de distribución Linux