Page 1 of 1

VLC streaming at startup

Posted: 07 Jul 2011 19:05
by vodas89
Hi there ..
Im trying to start vlc streaming at startup.
I have vlc server with ubuntu 11.04 and vlc 1.1.9.

I wrote script with line:
sudo -u no_superuser vlc --vlm-conf vlm_config --intf telnet -vvv --file-logging --logfile vlc-log --file-caching 5000 --daemon

and put this script in init.d (and rc2.d).

After startup vlc start and give some errors like this:

main error: Host 224.1.1.1 port 11111 is unreachable
access_output_udp error: failed to create raw UDP socket
main debug: no sout access module matching "udp" could be loaded


Do you know how to fix this? Or is there another way how to do it ? I really appreciate whatever answer.

Re: VLC streaming at startup

Posted: 07 Jul 2011 19:45
by Rémi Denis-Courmont
This is a routing error. Not much to do with VLC. Make sure you have a valid route to 224.1.1.1 and no host firewall.

Re: VLC streaming at startup

Posted: 07 Jul 2011 19:50
by vodas89
Im absolutely sure this is no network issue ... when i log in and execute that script everything is just fine. Im sure i have valid route and no firewalls at all.

Re: VLC streaming at startup

Posted: 07 Jul 2011 22:17
by Rémi Denis-Courmont
If you don't like my explanation, you're welcome to invent your own as to why VLC gets a Network unreachable error.

Re: VLC streaming at startup

Posted: 08 Jul 2011 00:24
by vodas89
Is there any possibility of network module missing? I mean availability of system resources in that state of execution. Or permission problem? I would like to start vlc AT startup.

After logging to the system I can run vlc correctly. So physical network, hosts and all network parts work correctly.
Have you ever try running vlc at startup or you are only guessing the reason of problem?

Btw I did not want to by rude, impolite or vulgar ... just in case you think so

Thank you for your answer

Re: VLC streaming at startup

Posted: 09 Jul 2011 14:46
by vodas89
Problem was that eth0 interface did not have an ip address in moment when vlc was started ... here's script i put into rc.local (or rc2.d -> multiuser runlevel)

logfile = /home/user/streamer/log_file
function loop {
ipaddr=$(ifconfig | awk '/inet addr:/{if($2 !~ /127.0.0.1/) print $2}' | awk -F':' '{print $2}')
if echo $ipaddr | grep -E '([0-9]+\.){3}[0-9]+'
then
echo GOT IP ADDRESS >> $logfile
echo starting vlc >> $logfile
sudo -u qup vlc --vlm-conf /home/user/vlm_export --intf telnet -vvv --file-logging --logfile /home/user/vlc_log --file-caching 5000 --daemon
else
echo GOT NO IP ADDRESS >> $logfile
sleep 5
loop
fi
}

loop