Привет.
Может кому будет интересно.
Задача:
Смотреть выдео с компа на TV через TV-out видеокарт от NVidia, используя
mplayer.
Решение:
- Separate-режим, когда запускаются 2 X-сервера и с tv-out'а картинка идет на DISPLAY=:0.1, вывод с которого направлен на TV. После драйверов nvidia 8756 этот режим перестал работать, т.к. перестал определяться NV TV-Encoder.
- Twin View. В этом режиме, как это ни странно, NV TV-Encoder определяется и картинка на TV идет. Рабочий конфиг представлен ниже.
основная проблема, почему
Twin View не использовался лично мной раньше – не получалось корректно переключить mplayer в full-screen, при этом как оказалось, xine переключается на весь экран, что на мониторе с большим разрешением, что на TV с меньшим как и положено, но из-за отсутствия решения N1, пришлось помучить гугл и оказывается есть штатное решение «проблемы», используя опцию mplayer'а
-xineramascreen. При наличии основного монитора на экране 0 и TV на экране 1, достаточно запустить
mplayer -xineramascreen 1 film.avi и при переходе в full-screen, mplayer возьмет разрешение TV, которое задается в
Option "Meta Modes", а не ту часть виртуального рабочего стола, что отводится TV, чтобы упростить запуск, можно добавить этот параметр сюда:
/etc/bashrc.d/mplayer.sh
alias mplayer='/usr/bin/soundwrapper /usr/bin/mplayer'
alias mplayertv='/usr/bin/soundwrapper /usr/bin/mplayer -xineramascreen 1'
но этот скрипт наверняка заменится при обновлении mplayer'а
или в
~/.bashrc:
alias mplayertv='mplayer -xineramascreen 1'
В итоге смотрим mplayer'ом фильмы на tv на полный экран.
Alt Linux Sisyphus
xorg 7.0.0-alt9
nvidia_glx_1.0.
8756–1.0.8756-alt17
MPlayer-1.0-alt23.pre7try2
kernel-image-wks26-up-2.6.16-alt3
xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (builder@sadist.office.altlinux.org) Mon Apr 17 21:32:02 MSD 2006
Section "ServerLayout"
Identifier "layout1"
Screen "S-DFP" 0 0
InputDevice "Mouse1" "CorePointer"
InputDevice "IR-Mouse" "SendCoreEvents"
InputDevice "Keyboard1" "CoreKeyboard"
Option "Clone" "off"
Option "Xinerama" "off"
EndSection
Section "Files"
RgbPath "/usr/share/X11/rgb"
FontPath "unix/:-1"
EndSection
Section "Module"
Load "dbe"
Load "type1"
Load "freetype"
Load "v4l"
Load "extmod"
Load "glx"
Load "xtrap"
Load "extmod"
EndSection
Section "ServerFlags"
Option "AllowMouseOpenFail"
Option "RandR" "on"
EndSection
Section "InputDevice"
Identifier "Keyboard1"
Driver "kbd"
Option "AutoRepeat" "250 30"
Option "XkbModel" "pc105"
Option "XkbLayout" "us,ru"
Option "XkbVariant" ",winkeys"
Option "XkbOptions" "grp:rctrl_toggle,grp_led:scroll"
EndSection
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "Buttons" "6"
Option "ZAxisMapping" "4 5"
Option "Resolution" "800"
EndSection
Section "InputDevice"
Identifier "IR-Mouse"
Driver "mouse"
Option "Device" "/dev/lircm"
Option "Protocol" "auto"
Option "Buttons" "6"
Option "YAxisMapping" "4 5"
EndSection
Section "Monitor"
Identifier "DFP1"
VendorName "BenQ"
ModelName "FP2071"
HorizSync 30.0 - 85.0
VertRefresh 50.0 - 76.0
EndSection
Section "Device"
Identifier "Card0"
Driver "nvidia"
VendorName "NVidia"
BoardName "GeForce6600"
EndSection
Section "Screen"
Identifier "S-DFP"
Device "Card0"
Monitor "DFP1"
DefaultDepth 24
Option "DPMS" "on"
Option "NoLogo" "1"
Option "RenderAccel" "True"
Option "Backingstore" "True"
Option "HWcursor" "True"
Option "CursorShadow" "1"
Option "CursorShadowAlpha" "64"
Option "CursorShadowXOffset" "2"
Option "CursorShadowYOffset" "4"
Option "XvmcUsesTextures" "true"
Option "AllowGLXWithComposite" "true"
Option "Coolbits" "1"
Option "AllowDDCCI" "True"
Option "MultisampleCompatibility" "true"
Option "RandRRotation" "true"
Option "ConnectedMonitor" "DFP, TV"
Option "DigitalVibrance" "10"
Option "IgnoreDisplayDevices" "TV"
Option "TVOutFormat" "SVIDEO"
Option "TVOverScan" "1.0"
Option "SecondMonitorHorizSync" "30-50"
Option "SecondMonitorVertRefresh" "60"
Option "TwinView" "True"
Option "TwinViewOrientation" "LeftOf"
Option "UseEdidFreqs" "True"
Option "MetaModes" "1600x1200, 1024x768@640x480"
SubSection "Display"
Depth 8
Modes "1280x1024" "1024x768" "800x600" "640x400"
EndSubSection
SubSection "Display"
Depth 15
Modes "1024x768" "800x600" "640x480" "1280x1024"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480" "1280x1024"
EndSubSection
SubSection "Display"
Depth 24
Modes "1600x1200" "1280x1024" "1024x768" "800x600" "640x480" "512x384" "320x240"
EndSubSection
EndSection