View on TV

Dolphin Service Menus

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

0
Score 50.0%
Description:

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

11 years ago

[Desktop Entry]
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

11 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

12 years ago

Hi there,

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

13 years ago

i have done it with an old ati card (radeon 7500) but i have a problem with the service menu... the command from the website is working if i start it in a bash but if i try to use the service menu only the X-server starts... the problem is that i cant use it with mplayer or xine because they don't work with my grafic drivers.. so i have to take vlc ... but as i said it isn't realy working... could someone post a version with a working vlc ?

Report

miralong

14 years ago

Hi,
is there some idea how this made on ATI video card?

Report

kennyX

13 years ago

I have been trying is on a Ati card with some succes, it's should possible but you have to tweak it a bit from the nvidea version. the basics should be the same

good luck

Report

elektrohirn

14 years ago

Hello, nice script, but I'd like to modify it such that I have only one entry that plays it with MPlayer. I just commented the second entry out, but now I have "Actions - View on TV - MPlayer". How could I modify the script so that I have only ONE entry "Actions - View on TV" that I have to click? (without this submenu containing MPlayer and Xine)

Tom

Report

cparker

12 years ago

I'd appreciate being able to do this, as well.

Report

quickmick

14 years ago

Hello, great work, but on my Maschine it only works as Root :-(
So, how can i make it work for a normal User? (the start of the second X-Server fails)

Report

CyrusQ

13 years ago

[Desktop Entry]
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

13 years ago

sry, this post was intended as a reply for the user elektrohirn (post below)

Report

allanon

14 years ago

On my system (Arch Linux), the server is not killed with the above command. For some reason the ps list has a space as the first character, making cut find just a blank. Going for the second space fixes it though:
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

14 years ago

Instead of starting the X server, sleep-ing, starting the app etc...
you can use the startx script.

startx /usr/bin/xine arg1 arg2 -- --layout TV :1 Xarg3 Xarg4 ...

Report

superandrzej

14 years ago

Hello again Cellardoor,

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

C

Cellardoor

14 years ago

Ups, it's too early in the morning for me. I haven't read your post exactly.

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

14 years ago

OK I'm waiting. ;)

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

C

Cellardoor

14 years ago

If you look at the description under *update* you will find a solution for this. It kills the second X-Server after finishing xine (or mplayer).

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

14 years ago

I play my Videos on TV with CRT switched on. The key is X11's Xinerama view mode. On the first display there is my Flatpanel with the KDE desktop on it. On the 2nd display the TV.
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

C

Cellardoor

14 years ago

Don't you have this tearing problem mentioned here:

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

15 years ago

Is it posible to set this up so that the CRT keeps runnning while the video is running in fullscreen on the TV?
I want to be able to work on my computer while, the video is playing on my TV.

Report

C

Cellardoor

15 years ago

There have been many discussions on nvnews.net about this problem (even the last post here was about it).

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

15 years ago

Hi,
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

C

Cellardoor

15 years ago

When you follow the instructions on the page I posted you'll see the Video Fullscreen on TV with CRT switched off. In my opinion the best solution.

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

15 years ago

Hello, I tried your program in order to use the TV out function of my nvidia geforce fx5200, but it doesn't work! i have installed the necessary drivers from nvidia, but it still wouldn't show anything on my tv screen. Any sollution?

Report

C

Cellardoor

15 years ago

Have you looked at this page:

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

12345678910
product-maker Count: 4 Rating: 5.0
File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
1.0
updated Jul 24 2004
added Jun 30 2004
downloads today
0
page views today 6
System Tags addon