• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

VLC Stream & Convert

I'm trying to get video streaming to work over wifi. I have VLC 1.1.0 installed and the Web interface enabled in View as well as a specific port selected in Tools>Preferences>All>Main interfaces>HTTP by entering a specific host address and port, rather than using the 8080 port.

I have conflicting results. Earlier, I could get VLC S&C to connect to the server at the specific address and port and browse files but video would not stream over RTSP. Now, VLC S&C reports that "Cannot connect to [address:port]" although nothing has changed.

Any help would be appreciated. An explanation of how the RTSP port is used would be great, too. Does VLC have options that need to be set for RTSP?

Update: I reverted to using the default HTTP interface port in VLC of 8080 and set the phone app to do the same and I can connect and browse files again using RTSP mode. However, as soon as I select a file, VLC crashes. If I use HTTP mode, the audio stream of the video file plays as expected.

Update #2: Ok, through much trial and error I think I have finally worked through how this is supposed to work. If I try to play a file that is not a compatible format for the phone app, it crashes VLC. If I use the Convert on Computer mode, VLC dumps a MP4 version of whatever file I have loaded through the phone app's browse function into the containing folder of the original file. I can then stream this converted MP4 to the phone using RTSP mode.

That's great and all, except VLC left out the audio when it remuxed my MKV to MP4. Now I'm back to square one, which is searching for an app that either transcodes videos on the fly and streams a format that is compatible with the phone, or can play the videos I have from a LAN share. Everything I've seen so far is at least a step away: VLC S&C requires fully converting first before streaming (and isn't successful); Allshare accesses LAN DLNA servers but only uses the phone's built-in player to open videos, which cannot play them; Estrong's File Explorer accesses LAN shares and can play videos using its built-in player but does not have the option to use a different player if the video is on a LAN share and is incompatible with the built-in player (and one would need a working VPN solution to access the LAN to see the shares from 3G/4G); PS3 Media Server transcodes and streams almost anything on the fly from a LAN share as a DLNA server but is currently only accessible by a PS3.

The final option is to reconvert all of my videos to compatible formats but I don't want to waste space by keeping duplicate files and I'm unwilling to lose valuable subtitle and alternate audio track information by deleting incompatible versions of videos.

Thanks anyways, Traveldevel.
 
Does anybody know how to keep the user in a certain directory? In other words, I'd like to set the document root, so I can't click ".." and browse my whole server. It just seems like a security risk. Another option would be requiring a password, does Stream & Convert support this?
 
i have been reading everyone's reply trying to figure out what i am doing wrong and for some reason I cant seem to get the stream to work over 3g. I have it working over my wifi network. I assume that I configured everything to the specifications of the instructions but it still says "cannot connect". Can anyone give me an explanation in layman's term? I would be grateful for any information to lead me in the right direction. Thanks!
 
osc416,

Have you followed traveldevel's tests tutorial and the howto 3G webpage? Where does your setup fail on the tests tutorial?

It may depend on your phone. My phone (Evo), for example, needs to have the wireless On, even if I'm streaming over 3G. So, to test this at home I have to force my phone to forget my home wireless network.

Also, I've noted that S&C is slow to realize changes in connection settings. Be sure you hit Menu (then "More") then "Stop and Exit". After you change your connection settings. (You may have to do this twice.)

I edited this post because I see that traveldevel posted a how-to on VPNs. This sounds like the most reliable (and secure) way to finalize a setup.
 
Does anybody know how to keep the user in a certain directory? In other words, I'd like to set the document root, so I can't click ".." and browse my whole server. It just seems like a security risk. Another option would be requiring a password, does Stream & Convert support this?

I addressed this in a thread at the VLC support forum. Link here.
 
i believe vlc streams to a pre-setup ip address from the server... so you would have to have the same ip address for your phone or at least maybe the same range of ip address for the server know where to send the stream. so, when you are out of your own house/wi-fi your ip is drastically different, havent looked into dyndns.com to see if there is a client for your phone(where your ip address stays the same actually looks the same where ever you are in the world . but now you got me thinking and im heading over there now to see about that.
 
Has anybody had success with VPN serving on Linux?
I followed these steps but stopped at the optional part (which shares the Internet connection).

I can connect from my phone, click Scan in VLC S&C, find the server, browse the media, but can not play. It (S&C) eventually disconnects and continually says "Cannot connect to 192.168.0.1" It will not re-connect until I disconnect the VPN, connect to a separate VLC server, then re-start the VPN connection.
 
anyone have issues where the audio plays but there's no video? i'm using Stream to phone (rtsp) method. tried all kinds of video files but each time the audio plays but no video. i'm on vlc 1.1.5.
 
hi,

i use the vlc-stream pro version and have one question. there is no file visible on my browse tab. i see only the home dirs on my linux machine. if i switch into my home folder, there is absolutely nothing - only black, no sub folders, no files and so on.

what is wrong? i can connect to my vlc server from phone side with the standard browser to see the web interface. i can remote the running video too with my phone.
playing around with some settings, but i have no idea what's wrong.

anybody know this problem?

edit: i forgot, i saw the content of my home folder after the first installation, but only one time.
 
hi,

i use the vlc-stream pro version and have one question. there is no file visible on my browse tab. i see only the home dirs on my linux machine. if i switch into my home folder, there is absolutely nothing - only black, no sub folders, no files and so on.

what is wrong? i can connect to my vlc server from phone side with the standard browser to see the web interface. i can remote the running video too with my phone.
playing around with some settings, but i have no idea what's wrong.

anybody know this problem?

edit: i forgot, i saw the content of my home folder after the first installation, but only one time.

You may have tried this, but there's an option in S&C to only show media files, have you tried disabling this?

Also, are you running the server as the same user whose home directory you're browsing? It may be a permissions issue.
 
I too am getting the set of errors:

main stream out error: socket bind error (no error)
main stream out error: cannot create socket(s) for HTTP host
steam_out_rtp stream out error: cannot export SDP as RTSP

I've tried VLC 1.1.12, 1.1.13 and not 1.1.15. This is a fresh installation of Windows 7 64 bit Ultimate. I only use VLC for streaming to my phone. Also, before my fresh install of windows, VLC actually stopped working, giving the same errors. It did work at one point. I have no idea what may have changed. I am attempting to do the streaming from my LAN. I can stream audio over http, and the sound from video files over http, but nothing over rtsp.

Any advice would be much appreciated.
 
You may have tried this, but there's an option in S&C to only show media files, have you tried disabling this?

Also, are you running the server as the same user whose home directory you're browsing? It may be a permissions issue.


thanks for answer,

can you tell me where i can find the option 'show only media files'? i'm blind i guess.

yep, i'm sure. my server is running under my user login and i can browse all folders in my home dir with another android app called 'androstream'. i have no problem too, to stream all media files (and playlists and tv via dvb-t!) to my netbook (runs fine under ubuntu).
restricted permissions are not my problem i hope?

it works in all cases from above except vlc-stream & convert :confused:

i'm running froyo (non rooted) on a htc legend
vlc version 1.1.5 (linux)
vlc s&c pro 1.4.0 (from android market)
 
I'm wondering if perhaps I have VLC configured improperly. Would anyone be willing to share their known working solution? I've followed the guide for setting up VLC, and those changes are the only changes I've made, but I'm wondering/hoping that maybe it's as simple as something I have misconfigured in the settings.
 
1+

why it's so hard to configure for properly function?

1. start vlc on your computer and switching on the web interface on port 8080
2. make sure, the expected ports are open and reachable (8080, 5554...)
3. start vlc s&c on the android phone and connect with the vlc server running on pc
4. browse media files with vlc s&c on the computer
5. select a movie and enjoy

sounds easy? yes, but it isn't!

i need a more detailed instruction to get it to work. problem number 1 is,
i cannot browse any folders/files with vlc s&c. all folders are empty, seems
they contains nothing. i try it with many variations of vlc command lines from
the web without success. i have already checked with other apps. vlc s&c
is the only one that doesn't show the contents of my folders.
second problem is, sometimes if i stream a movie directly from my computer,
i got the message 'buffering' 5 or 6 times. i'm happy, but few seconds later
the message 'to many errors' appears, or i get the movie without sound (only
native mp4).

maybe, vlc s&c is not the right application for me. what i need is a simple solution:

1. browse my media folder on the pc via vlc s&c (contains different types *.mpg, *.avi...)
2. select one of them and stream it to my phone (converted in mp4)

is anybody here to share the knowledge how to make it?

running froyo (non rooted) on a htc legend
vlc version 1.1.5 (linux)
vlc s&c pro 1.4.0 (from android market)
 
i cannot browse any folders/files with vlc s&c. all folders are empty, seems
they contains nothing.

What OS is your server computer running? Run VLC from command line using the following command:

cvlc -I http --verbose 2

(You can put vlc instead of cvlc if you like.) This will let you view vlc's debug output. Now, browse on your phone. Does it give helpful error messages as your phone interacts with the server? (If there is too much output use 1 or 0 instead of 2, or just remove the "--verbose X" part and see what it outputs.)
 
Is there a trick to getting it working on 3G that I am missing?

Streaming works fine at home over Wifi.

I have added port forwarding of , 554,5554,8080,8081 to the machine with VLC installed(4 separate entries).

VLC is open and web interface is added(running).

.hosts file has been edited to allow everything right now, I want to get it working before worrying about security.

I am away from my wifi network , but have wifi active

I go to android phone(EVO), run VLC S&C, go to connect, put in my comcast address(checked it a few minutes ago). put in 554 for the port and it just sits there. browse tab is available but nothing shows underneath. Not even sure if I am connected.

If I put in port 5554, 8080 or 8081 I get an immediate "cannot connect to x.x.x.x:8080", but when 554 is the port ...no error, but nothing in the browse tab either.

I am RDPing fine to the same machine through the phone.



_____________________________________________________________
I get lost in a lot of these posts that go back and forth with unexplained details. I know this is my lack of knowledge. But its why I am asking the question the way I am. Sorry if it seems cryptic.(newbish)
 
Just in case it helps anyone, I'll log everything I did to get everything setup the way I like it.

My setup consists of the following:
PC = Windows 7 64-bit
VLC version = 1.1.7 (standalone)
Router = Linksys WRT320N running the DD-WRT v24-sp2 firmware
Phone = Galaxy S Captivate

I simply run "vlc.exe --extraintf=http", and while my phone is connected to the Wifi I am able to stream via rtsp to my phone perfectly.

The fun part was setting up so I could stream over 3G...

First I tried using the PPTP VPN, but it kept dropping connection. Considering how my average 3G speed is only around 120 kbps, the VPN overhead might be too much (especially trying to encrypt/decrypt packets for a live video stream).

What I've done instead is I enabled port forwarding on my router for ports 8080 and 5554. This made it so I could stream just fine over 3G, only problem is that it's not secure! Fortunately with the DD-WRT firmware on my router this could be fixed through the use of customized iptables. I ssh'd into my router and ran the following commands to create the port forwards that would ONLY work when the source ip address was that of my phone:
iptables -t nat -I PREROUTING -p 0 -s {{MY PHONE IP}} -d $(nvram get wan_ipaddr) -j DNAT --to 192.168.1.105
iptables -I FORWARD -p 0 -s {{MY PHONE IP}} -d 192.168.1.105 -j logaccept
(obviously "{{MY PHONE IP}}" was the ip address from my phone, 192.168.1.105 = my pc)
This makes it so that all the requests (udp & tcp) that come from my phone get forwarded to my pc.

At first I tried specifying the ports 8080 and 5554, but then saw that the UPD requests on other random ports were getting dropped (I guess custom routes don't work for auto accepting relatives). I could have alternatively fixed this problem by only allowing the udp packets to be on random ports via the following:
iptables -t nat -I PREROUTING -p tcp -s {{MY PHONE IP}} -d $(nvram get wan_ipaddr) --dport 8080 -j DNAT --to 192.168.1.105:8080
iptables -t nat -I PREROUTING -p tcp -s {{MY PHONE IP}} -d $(nvram get wan_ipaddr) --dport 5554 -j DNAT --to 192.168.1.105:5554
iptables -t nat -I PREROUTING -p udp -s {{MY PHONE IP}} -d $(nvram get wan_ipaddr) -j DNAT --to 192.168.1.105
iptables -I FORWARD -p tcp -s {{MY PHONE IP}} -d 192.168.1.105 --dport 8080 -j logaccept
iptables -I FORWARD -p tcp -s {{MY PHONE IP}} -d 192.168.1.105 --dport 5554 -j logaccept
iptables -I FORWARD -p udp -s {{MY PHONE IP}} -d 192.168.1.105 -j logaccept
... but 2 lines for setting the routes instead of 6 worked for me.


However, I quickly discovered that AT&T is nice enough to change my ip address every time I switch from WiFi to 3G (or just at random times while I am still connected to 3G)... I also quickly discovered that whatsmyip.org tells me that I have a different ip address than the ip address that my router sees when I try connecting to it... makes you wonder what's really happening to your internet traffic? Anyway, I managed to fix that too by creating a small script on my router:
myip=$(netstat -n | grep :22 | grep ESTABLISHED | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}[^:22]' | tail -1)
iptables -t nat -I PREROUTING -p 0 -s $myip -d $(nvram get wan_ipaddr) -j DNAT --to 192.168.1.105
iptables -I FORWARD -p 0 -s $myip -d 192.168.1.105 -j logaccept
I saved that as vlc-setup.sh, then using the ConnectBot app on my phone, I ssh into my router (using rsa-2 private key authentication) and run the script (actually I set it as a new connection, that after authenticating it executes that script and exits). The script basically just finds my phones ip address from the last connection to my ssh port, then adds the routing entries to my iptables to allow my ip address.


I hope that all makes sense to anyone else trying to do the same thing as I was :) ... Now I just wish that the VLC S&C app could save multiple connections with individual streaming settings.
 
Ok guys so this is my first post and looking for a little help. So I set up the VLC S&A and it seemed to do fine. It is on port 8080 and found my IP no problem. I go into it and can find my movies etc no problem. But when I select them it says "Cannot create play command". I am running VLC 1.1.7, should I downgrade to one I saw you guys say was working or should it do fine on this one?
Thanks in advance for any help!
P.S. I'm on a Mytouch 4G
 
I am getting the "Buffering Failed" error whenever I try to stream over 3g (this goes for audio tracks as well as movie clips). I use a Samsung Galaxy S, and I am able to stream to my device using 3G-settings (connecting to my router's global IP, and then through forwarded ports accessing my comp and VLC), but only for as long as I am connected to that routers WiFi (haven't tried connecting through another wifi, since I only have my phones IP set as allowed to access, and connecting through another wifi will show me as having another IP than that). I use port 7070 (couldn't get 554 to work) and am using the free version, tough I will most definately purchase the pro version once I get 3g-streaming to work.
 
Here's a fail story from my side. I'm running VLC 1.0.6 under Linux, streaming DVB-S into LAN. HTTP page is accessible, showing the playlist of the saved tv stations between which i can zap. Clicking on a link to rtsp://mylocal.ip:5554/stream.sdp is opening the HTC StreamingMediaPlayer presenting me perfect and stable audio&video TV.

To simplify the intercation I tried VLC S&C but without any luck, even with a working configuration (as above). VLC S&C connects to my vlc server, showing me the title of the currently played programm, but failes to show audio & video, with one of two alternating error messages "Buffering..." & "Cannot play: Too many errors"

Any hint?
 
Is there a trick to getting it working on 3G that I am missing?

Streaming works fine at home over Wifi.

I have added port forwarding of , 554,5554,8080,8081 to the machine with VLC installed(4 separate entries).

VLC is open and web interface is added(running).

.hosts file has been edited to allow everything right now, I want to get it working before worrying about security.

I am away from my wifi network , but have wifi active

I go to android phone(EVO), run VLC S&C, go to connect, put in my comcast address(checked it a few minutes ago). put in 554 for the port and it just sits there. browse tab is available but nothing shows underneath. Not even sure if I am connected.

If I put in port 5554, 8080 or 8081 I get an immediate "cannot connect to x.x.x.x:8080", but when 554 is the port ...no error, but nothing in the browse tab either.

I am RDPing fine to the same machine through the phone.



_____________________________________________________________
I get lost in a lot of these posts that go back and forth with unexplained details. I know this is my lack of knowledge. But its why I am asking the question the way I am. Sorry if it seems cryptic.(newbish)


It works fine if I disable wifi. FYI
 
Works great for me over WIFI picture and sound is really good. Not tried 3G.
Would be great if it could utilise the whole of the screen on the Desire HD.
Many thanks to the dev'.:cool:
 
Back
Top Bottom