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 Thu Jan 12, 2012 3:55 pm

Re: streaming desk top to tv

hiviking wrote:By the way, for most users it will be easier to use the VLC GUI to set up the stream instead of using the command line. There is a guide at http://betterlogic.com/roger/2010/07/ho ... playon-tv/ and another at http://grok.lsu.edu/article.aspx?articleid=14625 (fullscreen only).

Feel free to update the wiki with any tips.
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Thu Jan 12, 2012 3:59 pm

Re: streaming desk top to tv

with a frame in the past ...drift is too high


Sounds to me like your pc is too slow. I think these messages indicate that the stream is not able to go out at real-time, whereas in play mode perhaps it can handle that. Just my guess.

for most users it will be easier to use the VLC GUI to set up the stream instead of using the command line


I don't know where you got the idea that a command line has to be typed in. I don't think going thru a multi-click/type gui that your guides describe is preferable to clicking on a "StreamDesktop.bat" icon that does it all.
<<

hiviking

Serviio newbie

Posts: 18

Joined: Wed Jan 04, 2012 6:22 pm

Post Fri Jan 13, 2012 10:16 am

Re: streaming desk top to tv

zip wrote:Feel free to update the wiki with any tips.

I have entered my comments and experiences on the Discussion page at http://wiki.serviio.org/doku.php?id=talk:stream_pc. I have now managed to get a very good quality with smooth video, using the Screen Capture Recorder.

jhb50 wrote:I don't know where you got the idea that a command line has to be typed in. I don't think going thru a multi-click/type gui that your guides describe is preferable to clicking on a "StreamDesktop.bat" icon that does it all.

Of course you don't type it in. I have no problems using the command line as I have been a programmer since the late 1970s. In the old days that was all we had. But nowadays most users shy away from using the command line as they are used to a graphical interface. In this case, using the GUI has several advantages: (1) it is easier to see and understand what it is you are selecting, and (2) you can more easily make different choices. It is not very likely that anybody can use the command line the way it is written in the article. As an example, my Virtual Audio Cable interface looks different. That is easy to see in the GUI, but not so easy with the command line. In addition, as mentioned in my Wiki discussion entry, the command line is not working for me, but the GUI is.

When I use the VLC command line I get the image from my webcam displayed in VLC and nothing seems to be streamed. I have not researched this any further and I am not very familiar with VLC. Perhaps somebody who has more experience with the VLC command line interface can help?
<<

jk50

Serviio lover

Posts: 57

Joined: Mon Jan 09, 2012 9:53 am

Post Fri Jan 13, 2012 10:53 am

Re: streaming desk top to tv

Linux streaming

When I try to run the code for VLC I get the following errors:

y increased to 181 ms)
[0x815aa40] main input error: ES_OUT_RESET_PCR called
[0x815aa40] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 622 ms)
[0x815aa40] main input error: ES_OUT_RESET_PCR called
[0x815aa40] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 3627 ms)
[0x815aa40] main input error: ES_OUT_RESET_PCR called
[0x815aa40] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (jitter of 6268 ms ignored)
[0x815aa40] main input error: ES_OUT_RESET_PCR called
[0x815aa40] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (jitter of 9732 ms ignored)
[0x815aa40] main input error: ES_OUT_RESET_PCR called
[0x815aa40] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (jitter of 12839 ms ignored)
[0x815aa40] main input error: ES_OUT_RESET_PCR called
[0x815aa40] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (jitter of 15973 ms ignored)
[0x815aa40] main input error: ES_OUT_RESET_PCR called
[0x815aa40] main input error: ES_OUT_SET_(GROUP_)PCR is called too late (jitter of 16225 ms ignored)
[0x815aa40] main input error: ES_OUT_RESET_PCR called

Any ideas what I am doing wrong?

You may not be doing anything wrong. Google finds a lot of people with this problem, but sadly very little in the way of answers.
Some people say adding this "--clock-jitter=0" switch to the command line solves the problem, some say it doesn't help at all. If you
add this "-vvv" switch it turns on verbose logging , that might give you a clue as to what the problem is. Does it work in spite of the
errors,or crap out compleatly ? You need a fairly fast computer to capture and encode in real time. Check your cpu usage while vlc is
running , if it's high, yours may not be up to the task.
There are some things that can be done to lighten the load.One would be to lower the framerate, downside there is jerkier playback.
Another is to lower the output resolution,downside is fuzzier picture. Another is you don't have to capture the entire screen. For example
the command line below captures only a 1280x720 of my 1920x1080 screen. If you constrain your video to that portion of the screen,
it works reasonably well and cuts my cpu usage in half.

  Code:
vlc  screen:// :screen-fps=24 :screen-width=1280 :screen-height=720 :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


On my computer ffmpeg captures and encodes with significantly lower cpu usage than vlc but I don't know how to send ffmpeg output to the network yet.
So here's some examples a bit of a kludge , pipe ffmpeg output through vlc. In the examples below change the 1920x1080 to the resolution of
your monitor or smaller if you only want a portion of your screen.


  Code:
ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 24 -s 1920x1080 -i :0.0 -r 24 -s 1280x720 -vcodec mpeg2video -bf 2  -vb 6000k -g 15 -acodec libmp3lame -ar 44100 -ac 2  -f mpegts vlc - :sout=#http{dst=:8081/desk.ts} :no-sout-rtp-sap :no-sout-standard-sap :ttl=1 :sout-keep


ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 24 -s 1920x1080 -i :0.0 -r 24 -s 1280x720 -vcodec mpeg4  -vb 6000k -acodec libmp3lame -ar 44100 -ac 2  -f mpegts - | vlc - :sout=#http{dst=:8081/desk.ts} :no-sout-rtp-sap :no-sout-standard-sap :ttl=1 :sout-keep


ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 24 -s 1920x1080 -i :0.0 -r 24 -s 1280x720 -vcodec  libx264 -crf 4  -acodec libfaac -b 192k -ar 44100 -ac 2  -f mpegts  - | vlc - :sout=#http{dst=:8081/desk.ts} :no-sout-rtp-sap :no-sout-standard-sap :ttl=1 :sout-keep


Anybody know why my samsung D opens mpeg2 streams from vlc without a problem ,but doesn't open mpeg2 streams encoded with ffmpeg ?
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Fri Jan 13, 2012 2:44 pm

Re: streaming desk top to tv

hiviking:That is easy to see in the GUI, but not so easy with the command line. In addition, as mentioned in my Wiki discussion entry, the command line is not working for me, but the GUI is.


I appreciate your response and your wiki entry. I fail to understand why you would recommend a 12 step GUI setup with complex changes for the users to go thru each time they want to stream the desktop rather than a one click on a script(bat) icon. That simply makes no sense. In addition your recommendation & choice of x264 as the codec will significantly increase the cpu load which most users have a problem with, that's why the bat uses MPEG2.

Your command line should work if you enclose your audio device name (which contains blanks) in quotes as per the wiki and the wiki bat, and once you change the bat you can run the bat with one click on a shortcut each time you want to stream without going thru all the gui steps you have documented or typing the whole command line each time.

Appreciate your entry in the wiki and how you shrunk the capture area to improve the performance. I've updated the wiki to reflect yoursand others comments including how to check the device names with the GUI and the need for quotes if the device name has spaces.
<<

hiviking

Serviio newbie

Posts: 18

Joined: Wed Jan 04, 2012 6:22 pm

Post Fri Jan 13, 2012 4:46 pm

Re: streaming desk top to tv

jhb50,

I tried enclosing the device name in quotes, of course, but nothing happens, VLC just hangs. The same thing happens with your command line, replacing the audio device name. When I enclose all the options in quotes, as shown in my Discussion comments, VLC runs. It just shows the wrong video device (which has no spaces, by the way). So, the best reason to use the GUI, is the fact that it works. I would be the first to use a batch file with the command line if I could make it work. But I also think that new users will benefit from using the GUI to understand what the command line items actually are and to make their own choices where appropriate. Once they find the best settings they can make a command file (if they can make it work). That makes a lot of sense to me. In any case, we write these entries to help each other and now we have described both methods, so that can only be seen as a positive.

I tried the MPEG2 codec, but the quality was poor. I actually get a much better quality with H264 and a reduced size of the video. My goal was to find the best quality that my CPU can handle, providing smooth video. This is another area where the user might want to make other choices, and the GUI makes it easy to experiment. I am not sure that my current choices are the optimal ones for my computer, but I am actually quite impressed with the quality I am getting.

If I solve the command line problem I will let you all know. Any ideas are welcome.
<<

Cerberus

User avatar

DLNA master

Posts: 4114

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Fri Jan 13, 2012 5:26 pm

Re: streaming desk top to tv

hiviking wrote:jhb50,

I tried enclosing the device name in quotes, of course, but nothing happens, VLC just hangs. The same thing happens with your command line, replacing the audio device name. When I enclose all the options in quotes, as shown in my Discussion comments, VLC runs. It just shows the wrong video device (which has no spaces, by the way). So, the best reason to use the GUI, is the fact that it works. I would be the first to use a batch file with the command line if I could make it work. But I also think that new users will benefit from using the GUI to understand what the command line items actually are and to make their own choices where appropriate. Once they find the best settings they can make a command file (if they can make it work). That makes a lot of sense to me. In any case, we write these entries to help each other and now we have described both methods, so that can only be seen as a positive.

I tried the MPEG2 codec, but the quality was poor. I actually get a much better quality with H264 and a reduced size of the video. My goal was to find the best quality that my CPU can handle, providing smooth video. This is another area where the user might want to make other choices, and the GUI makes it easy to experiment. I am not sure that my current choices are the optimal ones for my computer, but I am actually quite impressed with the quality I am getting.

If I solve the command line problem I will let you all know. Any ideas are welcome.


personaly im with Jhb50 you way is far to complicated, plus id rather conversations went on in the forum than have multiple version of the same thing on 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 Fri Jan 13, 2012 11:32 pm

Re: streaming desk top to tv

hiviking:

I understand your post and I'd only reassert that the purpose of the predefined working process in the wiki is to make it extremely easy (one click) for everyone to stream their desktop to Serviio on demand and to avoid the need, as you are doing and suggest others do, to learn VLC setup, and invent their own process, and then getting in trouble and then looking for support on how to make it work.

So we are at the point that there is not much we can do to help you. Your command line is so totally different from that in the wiki that it would be a disservice to suggest that the command line in the wiki bat does not work.

I will only say that others are using "Virtual Cable 1" succesfully with the wiki command and that your other parameter changes are the source of your VLC hang.

I'd also suggest that quality has nothing to do with the video codec. Both h264 and mpeg2 produce the same quality, just at different bitrates. Since bitrate is not a constraint here, using h264 at twice the cpu makes no sense when the cycles can be better used to increase your capture area and get as close to full 1280x720 resolution as possible. That's why the wiki uses MPEG-2 at 10mbps, and why we consider your recommendations to be suboptimal.

I think you will find that if you follow the wiki (which is being improved all the time) it will work fine. If it does not your feedback will help to improve a single easy to use solution that can be supported for you and everyone else.

On a personal note, I'd be interested to know how long you tolerate using the GUI each time you want to stream the desktop. My own experience in another environment was that I gave up trying to start the stream with the GUI until I could get the bat to work, and that's why I developed and recommend the bat solution here in lieu of using the GUI.
<<

hiviking

Serviio newbie

Posts: 18

Joined: Wed Jan 04, 2012 6:22 pm

Post Sat Jan 14, 2012 5:26 pm

Re: streaming desk top to tv

Hi Cerberus and jbh50,

I cannot seem to get through to you guys on the fact that the command line in the article doesn't work for me. And I believe it is very likely that it won't work for lots of other users as well. Your goal of making it easy for the users is a good one, but what if it doesn't work? Most users will not know how to modify the command line, but they can operate the GUI. Although there are many steps the first time you set it up, it is quite easy to do. My goal was to make that process even easier and to give users a way to try out various options. Once you have it working you should be able to produce a batch file from the command line options indicated in the GUI, although this does not seem to be straightforward. By combining the command line in the article with the options displayed by the GUI, I have managed to get it working now, and I have updated my Wiki discussion entry (I put it there, as zip wrote "Feel free to update the wiki with any tips").

You have a point with regard to the bitrate. At the same bitrate MPEG2 is nowhere near the quality of H264, but if you compare at a 10-fold difference in bitrate the quality difference will obviously be much smaller. I initially kept the bitrate low at 600 kbps for the H264 video, as I figured it would reduce my CPU load, and 600 kbps H264 is as good or better than 10000 kbps MPEG2! As it turns out the bitrate hasn't very much influence on the CPU load. I made a test today with the tiny video at http://www.ehf-euro.com, enlarged by 207% in Google Chrome. I ran it with 1000 kbps H264 and 10000 kbps MPEG2. The H264 provided a sharper picture, but the MPEG2 is definitely acceptable. It does take some processing, however, and my CPU load was 90-95% for the H264, but only 60-65% for the MPEG2.

The key to avoiding jerky video has been to reduce the size of the desktop area to be streamed. I rarely look at videos on the web that are as large as 1280x720, so 640x360 is a good size for me. If you do need the large size I guess the advice should be: Check out what your computer can handle. If it can handle H264 at your required frame rate, then it will give you the best quality. If your computer cannot handle it, or if you want to have some spare CPU capacity for doing something else you should use MPEG2.
<<

Cerberus

User avatar

DLNA master

Posts: 4114

Joined: Sun Jan 02, 2011 5:20 pm

Location: Reading, UK

Post Sat Jan 14, 2012 5:59 pm

Re: streaming desk top to tv

hiviking wrote:Hi Cerberus and jbh50,

I cannot seem to get through to you guys on the fact that the command line in the article doesn't work for me. And I believe it is very likely that it won't work for lots of other users as well. Your goal of making it easy for the users is a good one, but what if it doesn't work? Most users will not know how to modify the command line, but they can operate the GUI. Although there are many steps the first time you set it up, it is quite easy to do. My goal was to make that process even easier and to give users a way to try out various options. Once you have it working you should be able to produce a batch file from the command line options indicated in the GUI, although this does not seem to be straightforward. By combining the command line in the article with the options displayed by the GUI, I have managed to get it working now, and I have updated my Wiki discussion entry (I put it there, as zip wrote "Feel free to update the wiki with any tips").


yes TIPS not try and rewrite the whole wiki that one of our VIP member took along time making and testing with our beta test team, and starting your post liek that will simple get your post on wiki removed and no support will be given to you as you clearly have no manner, so either keep your post polite or find some were else.
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
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sat Jan 14, 2012 6:11 pm

Re: streaming desk top to tv

Cerberus wrote:yes TIPS not try and rewrite the whole wiki that one of our VIP member took along time making and testing with our beta test team, and starting your post liek that will simple get your post on wiki removed and no support will be given to you as you clearly have no manner, so either keep your post polite or find some were else.

Give this guy a break. I encourage all users to share their knowledge and don't want to hear any of this 'VIP' member talk! hiviking is being polite and raising valid concerns. I don't want any posts from the wiki removed unless it's agreed with me prior to that.
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sat Jan 14, 2012 6:39 pm

Re: streaming desk top to tv

Well, I've spent enough time on this, and he can obviously hack whatever solution he wants, even though most of his choices are flawed, and the process much too complex for practical use.

His continuing assertion however that "the command line in the article doesn't work", when he has hacked it to death and made no effort to follow the wiki, and ignored the advice offered to use the simple solution, does a disservice to others who would like to stream their desktop and will be put off by his posts.

I can only say again to those users, that the wiki process as documented works fine, is being supported, and a provides a simple easy to use one-click streaming icon.
<<

jk50

Serviio lover

Posts: 57

Joined: Mon Jan 09, 2012 9:53 am

Post Sat Jan 14, 2012 7:58 pm

Re: streaming desk top to tv

Can serviio open udp streams?
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sat Jan 14, 2012 8:11 pm

Re: streaming desk top to tv

I don't understand your question in the context of this thread. VLC can create a UDP (legacy) stream but why would you want to when http works fine for streaming your desktop? Perhaps your post belongs in a different thread. You can test serviio support for any url with ffmpeg -i url If it reports the enclosed streams then Serviio will play it.
<<

jk50

Serviio lover

Posts: 57

Joined: Mon Jan 09, 2012 9:53 am

Post Sat Jan 14, 2012 8:24 pm

Re: streaming desk top to tv

ffmpeg captures with lower cpu usage on my computer and can output directly to udp. Now i'm sending ffmpeg output through a pipe to vlc to get on the network.
If serviio can open udp I can do away with piping through vlc.ffmpeg can open and identify the udp stream .Serviio log is saying unsupported protocol,but I don't know if
I'm setting it up right.
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sat Jan 14, 2012 9:34 pm

Re: streaming desk top to tv

I can't help you with udp because I can't get vlc to output udp so i can test it .
AFAIC you would just add the udp:nnn.nnn.nnn:port to the serviio console save it and check the log.

Looks like you did that so zip will need to respond.
<<

mchristian

Streaming enthusiast

Posts: 23

Joined: Fri Nov 12, 2010 5:46 pm

Post Sat Jan 14, 2012 11:28 pm

Re: streaming desk top to tv

For what it is worth I really want to take advantage of this feature. The command line posted in this thread does not work for me. I saw that early on and discovered the GUI of VLC on my own. I still have not gotten it to work. Im not sure if it is me or my computer. I hope that as many different ideas as possible are presented so hopefully I will see another tactic that I can try. I have used Serviio since before 5.0 and have always been very pleased with its performance. This is the first time I have actually been stumped.

I am strickly Ubuntu on my home computer and left thinking I may need to format it and start from scratch but would rather not.

Thanks Zip for your efforts and all the others for their passion. But so far neither method is working for me and I am sure my setup is not that unique. I am sure there are others out there like me.

By the way is a screen capture recorder needed when using this for linux? I think that may be my problem.
Sony S570 BDP
Ubuntu 10.10
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sun Jan 15, 2012 1:54 am

Re: streaming desk top to tv

I can't help with the linux wiki process as I only know and support the windows wiki process, but you have not provided enough information for anyone to help you make the linux process work. If you provide some details about what you used and what did not work then I'm sure whoever did the linux method can try and help you. I guess that's pretty obvious...
<<

mchristian

Streaming enthusiast

Posts: 23

Joined: Fri Nov 12, 2010 5:46 pm

Post Sun Jan 15, 2012 2:13 am

Re: streaming desk top to tv

jhb50 wrote:I can't help with the linux wiki process as I only know and support the windows wiki process, but you have not provided enough information for anyone to help you make the linux process work. If you provide some details about what you used and what did not work then I'm sure whoever did the linux method can try and help you. I guess that's pretty obvious...



Thanks
Sony S570 BDP
Ubuntu 10.10
<<

jk50

Serviio lover

Posts: 57

Joined: Mon Jan 09, 2012 9:53 am

Post Sun Jan 15, 2012 3:49 am

Re: streaming desk top to tv

For what it is worth I really want to take advantage of this feature. The command line posted in this thread does not work for me. I saw that early on and discovered the GUI of VLC on my own. I still have not gotten it to work. Im not sure if it is me or my computer. I hope that as many different ideas as possible are presented so hopefully I will see another tactic that I can try. I have used Serviio since before 5.0 and have always been very pleased with its performance. This is the first time I have actually been stumped.

I am strickly Ubuntu on my home computer and left thinking I may need to format it and start from scratch but would rather not.

Thanks Zip for your efforts and all the others for their passion. But so far neither method is working for me and I am sure my setup is not that unique. I am sure there are others out there like me.

By the way is a screen capture recorder needed when using this for linux? I think that may be my problem.



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
PreviousNext

Return to General discussion

Who is online

Users browsing this forum: No registered users and 3 guests

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