FAQ  •  Register  •  Login

streaming desk top to tv

<<

Cerberus

User avatar

DLNA master

Posts: 4116

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Sun Jan 15, 2012 7:29 am

Re: streaming desk top to tv

i can confirm linux command line work but u have to have a decent pc for it to work nicely. but as JHB50 said linux version isnt supported by anyone here.
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
<<

smart

Serviio newbie

Posts: 8

Joined: Sun Jan 15, 2012 10:35 am

Post Sun Jan 15, 2012 11:33 am

Re: streaming desk top to tv

Windows Desktop Streaming

I try to stream my Windows 7 (32-Bit) desktop via Serviio (V0.6.1) to my Sony Bravia TV with the VLC player (V 1.1.11). I can successfully stream any other content to my TV via Serviio (e.g. AVI/MKV-Videos, MP3s, JPEGs, Internet Radio and Video Live-Streams).

First of all, i do not want to use this procedure here showed in the wiki, because i think (hope) it is not neccessary if i use the VLC screen streaming feature:
http://wiki.serviio.org/doku.php?id=stream_pc

In a linux environment streaming the desktop via VLC should work as shown in some threads here. For example user jk50 postet earlier in this thread that it works fine with linux. But my goal is to get it running under Windows 7 with VLC and not to use all of the stuff for Windows shown up in the wiki.

I run the following VLC commandline under Windows 7 (with admin privilleges), the main elements are from the linux post shown earlier in this thread, but optimized for Windows:
  Code:
"C:\Program Files\VideoLAN\VLC\vlc.exe" screen:// :screen-fps="24" :sout="#transcode{vcodec=mp2v,vb=10000,fps=24,width=1280,acodec=mp3,ab=192,channels=2,samplerate=44100} :http{dst=:8081/desk.ts}" :no-sout-rtp-sap :no-sout-standard-sap :ttl=1 :sout-keep


Then i run the following command of ffmpeg:
  Code:
ffmpeg -i "http://192.168.178.81:8081/desk.ts"


As a result i get the following output of ffmpeg:
  Code:
C:\Program Files\Serviio\lib>ffmpeg -i "http://192.168.178.81:8081/desk.ts"
ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 13 2011 20:46:11 with gcc 4.4.2
  configuration: --enable-static --disable-shared --disable-ffplay --disable-ffs
erver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='
-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enab
le-pthreads --target-os=mingw32 --cross-prefix=i686-mingw32- --pkg-config=pkg-co
nfig
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 42. 0 / 53. 42. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0
[mpeg2video @ 002cab00] mpeg_decode_postinit() failure
    Last message repeated 3 times
[mpegts @ 002c7fe0] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegts, from 'http://192.168.178.81:8081/desk.ts':
  Duration: N/A, start: 1537.600700, bitrate: 10000 kb/s
  Program 1
    Stream #0:0[0x44]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p
, 1280x800 [SAR 1:1 DAR 8:5], 10000 kb/s, 24.52 fps, 24 tbr, 90k tbn, 48 tbc
At least one output file must be specified


Then in the Serviio console i add the following live stream as a online source (with radiobutton "movie") with the name "Desktop PC":
  Code:
http://192.168.178.81:8081/desk.ts

After that i save this in Serviio console i stop and start the Serviio service via the Serviio console and also i power off / on my Bravia TV.

But i do not see anything of this new online stream at the TV! It doesn't even show up the new name "Desktop TV". :cry:
Are the errors reportet by ffmpeg (shown above) critical?

My PC is a new 8 core CPU box (not virtual, its a physical machine), the overal cpu and memory performance should be good enough to handle this (cpu over all is anytime under 10%).

Can anyone help me please with the correct commandline for VLC (under Windows 7!) to stream successfully my desktop via Serviio to my Bravia TV?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17079

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Jan 15, 2012 11:38 am

Re: streaming desk top to tv

the FFmpeg output is correct. Did you add it as a live stream in the console? if yes post detailed log.
<<

C322Raquel

Serviio newbie

Posts: 1

Joined: Sun Jan 15, 2012 1:14 am

Post Sun Jan 15, 2012 11:39 am

Re: streaming desk top to tv

wapman wrote:Hi friends,

I am really a happy amateur when it comes to this and I really appreciate your friendly support.

I got the advise to run "ffmpeg -i 192.168.0.12:8081"..I opened the command window and typed that line but it just say "not recognised...."..guess I miss something.

When I run the script from Wiki, VLC opens and it says at the bottom left (status line?) ://dshow, the timer down right is counting. I also get an error message saying VLC can not use unit screen-capture-recorder because it is not a supported type (translated from Swedish..so aprox.)

Any more ideas to get further would be much appreciated.

Cheers



I had the same problem "screen-capture-recorder isn't a supported type".

I solved it after going to Start > All programs > Screen capture recorder > Configure > Re-register capture device after install msvcr100, if necessary.

Hope it works for you as well.
<<

smart

Serviio newbie

Posts: 8

Joined: Sun Jan 15, 2012 10:35 am

Post Sun Jan 15, 2012 11:58 am

Re: streaming desk top to tv

zip wrote:the FFmpeg output is correct. Did you add it as a live stream in the console? if yes post detailed log.

Thank you for this real quick reply.
Yes, i added it as al live stream in Serviio. All my other live streams are working fine.
Where can i get the detailled log?
I added the one i found in the log directory of Serviio.
Attachments
serviio.log
Log:
(15.33 KiB) Downloaded 310 times
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17079

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Jan 15, 2012 12:11 pm

Re: streaming desk top to tv

was the stream running when you added it to the library? There is an record in the log where ffmpeg -i resulted in an error. Run VLC and try to refresh the stream or remove + add it again.
<<

smart

Serviio newbie

Posts: 8

Joined: Sun Jan 15, 2012 10:35 am

Post Sun Jan 15, 2012 12:38 pm

Re: streaming desk top to tv

zip wrote:was the stream running when you added it to the library? There is an record in the log where ffmpeg -i resulted in an error. Run VLC and try to refresh the stream or remove + add it again.

The stream was not running. Now i added the stream to the library when VLC was running - now i can see the stream (now named "Desktop") at the TV! :)

But if i want to view it at the TV (click on it at the TV with the remote control) it shows up an Bravia error message: "Playback is unavailable."
And no Playback is possible.

So, is there maybe something wrong with the used video or audio codec in the VLC commandline?

I added the Serviio log once again.
Attachments
serviio.log
(16.17 KiB) Downloaded 279 times
<<

Cerberus

User avatar

DLNA master

Posts: 4116

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Sun Jan 15, 2012 12:41 pm

Re: streaming desk top to tv

smart wrote:
zip wrote:was the stream running when you added it to the library? There is an record in the log where ffmpeg -i resulted in an error. Run VLC and try to refresh the stream or remove + add it again.

The stream was not running. Now i added the stream to the library when VLC was running - now i can see the stream (now named "Desktop") at the TV! :)

But if i want to view it at the TV (click on it at the TV with the remote control) it shows up an Bravia error message: "Playback is unavailable."
And no Playback is possible.

So, is there maybe something wrong with the used video or audio codec in the VLC commandline?

I added the Serviio log once again.


you do realise that VLC has to be running for it to work yer?
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
<<

smart

Serviio newbie

Posts: 8

Joined: Sun Jan 15, 2012 10:35 am

Post Sun Jan 15, 2012 1:21 pm

Re: streaming desk top to tv

Cerberus wrote:
smart wrote:
zip wrote:was the stream running when you added it to the library? There is an record in the log where ffmpeg -i resulted in an error. Run VLC and try to refresh the stream or remove + add it again.

The stream was not running. Now i added the stream to the library when VLC was running - now i can see the stream (now named "Desktop") at the TV! :)

But if i want to view it at the TV (click on it at the TV with the remote control) it shows up an Bravia error message: "Playback is unavailable."
And no Playback is possible.

So, is there maybe something wrong with the used video or audio codec in the VLC commandline?

I added the Serviio log once again.


you do realise that VLC has to be running for it to work yer?


Yes, i know that, for sure....... ;)
VLC runs on the PC but i am not able to see the stream at the TV. Same error as shown obove.

Could it be a Windows 7 firewall issue? What ports are used by Serviio (are these ports opened in the firewall by the Serviio installer)?
I will try later to open the above used port 8081 in the Win 7 firewall.
<<

Cerberus

User avatar

DLNA master

Posts: 4116

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Sun Jan 15, 2012 1:33 pm

Re: streaming desk top to tv

Also make sure that TCP port 8895 and UDP 1900 are open in your firewall.
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
<<

mchristian

Streaming enthusiast

Posts: 23

Joined: Fri Nov 12, 2010 5:46 pm

Post Sun Jan 15, 2012 2:02 pm

Re: streaming desk top to tv

No need to panic, don't go formatting anything .The screen capture module is built in to vlc. Some info would would help.What version of vlc ,what version of ubuntu,
what kind of cpu and video hardware are you running ,what is your monitors resolution? Maybe you can run the command line below, it won't do any thing but capture
your desktop and display it in the vlc gui, no encoding ,no sending anything to your tv. If it works,check your cpu usage. if its higher than about 30 % your computer
simply is not fast enough to do this .

  Code:
vlc screen:// :screen-fps=24

Well it seems I have my answer, my cpu usage is VERY HIGH when I run your code. Thanks for your helpful input.
Sony S570 BDP
Ubuntu 10.10
<<

marsha11

Serviio newbie

Posts: 3

Joined: Sun Jan 15, 2012 1:43 pm

Post Sun Jan 15, 2012 2:30 pm

Re: streaming desk top to tv

Thanks to jhb50's wiki and everyone who's contributed (and serviio 0.6.1 of course), I've now got my desktop streaming to my TV. The only hiccup was having to add msvcr100.dll to c:\windows\system32 and registering it.

I've added a couple of lines to my .bat file to avoid having to change the playback device manually ...
  Code:
c:\windows\nircmd.exe   setdefaultsounddevice   "Line 1"
VLC commands as per wiki
c:\windows\nircmd.exe   setdefaultsounddevice   SyncMaster


nircmd.exe can be found here ... http://www.nirsoft.net/utils/nircmd.html

jhb50,
The wiki has this entry ...
You may also experiment with :dshow-caching=20000

but the .bat file has :dshow-caching=2000. Is this a typo or do you mean try using 20000?
<<

Cerberus

User avatar

DLNA master

Posts: 4116

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Sun Jan 15, 2012 2:38 pm

Re: streaming desk top to tv

marsha11 wrote:Thanks to jhb50's wiki and everyone who's contributed (and serviio 0.6.1 of course), I've now got my desktop streaming to my TV. The only hiccup was having to add msvcr100.dll to c:\windows\system32 and registering it.

I've added a couple of lines to my .bat file to avoid having to change the playback device manually ...
  Code:
c:\windows\nircmd.exe   setdefaultsounddevice   "Line 1"
VLC commands as per wiki
c:\windows\nircmd.exe   setdefaultsounddevice   SyncMaster


nircmd.exe can be found here ... http://www.nirsoft.net/utils/nircmd.html

jhb50,
The wiki has this entry ...
You may also experiment with :dshow-caching=20000

but the .bat file has :dshow-caching=2000. Is this a typo or do you mean try using 20000?


nice is there a way to reverse that and do an on exit to revert that change when bat is closed?
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
<<

marsha11

Serviio newbie

Posts: 3

Joined: Sun Jan 15, 2012 1:43 pm

Post Sun Jan 15, 2012 4:41 pm

Re: streaming desk top to tv

Cerberus wrote:nice is there a way to reverse that and do an on exit to revert that change when bat is closed?

The last line in the .bat file is executed when VLC exits and returns the playback device to normal. If you've already closed the command window manually, you can put the last line into it's own .bat file to return the playback device to normal.
Samsung 40C650
Windows 7 64bit
<<

Cerberus

User avatar

DLNA master

Posts: 4116

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Sun Jan 15, 2012 5:06 pm

Re: streaming desk top to tv

marsha11 wrote:
Cerberus wrote:nice is there a way to reverse that and do an on exit to revert that change when bat is closed?

The last line in the .bat file is executed when VLC exits and returns the playback device to normal. If you've already closed the command window manually, you can put the last line into it's own .bat file to return the playback device to normal.


sounds good to me
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
<<

smart

Serviio newbie

Posts: 8

Joined: Sun Jan 15, 2012 10:35 am

Post Sun Jan 15, 2012 8:19 pm

Re: streaming desk top to tv

Cerberus wrote:Also make sure that TCP port 8895 and UDP 1900 are open in your firewall.

It is not a firewall issue. All ports (udp and tcp) are open for Serviio and VLC.

I had an error in the VLC commandline syntax.
With the follwing commandline i was able to stream the Windows 7 desktop to my TV:
  Code:
"C:\Program Files\VideoLAN\VLC\vlc.exe" screen:// :screen-fps="24" :sout="#transcode{vcodec=mp2v,vb=1024,scale=1.0,fps=24,acodec=mp3,ab=192,channels=2,samplerate=44100} :http{dst=192.168.178.81:8081/desk.ts}" :no-sout-rtp-sap :no-sout-standard-sap :ttl=1 :sout-keep


But the qaulity of the stream was not good. And i could only see a part of my desktop and i had no audio. Also the stream seems to be very delayed.
I will try to figure out what the cause is for this.

Does anyone know if its possible to stream audio from the desktop with VLC (i mean inside the same desktop stream)? I know that there is a parameter "acodec" in the above commandline but someone wrote that this would just be a fake parameter and this would not be possible.....?
<<

mchristian

Streaming enthusiast

Posts: 23

Joined: Fri Nov 12, 2010 5:46 pm

Post Sun Jan 15, 2012 11:04 pm

Re: streaming desk top to tv

I've got desktop streaming working on Kubuntu 11.10 using vlc 1.3.0 with this vlc command line

  Code:
vlc screen:// :screen-fps=24.000000 :input-slave=alsa://pulse :sout="#transcode{vcodec=mp2v,vb=10000,fps=24,width=1280,acodec=mp3,ab=192,channels=2,samplerate=44100} :http{dst=:8081/desk.ts}" :no-sout-rtp-sap :no-sout-standard-sap :ttl=1 :sout-keep



That is the original code that was posted as working with a Linux OS. After a few days of trying to get it to work, I realized it would never work for me because in the destination portion of the code, it does not specify an IP address or localhost would do as well. After correcting that, the code now works for me under Ubuntu 11.10
It still is too much for my computer, but it does work.
Last edited by mchristian on Sun Jan 15, 2012 11:15 pm, edited 3 times in total.
Sony S570 BDP
Ubuntu 10.10
<<

jhb50

DLNA master

Posts: 2856

Joined: Thu Jun 30, 2011 9:32 pm

Post Sun Jan 15, 2012 11:05 pm

Re: streaming desk top to tv

The only hiccup was having to add msvcr100.dll to c:\windows\system32 and registering it.

I think that is installed by the prereq Visual C lib referenced in the wiki.
I've added a couple of lines to my .bat file to avoid having to change the playback device manually

That is great..I'll test to reverse it when shut down and update the wiki. Nice find!
You may also experiment with :dshow-caching=20000 but the .bat file has :dshow-caching=2000. Is this a typo or do you mean try using 20000?

My orignal bat and the one I am using has 20000 so it must have been chopped off in copying to the wiki. If it works fine at 2000 I'll leave it there. I get 3-5 sec latency with 20000 so maybe it way better with 2000?
<<

jk50

Serviio lover

Posts: 57

Joined: Mon Jan 09, 2012 9:53 am

Post Mon Jan 16, 2012 9:32 am

Re: streaming desk top to tv

Linux Streaming

There were some additions made to the command line in the linux desktop streaming wiki.

  Code:
:screen-follow-mouse


This command is only useful if you are not capturing the entire screen For example this command
captures a static 640x360 area at the top left corner of your screen

  Code:
vlc screen:// :screen-fps=24 :screen-width=640 :screen-height=360


If you add screen-follow-mouse

  Code:
vlc screen:// :screen-fps=24 :screen-width=640 :screen-height=360 :screen-follow-mouse


It does not capture the top left corner.It captures a traveling 640x360 area centered wherever your mouse cursor is.
The addition of :screen-follow-mouse to a command line that captures the entire screen makes no sense.
This was also added

  Code:
:screen-mouse-image="~/Pictures/mousepointerimage.png"


This command tells vlc to overlay a mouse pointer on your screen capture. This command requires more setup than you have in
the wiki.You have to tell people to acquire a picture of a mouse cursor and save it as "mousepointerimage.png" in :"~/Pictures/",
or the command has no hope of working.
<<

breuster99

Serviio newbie

Posts: 6

Joined: Mon Jan 16, 2012 9:58 am

Post Mon Jan 16, 2012 11:27 am

Re: streaming desk top to tv

I am a novice with computers and this is my first time posting to any bulletin board so I apologize if I am posting in the wrong place or breaking protocols.

I would like to stream my desktop to my tv and have followed the wiki "How to Stream Your Windows PC Desktop". My PC runs Vista 64 and serviio is running on an HP MediaSmart Server with WHS v1.

I downloaded the most current versions of screen-capture-recorder (SCR) and virtual audio capture grabber device (VACGD) and am running VLC v1.1.11. When I go to VLC/Media/Open Capture Device, SCR appears as an option in the video device name drop down list and VACGD appears as an option in the audio device name drop down list. I ran the SCR config and set the screen resolution to 1280 x 800 which is the max resolution for my screen.

Here is a copy of my bat file:

@echo off
"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,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

When I run the bat file, VLC opens displaying dshow:// and a counter starts in the bottom right corner.

I used ipconfig and obtained the ip address of my pc which is 192.168.1.111.

While VLC is running, when I run ffmpeg -i "http://192.168.1.111:8081" I get the following error message "http://192.168.1.111:8081: invalid data found when processing input"

While VLC is running, I have added the above ip address to Serviio via the console, but the online serviio folder displays "there is no playable file"

Thank you
PreviousNext

Return to General discussion

Who is online

Users browsing this forum: No registered users and 7 guests

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