FAQ  •  Register  •  Login

streaming desk top to tv

<<

Cerberus

User avatar

DLNA master

Posts: 4114

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Sun Jan 22, 2012 2:58 pm

Re: streaming desk top to tv

see now im biased with this topic and i will be honest about this as why would you want to stream your desktop to your tv hell if you want it that badly go and buy a VGA, DVI or HDMI cable and connect the 2 that way, and if you want to watch a DVD disc go buy a dvd player (£15 from asda\walmart). I new when you first brought up this idea JHB50 that it was gunna open a can of worms that was flawed in its concept, we have alot of conversation here on the forum about K.I.S.S and then we do something like this that far from K.I.S.S and then wonder why it causes issues. But this is ZIPs project and he feels that this is useful so we carry on, but i say keep it to the forums and away from the wiki.
Phil Bennett
Beta Tester Group
Wiki | FAQ

Samsung LE40C750 LCD | Samsung BD-C5900 | Sony PS3 | Windows 7 |
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sun Jan 22, 2012 6:13 pm

Re: streaming desk top to tv

breuster99 wrote:I changed the audio input filter from VACGD to the one already installed in my PC (IDT High Definition Audio CODEC) and this seems to have fixed the problem.

Great news. The ability to use the HD Codec on your sound card was an option I was not aware of. I too have a "Mic (Realtek High Definition Au" device on my system (Toshiba), and I suspect yours is an HP. I'll test this further and update the Wiki accordingly. It seems that VACGD just has too many problems.

Once it worked, I switched from a static IP address back to auto assigned DHCP and it did not affect the streaming.

That will work so long as DHCP assigns that address to you, but it will break if it assigns a different address. I always find it safest to have a static ip for my pc.

It is the same as the one you recommended but with a change in the audio device and the aspect ratio:
The use of the aspect ratio parameter only makes the VLC window on your pc wider than the default of 4:3. I prefer to have that window as small as possible, so it is omitted. As you can see from the ffmpeg output your video stream is at 1280 regardless of the aspect ratio settings.
Stream #0:1[0x45]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p
, 1280x720 [SAR 3:4 DAR 4:3], 10000 kb/s, 24.53 fps, 48 tbr, 90k tbn, 48 tbc


While I can now stream to my tv, it is not smooth enough to watch a movie. My CPU usage is often at 100%. Any suggestions?

Sounds like you are close to the necessary power so you can try 2 hings. First insert this following venc=ffmpeg{keyint=80,hurry-up,vt=800000}, and if that does not work reduce the width parameter down from 1280 in steps of 8, which will reduce the encoding load. The disadvantage of this is that your TV image quality will gradually degrade so keep it a high as possible.
<<

breuster99

Serviio newbie

Posts: 6

Joined: Mon Jan 16, 2012 9:58 am

Post Mon Jan 23, 2012 6:36 am

Re: streaming desk top to tv

The use of the aspect ratio parameter only makes the VLC window on your pc wider than the default of 4:3. I prefer to have that window as small as possible, so it is omitted. As you can see from the ffmpeg output your video stream is at 1280 regardless of the aspect ratio settings.


When I don't change the aspect ratio to 16:9, the picture on my television is horizontally distorted and there are black bars on the sides of my television screen. When I change the aspect ratio parameter to 16:9, the picture on my television screen is correctly proportioned and there are no black bars on the sides.

Sounds like you are close to the necessary power so you can try 2 hings. First insert this following venc=ffmpeg{keyint=80,hurry-up,vt=800000}, and if that does not work reduce the width parameter down from 1280 in steps of 8, which will reduce the encoding load. The disadvantage of this is that your TV image quality will gradually degrade so keep it a high as possible.


Here is my new bat file:
"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -vvv dshow:// --dshow-aspect-ratio=16:9 --sout=#transcode{venc=ffmpeg{keyint=80,hurry-up,vt=800000},vcodec=mp2v,vb=10000,fps=24,scale=0.5,width=1280,acodec=mp3,ab=192,channels=2,samplerate=44100,soverlay}:std{access=http,mux=ts,dst=:8081} --no-sout-rtp-sap --no-sout-standard-sap --ttl=1 --sout-keep :dshow-vdev="screen-capture-recorder" :dshow-adev="Rec. Playback (IDT High Definit" :dshow-caching=2000

I am not sure if I inserted the new parameters you suggested correctly. Is this correct?
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Mon Jan 23, 2012 10:24 pm

Re: streaming desk top to tv

When I don't change the aspect ratio to 16:9, the picture on my television is horizontally distorted and there are black bars on the sides of my television screen. When I change the aspect ratio parameter to 16:9, the picture on my television screen is correctly proportioned and there are no black bars on the sides.


Interesting that your HDTV does not honor the pixel sizing in the stream. What make is it? In your case will have to use the 16/9 parameter. I'll change the wiki for everyone to use it, even though most should not need it.

Your command looks fine. Why didn't you try it?
<<

breuster99

Serviio newbie

Posts: 6

Joined: Mon Jan 16, 2012 9:58 am

Post Tue Jan 24, 2012 4:46 am

Re: streaming desk top to tv

Interesting that your HDTV does not honor the pixel sizing in the stream. What make is it? In your case will have to use the 16/9 parameter. I'll change the wiki for everyone to use it, even though most should not need it.


I have a Panasonic TC-P42G10

Your command looks fine. Why didn't you try it?

I did try it but when I did not see a discernible difference, I questioned whether I had implemented it correctly. I tried scaling down from 1280 but the stuttering continued even when the resolution became unwatchable.

Thank you for your suggestions. If you would like me to test anything else out, please let me know. I don't have any computer knowledge but I can be a guinea pig.
<<

DLNAhooray

Streaming enthusiast

Posts: 40

Joined: Sat Sep 11, 2010 4:49 pm

Location: Dresden, Germany

Post Tue Jan 24, 2012 5:08 pm

Re: streaming desk top to tv

I have been using Serviio successfully for some time to send videos and photos via Ethernet from my PC to my TV. I'd now like to stream also my desktop but, since I can't get this to work, I'd appreciate some advice, please! Here's my situation:
- Serviio version is 0.6.1
- In Serviio console under Library, Online sources, Source type is set to Live Stream, Source URL is entered as http://192.168.2.105:8081, Display name as PC Desktop and the Video radio button selected. These entries/settings were done with the stream running.
- In the Serviio console under Transcoding, Enable transcoding is unchecked (I've also tried leaving it checked without improvement)
- In the Serviio console under Presentation, Video, Online category is set to Display category. On the TV, the PC Desktop folder is displayed, but the screen remains blank and no sound is heard.
- PC is newish and runs Win7 32bit using an AMD Phenom II X6 1090T BE (6x 3.2GHz) processor with 4GB of Corsair XMS3 Dominator DDR3-1600 CL7 RAM. When I'm trying to stream as described below, the CPU runs at about 30% overall with all 6 cores in operation. The monitor resolution is 1920 x 1200.
- TV is Panasonic TX-L37GW20
- VLC version is 1.1.11
- My StreamDesktop.bat is based on the info at http://wiki.serviio.org/doku.php?id=stream_pc and contains the following:
"C:\Program Files\VideoLAN\VLC\vlc.exe" -vvv dshow:// --sout=#transcode{venc=ffmpeg,vcodec=mp2v,vb=10000,fps=24,scale=0.5,width=1920,acodec=mpga,ab=192,channels=2,samplerate=44100,soverlay}:std{access=http,mux=ts,dst=:8081} --no-sout-rtp-sap --no-sout-standard-sap --ttl=1 --sout-keep :dshow-vdev=screen-capture-recorder :dshow-adev=virtual-audio-capturer :dshow-caching=2000

- With VLC running as called by StreamDesktop.bat, I can see my desktop in a second instance of VLC set to play the network stream http://@localhost:8081
- Serviio log:
serviio.log.2012-01-24.txt
(203.82 KiB) Downloaded 500 times
<<

pdrpdr

Serviio newbie

Posts: 3

Joined: Mon Nov 14, 2011 1:21 am

Post Wed Jan 25, 2012 1:40 am

Re: streaming desk top to tv

Hi, I'm trying to make this work in my PC. I've followed all the rules on the Wiki (using VACGD that worked fine in the PC) but I can't see anything on the Tv under Online, it's an empty folder.

This is my status:

I've the stream working (tested using MPC and other VLC), video & sound. I've added it to Serviio's Library whit the streaming online. It added it perfectly.

But on my TV (Samsung Ln40D550) the Online folder is shown empty. I can't see "Desktop".

Any tip I should try?
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Wed Jan 25, 2012 5:10 pm

Re: streaming desk top to tv

dlnahooray:'
The log contains the following which looks like the TV or Serviio has rejected your stream. Maybe 1920 is too big. Try changing the command line back to 1280 per the wiki. Perhaps zip can comment on what the message means.
  Code:
2012-01-24 15:03:54,642 DEBUG [VideoDeliveryEngine] Delivering file 'http://192.168.2.105:8081' in native format
2012-01-24 15:03:54,644 DEBUG [ResourceTransportRequestHandler] Creating stream entity with length: 50000000000
2012-01-24 15:03:54,644 DEBUG [ResourceTransportRequestHandler] Sending file back
2012-01-24 15:03:54,644 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 200 OK, headers = [[Content-Type: video/mpeg,Content-Length: 50000000000,Date: Tue, 24 Jan 2012 14:03:54 GMT,Server: Windows 7, UPnP/1.0 DLNADOC/1.50, Serviio/0.6.1,Cache-control: no-cache,transferMode.dlna.org: Streaming]]
2012-01-24 15:03:54,644 DEBUG [OnlineInputStream] Reading 1512000 bytes starting at 0
2012-01-24 15:03:54,672 DEBUG [OnlineInputStream] Byte range not supported for http://192.168.2.105:8081, returning the whole stream
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Jan 25, 2012 5:12 pm

Re: streaming desk top to tv

that message is ok and should not cause any trouble
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Wed Jan 25, 2012 5:16 pm

Re: streaming desk top to tv

breuster99

What was the cpu load at each of those lower resolutions?
Does it also stutter when played locally?
Try 2000 bit rate instead of 10000 when you lower the resolutions.
What cpu power do you have?
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Wed Jan 25, 2012 5:29 pm

Re: streaming desk top to tv

zip: Here is the whole entry..The stream was closed so somethings broken.
  Code:
2012-01-24 15:03:55,741 DEBUG [RendererDAOImpl] Reading a Renderer with ip address 192.168.2.106
2012-01-24 15:03:55,741 DEBUG [ResourceTransportRequestHandler] Resource request accepted. Using client 'IPAddress=/192.168.2.106, Profile=Panasonic Viera'
2012-01-24 15:03:55,741 DEBUG [ResourceTransportRequestHandler] Request for resource 1000000000080001 and type 'MEDIA_ITEM' received
2012-01-24 15:03:55,741 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 1000000000080001 (online)
2012-01-24 15:03:55,741 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 8)
2012-01-24 15:03:55,742 DEBUG [VideoDeliveryEngine] Delivering item '1000000000080001' for client 'IPAddress=/192.168.2.106, Profile=Panasonic Viera'
2012-01-24 15:03:55,742 DEBUG [VideoDeliveryEngine] Delivering file 'http://192.168.2.105:8081' in native format
2012-01-24 15:03:55,742 DEBUG [ResourceTransportRequestHandler] Creating stream entity with length: 50000000000
2012-01-24 15:03:55,742 DEBUG [ResourceTransportRequestHandler] Sending file back
2012-01-24 15:03:55,742 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 200 OK, headers = [[Content-Type: video/mpeg,Content-Length: 50000000000,Date: Tue, 24 Jan 2012 14:03:55 GMT,Server: Windows 7, UPnP/1.0 DLNADOC/1.50, Serviio/0.6.1,Cache-control: no-cache,transferMode.dlna.org: Streaming]]
2012-01-24 15:03:55,742 DEBUG [OnlineInputStream] Reading 1512000 bytes starting at 0
2012-01-24 15:03:55,764 DEBUG [OnlineInputStream] Byte range not supported for http://192.168.2.105:8081, returning the whole stream
2012-01-24 15:03:55,894 DEBUG [WebServer] I/O error: Connection reset by peer: socket write error
2012-01-24 15:03:55,894 DEBUG [WebServer] I/O error: Connection reset by peer: socket write error
2012-01-24 15:03:55,894 DEBUG [OnlineInputStream] Closing stream
2012-01-24 15:03:55,894 DEBUG [OnlineInputStream] Closing stream
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Wed Jan 25, 2012 5:34 pm

Re: streaming desk top to tv

pdrpdr

if its not in the online menu then it did not add perfectly. Check the log to see what it does when adding to Serviio library.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Jan 25, 2012 6:59 pm

Re: streaming desk top to tv

it was closed by the TV, it didn't like something about it. As it's mpegts already it's not going through FFmpeg but just my Java code. It works for Shoutcast streams, not sure why it should fail for video stream.
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Wed Jan 25, 2012 10:39 pm

Re: streaming desk top to tv

My guess its the 1920...no significant disadvantage IMHO to using 1280 as the wiki defines.
<<

pdrpdr

Serviio newbie

Posts: 3

Joined: Mon Nov 14, 2011 1:21 am

Post Thu Jan 26, 2012 12:15 am

Re: streaming desk top to tv

jhb50 wrote:pdrpdr

if its not in the online menu then it did not add perfectly. Check the log to see what it does when adding to Serviio library.


Thanks for the answer, I didn't change anything... but tried again and now I can see the "Desktop" option on my TV.

But now the TV says: "video codec not supported".

I used the .bat settings posted on the wiki (changing the VLC route and my local IP of course), anything I should try?

Thanks again.

FIXED AND WORKING!!!

I had to refresh the status on Serviio (and after the green light turned on) it streamed flawlessly.

Thanks

Edit: Ok, Now I've to work on performance Issues... My CPU usage is aroung 70% just to keep the stream running (Phenom II X3 710). Is that normal?

I'll try reducing the resolution, because the resulted stream to my TV has a really low fps rate.
<<

gummitarzan

Serviio newbie

Posts: 7

Joined: Thu Jan 26, 2012 12:20 pm

Post Thu Jan 26, 2012 12:32 pm

Re: streaming desk top to tv

Has anyone successfully streamed audio only? That would be extremely useful for playing for example spotify on a computer with sound coming out from, in my case, a WD TV Live straight to the home stereo.

Slightly off topic but comment would be very much appreciated.

Thanks a lot
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Thu Jan 26, 2012 4:29 pm

Re: streaming desk top to tv

First get it streaming with audio and video per the wiki then try removing these parameters from the command line, then if an audio only stream starts run ffmpeg -i against it and post the output.You will of course no longer see "whats' playing" on the tv.[codevcodec=mp2v,vb=10000,fps=24,scale=0.5,width=1280,[/code]
<<

gummitarzan

Serviio newbie

Posts: 7

Joined: Thu Jan 26, 2012 12:20 pm

Post Fri Jan 27, 2012 9:24 am

Re: streaming desk top to tv

Thanks for the tips. However, the wiki is for windows which is a really good start, but I'm sitting with a mac. I understand its a bit more complicated to get hold of the sound card output. Although most ideas mentions the Soundflower application I don't get the hang of it.

By the way, shouldn't there exist a program solving all of this at once? If serviio itself could talk to the sound card device that would be awesome :)

Thanks again
<<

DLNAhooray

Streaming enthusiast

Posts: 40

Joined: Sat Sep 11, 2010 4:49 pm

Location: Dresden, Germany

Post Fri Jan 27, 2012 3:40 pm

Re: streaming desk top to tv

jhb50 wrote:My guess its the 1920...no significant disadvantage IMHO to using 1280 as the wiki defines.

Thanks jhb50 & zip for your posts about mine of Jan 24.

I chose 1920 because my PC is running at 1920 x 1200 and in the wiki it states:
... set the height and width to your screen's maximum dimensions, or edit the registry keys as I did. You must however use the exact maximum dimensions recognized by your screen driver, In my case 1366 x 768 regardless of the resolution my screen was set to display which is 1280×720. (Right click your Desktop and click “Screen resolution” to see your current and maximum setable resolutions). Other users have reported the need to set the dimensions that their screen is set to display.


Anyway, changing from 1920 to 1280 did the trick. I can now see my desktop on the TV. I've tried upping to 1440 and this worked too, but I'll leave it at 1280 for now.

Sadly, the image on the TV is of very poor quality. Text and outlines of objects on the desktop are ghosted and fuzzy, appear to be vertically "duplicated" ('=' looks 3 hyphens high instead of 2) and all text and objects on the screen seem to "beat" (like a heart) roughly twice a second.
In addition, the streamed Desktop is displayed centered on the TV screen OK, but appreciably overscanned in all directions. I always have my PC taskbar 2 rows high, but only the upper halves of the taskbar buttons in the upper row are visible on the TV. Standard Windows icons positioned around the other 3 edges of the desktop are all cut in half.

Needless to say, any other images streamed by Serviio from the PC are displayed on the TV screen in high quality, completely free from the problems described above.

Just as a reminder, my PC is Win7 32bit with a 6-core Phenom II CPU running at 30% and my (corrected) StreamDesktop.bat looks like this:
"C:\Program Files\VideoLAN\VLC\vlc.exe" -vvv dshow:// --sout=#transcode
{venc=ffmpeg,vcodec=mp2v,vb=10000,fps=24,scale=0.5,width=1280,acodec=mpga,ab=192,channels=2,samplerate=44100,soverlay}:std{access=http,mux=ts,dst=:8081} --no-sout-rtp-sap --no-sout-standard-sap --ttl=1 --sout-keep :dshow-vdev=screen-capture-recorder :dshow-adev=virtual-audio-capturer :dshow-caching=2000

(Screen Capture Recorder is configured for 24 fps with its other parameters left blank.)

Any advice appreciated!
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Fri Jan 27, 2012 5:52 pm

Re: streaming desk top to tv

DLNAhooray wrote:I chose 1920 because my PC is running at 1920 x 1200 and in the wiki it states:
... set the height and width to your screen's maximum dimensions
Anyway, changing from 1920 to 1280 did the trick. I can now see my desktop on the TV. I've tried upping to 1440 and this worked too, but I'll leave it at 1280 for now.

I'll update the wiki to be more explicit about using 1280.

Sadly, the image on the TV is of very poor quality. Text and outlines of objects on the desktop are ghosted and fuzzy, appear to be vertically "duplicated" ('=' looks 3 hyphens high instead of 2) and all text and objects on the screen seem to "beat" (like a heart) roughly twice a second.

My screen went crisp and sharp when I bumped the bit rate to 10000. I get a slight pulse every second but its only noricable close up. Only difference I can see is that I do not configure the SCR and it is running at the default 30fps, then transcoded to 24. Try that.

In addition, the streamed Desktop is displayed centered on the TV screen OK, but appreciably overscanned in all directions. I always have my PC taskbar 2 rows high, but only the upper halves of the taskbar buttons in the upper row are visible on the TV. Standard Windows icons positioned around the other 3 edges of the desktop are all cut in half.
I addressed that in the Wiki, but yours sounds more severe. Perhaps that is set by the TV.. what make is yours?
PreviousNext

Return to General discussion

Who is online

Users browsing this forum: No registered users and 5 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.