FAQ  •  Register  •  Login

streaming desk top to tv

<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Sep 17, 2012 7:18 pm

Re: streaming desk top to tv

that looks ok, add the URL to the console as a live stream. You might have to lower the resolution so that your laptop can cope.
<<

technolog

Serviio newbie

Posts: 12

Joined: Mon Sep 17, 2012 6:07 pm

Post Mon Sep 17, 2012 7:40 pm

Re: streaming desk top to tv

Thanks for the reply. How and where do I alter the resolution? In the bat file?

This is the bat file I'm using:

  Code:
@echo off

:This bat is used to stream the desktop with VLC using HTTP
:A corresponding player must be started using HTTP

"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=mp3,ab=192,channels=2,samplerate=44100}: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

:Exit


Do I just alter the width=1280 setting?
<<

technolog

Serviio newbie

Posts: 12

Joined: Mon Sep 17, 2012 6:07 pm

Post Mon Sep 17, 2012 8:04 pm

Re: streaming desk top to tv

I altered the width setting to 800. I then opened a second instance of VLC and played the same stream. It played but with a long delay of >10 secs between changes on my desktop appearing in the 2nd VLC player window.

Any comments on the two PC specs I posted? Are either of them capable of doing the job successfully?

If I ever get that far, how do I actually play the stream on the TV or does it appear and start playing automatically? At the moment I'm selecting the DLNA source corresponding to my lappie, then selecting Video and searching the various options for any signs of a stream to play but I can't find anything.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Sep 17, 2012 8:56 pm

Re: streaming desk top to tv

the delay is normal considering your HW I think.

The video would be in Video -> Online -> (make sure you have enabled Online category on the Presentation tab in the console)
<<

technolog

Serviio newbie

Posts: 12

Joined: Mon Sep 17, 2012 6:07 pm

Post Mon Sep 17, 2012 9:21 pm

Re: streaming desk top to tv

Thanks for the reply again zip. I appreciate you taking the time & trouble.

The 'Online' category was enabled in the Serviio 'Presentation' tab. I changed it from 'Display Category' to 'Display Content Only' and the 'Online' folder disappeared from the DLNA/Video menu on the TV. At least now I get where that structure emanates from.

So, I have a stream appearing in a 2nd VLC instance. I've tried using Windows Media Player 12 to open the URL (http://192.168.1.26:8081) and it fails with the following error:

Windows Media Player cannot play the file. The Player might not support the file type or might not support the codec that was used to compress the file.


as it does on my partner's PC.

What would you suggest next in the fault-finding process?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Sep 17, 2012 9:50 pm

Re: streaming desk top to tv

check serviio.log to see if there are any errors regarding the stream
<<

technolog

Serviio newbie

Posts: 12

Joined: Mon Sep 17, 2012 6:07 pm

Post Mon Sep 17, 2012 10:04 pm

Re: streaming desk top to tv

There appear to be some 'Unknown video file type' errors
Attachments
serviio.log
(38.91 KiB) Downloaded 409 times
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Sep 18, 2012 10:45 am

Re: streaming desk top to tv

Was the stream running at that point? What is the result of

  Code:
ffmpeg -i http://192.168.1.26:8081
<<

technolog

Serviio newbie

Posts: 12

Joined: Mon Sep 17, 2012 6:07 pm

Post Wed Sep 19, 2012 12:07 pm

Re: streaming desk top to tv

I'm afraid my laptop's just gone bang. Hopefully I'll be back to pester you further when I'm in possession of a new one. Thanks for your help so far.
<<

punkid

Serviio newbie

Posts: 3

Joined: Tue Sep 11, 2012 4:35 pm

Post Wed Sep 19, 2012 5:59 pm

Re: streaming desk top to tv

Hi,

i experience lags when i try to stream my desktop to TV while watching a live streamm. I use the following batch file:

  Code:
"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -vvv dshow:// --sout=#transcode{venc=ffmpeg,vcodec=mp2v,vb=10000,fps=25,width=1920,acodec=mp3,ab=192,channels=2,samplerate=44100}: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=20000 :dshow-aspect-ratio=16\:9


My notebook should have enough power to stream full HD. Streaming BluRays with Serviio works fine.

CPU: Intel Core i5-2410M
Ram: 8 GB
System: Windows 7 64bit
Notebook and TV are connected by LAN (D-Link Switch)

Does anyone have any suggestions what the problem might be?
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Wed Sep 19, 2012 10:35 pm

Re: streaming desk top to tv

Transcoding 1920 is likely overloading your cpu. Really a waste because live streams are typically SD with a few (SOPCAST) at 1280 all of which will transcode fine for you.
<<

punkid

Serviio newbie

Posts: 3

Joined: Tue Sep 11, 2012 4:35 pm

Post Thu Sep 20, 2012 8:04 am

Re: streaming desk top to tv

Okay, so i set the width to 1280 but i still experience some lags. CPU load is at 50%-70%.
<<

technolog

Serviio newbie

Posts: 12

Joined: Mon Sep 17, 2012 6:07 pm

Post Sat Sep 29, 2012 1:26 pm

Re: streaming desk top to tv

technolog wrote:I'm afraid my laptop's just gone bang. Hopefully I'll be back to pester you further when I'm in possession of a new one. Thanks for your help so far.


I'm back...

Image

...and I'm armed with this bad boy...

Image

Lenovo Z580 i5-3210M 8GB 750GB


I've set everything up as per the wiki - VLC 1.1.10; screen-capture-recorder 0.8.6; virtual audio capture device 0.3.10 and Serviio 1.0.1 - and I'm just about there.

I'm receiving the stream on the tv with rock solid audio (when viewing a video) but the video is totally distorted. If I was a betting man, I would say it's the same issue that jhb50 experienced in the wiki:

By default, it is supposed to capture the whole screen. For some reason however on initial install I got a lot of static. If this happens to you, run the “configuration_setup_utility\edit_config.bat” and 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.


I wouldn't necessarily describe it as 'static'; when the desktop colours change significantly, this is noticeable on the tv. It's as if the desktop has been smeared across the tv screen in about 12 diagonal (well, about 15° to the horizontal) bands. However it's most definitely not watchable!

I tried to follow jhb50's solution but couldn't find edit_config.bat. However I did find 'configure by setting specific screen capture numbers' under Start/All Programs/Screen Capturer Recorder/Configure. This ran a Java app which asked for capture height (I entered 768, my current and maximum lappie screen resolution is 1366x768), capture width (I entered 1366), desired start_x (I wasn't sure about this and left it blank). Even after rebooting the tv display is the same. I tried lowering my lappie resolution to 1280x768 but this had no instant effect - though I didn't reboot afterwards.

This is the batch file I'm starting the stream with:

  Code:
@echo off

:This bat is used to stream the desktop with VLC using HTTP
:A corresponding player must be started using HTTP

"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -vvv dshow:// --sout=#transcode{venc=ffmpeg,vcodec=mp2v,vb=10000,fps=24,scale=0.5,width=1280,acodec=mp3,ab=192,channels=2,samplerate=44100}: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

:Exit


When the streamed desktop (with online video playing) is playing on the tv, the cpu load is only around 40 to 50% so I'm hopeful that I just need to make a minor tweak or two somewhere and I'll have a great outcome.

Is anyone able to offer any insight?
<<

technolog

Serviio newbie

Posts: 12

Joined: Mon Sep 17, 2012 6:07 pm

Post Sun Sep 30, 2012 4:20 pm

Re: streaming desk top to tv

As no replies were forthcoming, I thought I'd best stop being a lazy bum and have a tinker myself :)

Yay! I got it working!

I ran through the 'configure by setting specific screen capture numbers' Java app again, setting the capture height & width to my screen resolution (1366x768), the start position to 0,0, the max fps to 30 and the stretch to height & width to the resolution of my tv (1920x1080) and it worked.

  Code:
capture_height=768

capture_width=1366

start_x=0

start_y=0

default_max_fps=30

stretch_to_width=1920

stretch_to_height=1080

stretch_mode_high_quality_if_1=



It's really clear on a static desktop display. When displaying a streaming video, the tv display freezes for about a second every 5 or 6 seconds. The CPU load is around the 70 to 80% mark. Is there anything I can try to stop this freezing? Also, it's not a problem but the lag between desktop display and the tv is around 12 seconds, can this be reduced?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Sep 30, 2012 4:27 pm

Re: streaming desk top to tv

try not to strech it, select less fps and possibly bitrate. Try to find the lowest setting that works reasonably and then take it from there.
<<

technolog

Serviio newbie

Posts: 12

Joined: Mon Sep 17, 2012 6:07 pm

Post Sun Sep 30, 2012 5:57 pm

Re: streaming desk top to tv

If I don't stretch it, will the tv stretch it to fill the screen anyway?

When you say lower the fps & bitrate, am I right to assume you mean the fps= and vb= settings in the bat file?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Sep 30, 2012 8:04 pm

Re: streaming desk top to tv

yes
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sun Sep 30, 2012 11:28 pm

Re: streaming desk top to tv

I suggest configure with everything blank and Change your screen resolution to 1280x720. Leave the bat as is.
<<

technolog

Serviio newbie

Posts: 12

Joined: Mon Sep 17, 2012 6:07 pm

Post Mon Oct 01, 2012 7:24 pm

Re: streaming desk top to tv

jhb50 wrote:I suggest configure with everything blank and Change your screen resolution to 1280x720. Leave the bat as is.


Thank you, that's better! There's definitely less stuttering in tv playback and the CPU load has dropped to around 40%.

For convenience sake, is there a way to alter the resolution from my normal 1366x768 to 1280x720 in the batch file?
Last edited by technolog on Mon Oct 01, 2012 7:54 pm, edited 1 time in total.
<<

technolog

Serviio newbie

Posts: 12

Joined: Mon Sep 17, 2012 6:07 pm

Post Mon Oct 01, 2012 7:53 pm

Re: streaming desk top to tv

I need to learn to have a look myself before asking questions.

I've found a handy utility called QRes.exe which can be called from a batch file. I've used it once at the start of the batch file to switch to the lower resolution and again just before the exit command to switch back to the higher resolution.
PreviousNext

Return to General discussion

Who is online

Users browsing this forum: No registered users and 20 guests

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