[Linux]Using VLC to stream "desktop" to other machines
#1
Hi, I'm kind of new to all this - I have tried to use x11vnc to stream to my iphone and / or other devices in the house with little success - very very slow and choppy frame rates - 5 fps perhaps? Definitely no sound.

Anyway, running intel core 2 duo, nvidia 9800, xbmcbuntu frodo 2.2.

I decided to install VLC

ctrl + alt + F1

Code:
export DISPLAY=:0
set the capture screen to the main screen

then fix broken h264 encoder

Code:
sudo wget http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list --output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get -q update && sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring && sudo apt-get -q update

sudo apt-get install ffmpeg libavcodec-extra-53

command line running of VLC with screencast
Code:
cvlc screen:// :screen-fps=30 :screen-caching=100 --sout '#transcode{vcodec=h264,vb=2000,acodec=mpga,ab=192,scale=1,width=480,height=320}:rtp{dst=192.168.1.2,port=1234,access=udp,mux=ts}'

I then opened the stream in vlc on my mac to test - open network --> udp ---> port 1234

However no matter what I do, i get a green artifacted horribly unwatchable image.

Any ideas?
Reply
#2
Aha! I believe that the problem is a hardware problem. I have a wireless n router and my computer only has a 54mbps pci wireless card. I think this is a bandwidth issue.
Reply
#3
It makes no sense to designate both scale and height/width. Delete width and height, set scale to 0.1 and if that works increase it to find your limit. May want to also try vb=0, acodec=mp3, ab=128, channels=2

If your source is HD, your processor might be choking on the transcode. Check and see if it is maxing out.

If you are trying to stream a video file, best to transcode it directly rather than as a screen capture.
Reply
#4
Don't bother trying to play video over vnc. Instead install xbmc on the client machine.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#5
(2013-07-04, 08:24)nickr Wrote: Don't bother trying to play video over vnc. Instead install xbmc on the client machine.

I'm not. I'm using VLC.
Reply
#6
Sorry I have re-read.

Why are you trying to broadcast your desktop?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#7
(2013-07-05, 08:30)nickr Wrote: Sorry I have re-read.

Why are you trying to broadcast your desktop?

I have my main HTPC in the living room. I also have a bunch of rasberry pis connected to lcd screens i ripped out of monitors which i have hanging around the house which I want to broadcast to and still use my iphone as a remote if I'n on the toilet, in the kitchen, etc... lol
Reply
#8
(2013-07-04, 05:17)whitebelly Wrote: It makes no sense to designate both scale and height/width. Delete width and height, set scale to 0.1 and if that works increase it to find your limit. May want to also try vb=0, acodec=mp3, ab=128, channels=2

If your source is HD, your processor might be choking on the transcode. Check and see if it is maxing out.

If you are trying to stream a video file, best to transcode it directly rather than as a screen capture.

Trying to screencast so that I can still use my iphone remote. If I move CB to to 0 that'd encode the video at 0 bit rate... sure that that is wise?
Reply
#9
This makes no sense. The iphone remote doesn't rely on VLC or screencasting.

If you are trying to make xbmc work on your iphone, simply install it on your iphone.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#10
(2013-07-05, 10:31)nickr Wrote: This makes no sense. The iphone remote doesn't rely on VLC or screencasting.

If you are trying to make xbmc work on your iphone, simply install it on your iphone.

Dude, stop being dense. How can you use a remote control if you cannot see the screen?

Lets break this down for you -

1 computer with xbmc
1 remote control over wifi
6 screens in the house

If 1 xbmc streams to 6 screens and I am not in the room with the computer but in a room with one of the screens it broadcasts to....

Get it yet?
Reply
#11
Not really but if you want to be offensive you probably won't be welcome here much longer.

But back to the topic, what do you mean "broadcasting" to the Rpis? Are you trying to have all of them play the same thing on each screen, all synchronised? If so, you'll have problems I suspect. It is not an easy task.

Also if you want to use a remote that doesn't require you to see the screen you are controlling, take a look at yatse.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#12
No, that's not the issue. Sorry for being rude - I'm just very very tired.

The raspberry pi's can open the stream - that's not the problem - also the stream shouldn't be affected by numerous clients.

The XBMC computer is acting as a server - the raspberry pi's as monitors (clients) - displaying whatever the server is running. With my iphone I can control the GUI and play videos etc...

The idea is to be able to have people over - stream music videos to all screens.

Essentially I'm trying to recreate airplay mirroring but using VLC.
Reply
#13
OK I see now, your VLC is going to all machines and you want to include the iphone.

Maybe because your phone is wireless the bandwidth is insufficient?

May have put you wrong on yatse, it seems to be for android with no IOS version.

EDIT: I see you mentioned bandwidth right at the start of the thread. Now perhaps I AM being dense.

Are the rpis wireless or wired?

Are them some tricks to getting iphone encoding exactly right? Without being disparaging, iphones are a pretty closed system and probably quite fussy on encoding details.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#14
The iphone at this point is irrelevant. Even opening the stream with VLC on my mac, the stream is unwatchable, green with artifacts.
Reply
#15
(2013-07-05, 09:24)relaxis Wrote: Trying to screencast so that I can still use my iphone remote. If I move CB to to 0 that'd encode the video at 0 bit rate... sure that that is wise?

I have been successful trans coding and streaming with VLC to small device.. just trying to help. Not trying to be wise. vb=o is a default setting. its probably better to control bandwidth via scaling for your case. Green with artifacts is a result of a bandwidth issue. Probably your wireless connection is the limiting case.


BTW, you my want to try http live streaming.

--sout "#transcode{vcodec=h264,scale=0.1,vb=0,acodec=mp3,ab=128,channels=2,samplerate=22050}Confusedtandard{access=http,mux=ts,ttl=15,dst=:1234/}"

The open using http://<ip>:<port>
Reply

Logout Mark Read Team Forum Stats Members Help
[Linux]Using VLC to stream "desktop" to other machines0