[MPlayer-users] tvout, ssh and mplayer

Fons van der Beek fons at so-o.nl
Sun Jun 1 11:40:19 CEST 2003


i use it very basic
I got a Nvidia Geoforce 4 card
a sound card wich works better on the OSS interface as on Alsa (no glitches)

on a first ssh session I type
"startx -- -layout TVscreen"

on a second session the commands
"export DISPLAY=:0"
"export PATH=$PATH:/usr/local/bin"
"mplayer -fs -zoom -ao oss MOVIE_TO_PLAY.avi"

this is my X86Config file

I hope this helps...................................
of course this is all very basic, because i want to modify the mplayer.sh
from the linvdr project
to automate resolution, subtitles, autosearching divx cd's for the movie,
adding an automount
etc etc

but these basic commands do the job!



(i've got enough cpu power, so i don't care about other X-programs in the
xinitrc)

I think you just forgot to export the display




########################################################################
# Sample XF86Config file for NVIDIA XFree86 drivers.
#
# Refer to the XF86Config(4/5) man page for details about the format of
# this file.
#
# Be sure to replace the monitor values with correct values for your
# monitor!
##########################################################################


Section "Files"

    RgbPath "/usr/X11R6/lib/X11/rgb"
    FontPath   "/usr/X11R6/lib/X11/fonts/local/"
    FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
    FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
    FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"
    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"
    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"


EndSection


##########################################################################
# Server flags section.
##########################################################################

Section "ServerFlags"

    # Uncomment this to cause a core dump at the spot where a signal is
    # received.  This may leave the console in an unusable state, but may
    # provide a better stack trace in the core dump to aid in debugging
    #NoTrapSignals

    # Uncomment this to disable the <Crtl><Alt><BS> server abort sequence
    # This allows clients to receive this key event.
    #DontZap

    # Uncomment this to disable the <Crtl><Alt><KP_+>/<KP_-> mode switching
    # sequences.  This allows clients to receive these key events.
    #DontZoom

    # This  allows  the  server  to start up even if the
    # mouse device can't be opened/initialised.
    AllowMouseOpenFail

EndSection


##########################################################################
# Input devices
##########################################################################

#
# Keyboard section
#
Section "InputDevice"

    Identifier "Keyboard1"
    Driver     "Keyboard"
    Option     "AutoRepeat"  "250 30"

    Option "XkbRules"  "xfree86"
    Option "XkbModel"  "pc105"
    Option "XkbLayout" "us"

EndSection


#
# Pointer section
#
Section "InputDevice"

    Identifier  "Mouse1"
    Driver      "mouse"
    Option      "Protocol"    "IMPS/2"
    Option      "Device"      "/dev/psaux"

EndSection


##########################################################################
# Module section
##########################################################################

Section "Module"
    Load        "dbe"
    # Load the glx module.
    Load "glx"
    Load        "extmod"
    Load "type1"
    Load "freetype"
EndSection


##########################################################################
# Monitor section
##########################################################################

Section "Monitor"

    Identifier "MyMonitor"
    VendorName "Mitsubisi"
    ModelName  "Diamond Plus 120u"

    # be sure to replace these values with values appropriate for your
    # monitor!
    HorizSync  31-82
    VertRefresh 55-120

EndSection

Section "Monitor"

    Identifier "TV"
    VendorName "Sony"
    ModelName  "breedgeval"

    # be sure to replace these values with values appropriate for your
    # monitor!
    HorizSync  30-50
    VertRefresh 60

EndSection




##########################################################################
# Graphics device section(s)
##########################################################################

Section "Device"
    Identifier  "NV AGP"
    VendorName  "nvidia"
    Driver   "nvidia"
    # update this with the PCI id of your card.  Consult the output
    # of the 'lspci' command.
    BusID       "PCI:1:0:0"
EndSection

Section "Device"
    Identifier "NV PCI"
    VendorName "nvidia"
    Driver "nvidia"
    # update this with the PCI id of your card.  Consult the output
    # of the 'lspci' command.
    BusID       "PCI:0:13:0"
EndSection

Section "Device"
    Identifier "NV AGP TwinView"
    VendorName "nvidia"
    Driver "nvidia"
    # update this with the PCI id of your card.  Consult the output
    # of the 'lspci' command.
    BusID       "PCI:1:0:0"

    # sample twinview setup
    Option "TwinView"
    # be sure to replace the HorizSync and VertRefresh with correct values
    # for your monitor!
    Option "SecondMonitorHorizSync"   "31-82"
    Option "SecondMonitorVertRefresh" "55-120"
    Option "TwinViewOrientation"      "RightOf"
    Option "MetaModes"                "1280x1024,1280x1024;
1024x768,1024x768"
    Option "ConnectedMonitor"         "crt,crt"
EndSection


##########################################################################
# Screen sections
##########################################################################

#
# screen section for an nvidia AGP card
#
Section "Screen"
    Identifier "TV"
    Device     "NV AGP"
    Monitor    "TV"
    Option     "TVStandard" "PAL-B"
    Option     "TVOutFormat" "SVIDEO"
    Option     "ConnectedMonitor" "TV"
    Option     "TVOverscan" "0.0"
    DefaultColorDepth 24
    Subsection "Display"
        Depth       8
        Modes       "800x600" "640x480"

        Depth       16
        Modes       "800x600" "640x480"

        Depth       24
        Modes       "800x600" "640x480"
    EndSubsection

EndSection

Section "Screen"
    Identifier "Screen AGP"
    Device      "NV AGP"
    Monitor     "MyMonitor"
    DefaultColorDepth 24
    Subsection "Display"
        Depth       8
        Modes       "1280x1024" "1024x768" "800x600" "640x400"
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
    EndSubsection

EndSection


#
# screen section for an nvidia PCI card
#
Section "Screen"
    Identifier "Screen PCI"
    Device      "NV PCI"
    Monitor     "MyMonitor"
    DefaultColorDepth 24
    Subsection "Display"
        Depth       8
        Modes       "1280x1024" "1024x768" "800x600" "640x400"
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
    EndSubsection
EndSection

#
# screen section for an nvidia AGP TwinView card
# (look at the appropriate Device section)
#
Section "Screen"
    Identifier "Screen AGP TwinView"
    Device "NV AGP TwinView"
    Monitor "MyMonitor"
    DefaultColorDepth 24
    Subsection "Display"
        Depth       8
        Modes       "1280x1024" "1024x768" "800x600" "640x400"
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
    EndSubsection
EndSection


##########################################################################
# ServerLayout sections
# (invoke using the '-layout' option of 'startx'.
##########################################################################

#
# just one agp card
#
Section "ServerLayout"
    Identifier  "AGP"
    Screen      "Screen AGP"
    InputDevice "Mouse1" "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"
EndSection

#
# just one pci card
#
Section "ServerLayout"
    Identifier  "PCI"
    Screen      "Screen PCI"
    InputDevice "Mouse1" "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"
EndSection

#
# 2 cards, non twinview
#
Section "ServerLayout"
    Identifier  "Both"
    Screen      "Screen AGP"
    Screen      "Screen PCI" LeftOf "Screen AGP"
    InputDevice "Mouse1" "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"
EndSection

#
# just one agp twinview card
#
Section "ServerLayout"
    Identifier  "AGPTwinView"
    Screen      "Screen AGP TwinView"
    InputDevice "Mouse1" "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"
EndSection

#
# 2 cards, one agp twinview and one pci (3 monitors total)
#
Section "ServerLayout"
    Identifier  "BothTwinView"
    Screen      "Screen AGP TwinView"
    Screen      "Screen PCI" LeftOf "Screen AGP TwinView"
    InputDevice "Mouse1" "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"
EndSection

Section "ServerLayout"
    Identifier  "TVscreen"
    Screen      "TV"
    InputDevice "Mouse1" "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"
EndSection





----- Original Message ----- 
From: "Jeffrey R. Smith" <jrs at mnsi.net>
To: <mplayer-users at mplayerhq.hu>
Sent: Saturday, May 31, 2003 18:07 PM
Subject: [MPlayer-users] tvout, ssh and mplayer


> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> I am trying to get mplayer to work with tvout and controlled via ssh...
> because I use my laptop as a remote control when watching movies in a
> different room then my computer....
>
> OKAY so tvout works....
> I issue 'tvout "Mplayer options" ' and it shows up on the tv. Though I can
> only control it from my base computer... whether issued via ssh from
laptop
> or just from base computer. I figure you guys might know... if not I am
going
> to try XFree86 lists... but my greatest chance of getting a answer is
> probably here.. I got one of those Nvidia 5600 fx for cheap... so incase
you
> needed to know what card I had... or something... I don't want to use
> Twinview... in case you are wondering about that... Also my best guess so
far
> is that in starting a new x the controls are reverted to what is specified
in
> the /etc/X11/XF86Config file... I am basically looking for an elegant way
to
> keep it with the ssh box... I don't have X11 forwarding... cause the
laptop
> is running windows NT 4 and is very old... cygwin takes up more space then
is
> on this old computer
>
> cat /usr/bin/tvout looks like this
>
> #!/bin/sh
> echo xterm -e mplayer -fs "$*" > ~/.xinitrc-tv
> startx ~/.xinitrc-tv -- :1 -layout TV
>
> cat /etc/X11/XF86Config looks like this
> #!/bin/sh
>
> echo xterm -e mplayer -fs "$*" > ~/.xinitrc-tv
> #echo mplayer -fs "$*" > ~/.xinitrc-tv
>
> startx ~/.xinitrc-tv -- :1 -layout TV
>
> [jrs at jennyx MPlayer-20030531]$ cat /etc/X11/XF86Config
> # XFree86 4 configuration created by pyxf86config
>
> Section "ServerLayout"
>         Identifier     "Default Layout"
>         Screen         "Screen0"
>         InputDevice    "Mouse0" "CorePointer"
>         InputDevice    "Keyboard0" "CoreKeyboard"
>         InputDevice    "DevInputMice" "AlwaysCore"
> EndSection
>
> Section "ServerLayout"
>         Identifier     "TV"
>         Screen         "TV-1024"
>         InputDevice    "Mouse0" "CorePointer"
>         InputDevice    "Keyboard0" "CoreKeyboard"
>         InputDevice    "DevInputMice" "AlwaysCore"
> EndSection
>
> Section "Files"
> # RgbPath is the location of the RGB database.  Note, this is the name of
the
> # file minus the extension (like ".txt" or ".db").  There is normally
> # no need to change the default.
>
> # Multiple FontPath entries are allowed (they are concatenated together)
> # By default, Red Hat 6.0 and later now use a font server independent of
> # the X server to render fonts.
>
>         RgbPath      "/usr/X11R6/lib/X11/rgb"
>         FontPath     "unix/:7100"
> EndSection
>
> Section "Module"
>         Load  "dbe"
>         Load  "extmod"
>         Load  "fbdevhw"
>         Load  "glx"
>         Load  "record"
>         Load  "freetype"
>         Load  "type1"
>         #Load  "dri"
> EndSection
>
> Section "InputDevice"
> # Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
> #       Option  "Xleds"         "1 2 3"
>
> # To disable the XKEYBOARD extension, uncomment XkbDisable.
> #       Option  "XkbDisable"
>
> # To customise the XKB settings to suit your keyboard, modify the
> # lines below (which are the defaults).  For example, for a non-U.S.
> # keyboard, you will probably want to use:
> #       Option  "XkbModel"      "pc102"
> # If you have a US Microsoft Natural keyboard, you can use:
> #       Option  "XkbModel"      "microsoft"
> #
> # Then to change the language, change the Layout setting.
> # For example, a german layout can be obtained with:
> #       Option  "XkbLayout"     "de"
> # or:
> #       Option  "XkbLayout"     "de"
> #       Option  "XkbVariant"    "nodeadkeys"
> #
> # If you'd like to switch the positions of your capslock and
> # control keys, use:
> #       Option  "XkbOptions"    "ctrl:swapcaps"
> # Or if you just want both to be control, use:
> #       Option  "XkbOptions"    "ctrl:nocaps"
> #
>         Identifier  "Keyboard0"
>         Driver      "keyboard"
>         Option      "XkbRules" "xfree86"
>         Option      "XkbModel" "pc105"
>         Option      "XkbLayout" "us"
> EndSection
>
> Section "InputDevice"
>         Identifier  "Mouse0"
>         Driver      "mouse"
>         Option      "Protocol" "IMPS/2"
>         Option      "Device" "/dev/psaux"
>         Option      "ZAxisMapping" "4 5"
>         Option      "Emulate3Buttons" "no"
> EndSection
>
> Section "InputDevice"
> # If the normal CorePointer mouse is not a USB mouse then
> # this input device can be used in AlwaysCore mode to let you
> # also use USB mice at the same time.
>         Identifier  "DevInputMice"
>         Driver      "mouse"
>         Option      "Protocol" "IMPS/2"
>         Option      "Device" "/dev/input/mice"
>         Option      "ZAxisMapping" "4 5"
>         Option      "Emulate3Buttons" "no"
> EndSection
>
> Section "Monitor"
>         Identifier   "Monitor0"
>         VendorName   "Monitor Vendor"
>         ModelName    "Unprobed Monitor"
>         HorizSync    30.0 - 70.0
>         VertRefresh  50.0 - 120.0
>         Option      "dpms"
>         Gamma        1.7
> EndSection
>
> Section "Monitor"
>         Identifier   "TV0"
>         VendorName   "TV Vendor"
>         ModelName    "Unprobed TV"
>         HorizSync    30 - 50
>         VertRefresh  60
> EndSection
>
> Section "Device"
>         Identifier  "Videocard0"
>         Driver      "nvidia"
>         #Driver     "tdfx"
>         VendorName  "Videocard vendor"
>         BoardName   "Geforce 5600 FX"
>         Option "NvAGP" "2"
> #       Option "RenderAccel" "1"
>         Option "CursorShadow" "1"
> #       Option "TwinView"
> #       Option "TwinViewOrientation" "Clone"
> #       Option "SecondMonitorHorizSync"     "30-50"
> #        Option "SecondMonitorVertRefresh"   "60"
> #        Option "MetaModes" "1280x1024,1024x768; 1024x768,1024x768;
> 800x600,800x600; 640x480,640x480"
> #        Option "TVStandard" "NTSC-M"
> #       Option "ConnectedMonitor"       "crt,tv"
> #       Option "TVOutFormat" "SVideo"
> EndSection
>
> Section "Screen"
>         Identifier "Screen0"
>         Device     "Videocard0"
>         Monitor    "Monitor0"
>         DefaultDepth     24
>     Subsection "Display"
>         Depth       8
>         Modes       "1280x1024" "1024x768" "800x600" "640x400"
>         ViewPort 0 0
>     EndSubsection
>     Subsection "Display"
>         Depth       16
>         Modes       "1280x1024" "1024x768" "800x600" "640x480"
>         ViewPort 0 0
>     EndSubsection
>     Subsection "Display"
>         Depth       24
>         Modes       "1280x1024" "1024x768" "800x600" "640x480"
>         ViewPort 0 0
>     EndSubsection
> EndSection
>
> Section "Screen"
>         Identifier "TV-1024"
>         Device     "Videocard0"
>         Monitor    "TV0"
>         DefaultDepth     24
>
>         Option "TVStandard" "NTSC-M"
>         Option "ConnectedMonitor" "TV"
>
>     Subsection "Display"
>         Depth       24
>         Modes       "1024x768"
>         ViewPort 0 0
>     EndSubsection
> EndSection
>
> Section "DRI"
>         Group        0
>         Mode         0666
> EndSection
>
>
> _______________________________________________
> RTFM!!!  http://www.MPlayerHQ.hu/DOCS
> Search:  http://www.MPlayerHQ.hu/cgi-bin/htsearch
> http://mplayerhq.hu/mailman/listinfo/mplayer-users



More information about the MPlayer-users mailing list