
View on TV
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
Inspired by this (http://www.iofcea.de/cgi-bin/seite.pl?file=linuxtvout) idea on supporting the TV-Out on Nvidia Cards I made a small Service Menu to view videos on TV.
You are able to select between Xine and Mplayer (they and X have to be in your Path otherwise edit the Service Menu File).
Installation:
Copy the file 'view_on_tv.desktop' to ~/.kde/share/apps/konqueror/servicemenus/ (only you will be able to use this Service Menu) or to /usr/share/apps/konqueror/servicemenus/ (depends on your KDE Installation and needs root permissions but all users are able to use the Service Menu).
Thanks go to Markus Iofcea for the idea.
Visit http://www.iofcea.de/cgi-bin/seite.pl?file=linuxtvout to see how it works (only german).
Update: Angel Luis Jimenez Martinez mailed me that it would be a good idea to kill the X-Server after finishing watching on TV. It's quite simple and a similar solution was on the website shown above. The only reason I didn't implement it into the service menu was that it didn't work for me. But maybe someone else has more luck with it.
Just open the service menu file with an editor and change the following two lines:
Exec=/bin/sh -c "X -screen TV :1 -ac & sleep 2; DISPLAY=:1 xine -f -g %U; ps ax|grep 'X -screen TV'|cut -f 1 -d' '|xargs kill"
Exec=/bin/sh -c "X -screen TV :1 -ac & sleep 2; DISPLAY=:1 mplayer -fs -vo xv -zoom -really-quiet %U; ps ax|grep 'X -screen TV'|cut -f 1 -d' '|xargs kill"
As a goodie I made an desktop icon for the DVD-drive to view DVDs and (S)VCDs directly on TV. It's in the [download]. The only problem with it is that some paths are hardcoded in it. So you have to edit it and use your correct paths to get it to work.
Have fun with it.
Maybe someone can help me out with a way to create an icon with the correct paths of the system or a service menu specially for this kind of ServiceType?
flammenflitzer
12 years ago
Type=Service
Version=2.3
Encoding=UTF-8
Icon=mplayer
Actions=ViewOnTvMplayer
ServiceTypes=KonqPopupMenu/Plugin,all/allfiles
X-KDE-Priority=TopLevel
X-KDE-Submenu=Am Fernseher ansehen
X-KDE-Submenu[de]=Am Fernseher ansehen
#X-KDE-Submenu[xx]=Your string 'xx' is the country abbreviation
[Desktop Action ViewOnTvMplayer]
Exec=/bin/sh -c "X -screen TV :1 -ac & sleep 2; DISPLAY=:0.1 mplayer -fs -vo xv -zoom -really-quiet %U; ps ax|grep 'X -screen TV'|cut -f 1 -d' '|xargs kill"
Icon=/usr/share/pixmaps/mplayer/mplayer_32x32.png
Name=MPlayer
Name[de]=MPlayer
[Desktop Entry]
Type=Service
Version=2.3
Encoding=UTF-8
Icon=vlc
Actions=ViewOnTvvlc
ServiceTypes=KonqPopupMenu/Plugin,all/allfiles
X-KDE-Priority=TopLevel
X-KDE-Submenu=Am Fernseher ansehen
X-KDE-Submenu[de]=Am Fernseher ansehen
#X-KDE-Submenu[xx]=Your string 'xx' is the country abbreviation
[Desktop Action ViewOnTvvlc]
Exec=/bin/sh -c "X -screen TV :1 -ac & sleep 2; DISPLAY=:0.1 vlc %U; psax|grep 'X -screen TV'|cut -f 1 -d' '|xargs kill"
Icon=vlc
Name=vlc
Name[de]=vlc
Report
janoz
13 years ago
wget http://www.elisanet.fi/~y635037/playontv/playontv.tar.gz
Extract to: ~/.kde/share/apps/d3lphin/servicemenus/
or
~/.kde/share/apps/konqueror/servicemenus/
(you have to replace paths at scripts)
Take a look at my modifications. Basic idea is to turn tv output by replacing xorg.conf file on and create desktop entry to users Desktop for turning off tv output.
* tv-on-xorg.conf file is MY xorg.conf file with tv output and
* tv-off-xorg.conf file is MY xorg.conf file without tv output and
* REPLACE THESE FILES WITH YOUR OWN xorg.conf FILES
Some bugs:
- Dosn't work if u have whitespaces on video clip path.
works at kubuntu 7.10 (i don't see reason why dosen't work at 7.04)
Report
daller
13 years ago
You can add a shortcut to the "Actions"-menu very easily - Run these commands:
Adding a Kaffeine entry:
Quote:wget http://www.dallerweb.dk/ubuntu/servicemenu/TV-kaffeine.desktop
Adding an Mplayer entry:
Quote:wget http://www.dallerweb.dk/ubuntu/servicemenu/TV-mplayer.desktop
Applying above entries:
Quote:cp TV-*.desktop ~/.kde/share/apps/konqueror/servicemenus/
This will add the shortcut! - You don't even have to restart anything :D
Report
Meamu
14 years ago
Report
miralong
15 years ago
is there some idea how this made on ATI video card?
Report
kennyX
15 years ago
good luck
Report
elektrohirn
15 years ago
Tom
Report
cparker
14 years ago
Report
quickmick
15 years ago
So, how can i make it work for a normal User? (the start of the second X-Server fails)
Report
CyrusQ
14 years ago
ServiceTypes=video/*
Actions=ViewOnTV
[Desktop Action ViewOnTV]
Name=View on TV
Name[de]=Auf Fernseher anschauen
Icon=tv
Exec=kanotix-su "X -screen TV :1 -ac & sleep 2; DISPLAY=:1 mplayer -fs -vo xv -zoom -really-quiet '%U'; ps ax|grep 'X -screen TV'|cut -f 1 -d' '|xargs kill"
Report
CyrusQ
14 years ago
Report
allanon
16 years ago
Exec=/bin/sh -c "X -screen TV :1 -ac & sleep 2; DISPLAY=:1 xine -f -g %U; ps ax|grep 'X -screen TV'|grep -v grep|cut -f 2 -d' '|xargs kill"
The "grep -v grep" is to stop it from finding itself :)
Report
damjan
16 years ago
you can use the startx script.
startx /usr/bin/xine arg1 arg2 -- --layout TV :1 Xarg3 Xarg4 ...
Report
superandrzej
16 years ago
Thanks to the links that you’ve send, I know how to have 2 independent desktops (one on TV and one on CRT) and play a movie on TV while keep working on CRT (without enabled Xinerama). But the disadvantage of this solution is that there are 2 times more resources needed from the moment I start X. So for a moment I either have to have 2 parallel desktops or I have to restart X with another config, each time I want to watch a movie (which is not very convenient.)
Ideally it would be to start second screen on demand just like in example of yours, but without turning off CRT, and then turn off the second screen when movie is finished.
Is it possible?
Report
Cellardoor
16 years ago
I don't know of any way to only switch on/off a second X-Server on demand but if I'll find one I will tell you.
Report
superandrzej
16 years ago
and by the way, in the desktop icon for DVD/(S)VCDs I repalced:
/dev/hdd with /dev/cdrom
and
/mnt/dvd with /mnt/cdrom
and it works just fine and should be more universal (at least in slackare 9.1 which I am using)
Report
Cellardoor
16 years ago
It works on many Systems but not on mine (so I didn't implement it directly in the script).
Another way is to kill the second X-Server with ctrl-alt-backspace. This will free the resources it uses too and return to the first one.
Report
xam
16 years ago
It works great. there is only one thing that really that sucks. I'v to stop X and restart it with a diferent config File.(because regulary i don't work with enabled Xinerama enviroment).
Report
Cellardoor
16 years ago
http://www.nvnews.net/vbulletin/showthread.php?threadid=5819
I wasn't able to use Xinerama because of this. Even the solution with switching screens didn't help because my virtual consoles were unusable afterwards.
Report
mabs
16 years ago
I want to be able to work on my computer while, the video is playing on my TV.
Report
Cellardoor
16 years ago
Maybe this thread can help you:
http://www.nvnews.net/vbulletin/showthread.php?t=31188
If you use this solution you have to edit the Service Menu file to fit to it.
Report
superandrzej
16 years ago
I want to know: How this service menu is supposed to work?
I have GeForce4 MX 440 AGP 8x with TVout and playing with XF86Config I managed to have 3 different outputs of using your service menu:
1) CRT is switched off and a movie is played fullscreen on my TV
2) Both on CRT and TV a movie is played fullscreen
3) Only on CRT movie is played fullscreen and TV is blank.
I'm looking for the forth one (under Win32 it is possibile):
4) the movie is played fullscreen on TV and CRT (or LCD) can be used to work with my PC. this one would be the coolest one. Does some one know how to to it??
Report
Cellardoor
16 years ago
The 4th solution you would prefer is possible, but there are some problems with it:
The first display in your XF86Config-4 always gets the Video Overlay. If the first display is your CRT it controls the Overlay and a Video played on TV at the same time will show some annoying tearing in horizontal scrolls.
You can select your TV as first display but then your login will be on TV and I don't think you want this.
Finally I found a solution for selecting TV as first display and having the login on the CRT. Iwas able to view Videos in good Quality on TV while working on my CRT. The only Problem was that switching to the console showed a totally destroyed screen. Even after finishing X-Server I wasn't able to see anything on my CRT.
If you're interested in this solution I posted my XF86Config-4 here:
http://www.linuxforen.de/forums/showthread.php?t=82059
Take a look at it maybe it's useful for you.
Report
vladvasiliu
16 years ago
Report
Cellardoor
16 years ago
http://www.iofcea.de/cgi-bin/seite.pl?file=linuxtvout
It describes how to modify your XF86Config-4 in order to use TV-Out. Unfortunately it's only in German.
Only if you setup your system as described above the Service Menu will work.
Report