I actually posted this in the videolan.org forum, but since it's possible my problem may be caused by something system-related as opposed to VLC-related, I figured I'd post it here too to get a different opinion/perspective. I apologize if "cross posting" this is considered bad form or doesn't belong in this specific forum. I'll be happy to delete/move it if necessary.
I'm trying to run vlc's http interface on my server to stream music and movies on my local network. I have two instances of vlc loading- one for video, one for music. To help differentiate between them, I've copied the files from /usr/local/share/vlc/http into two separate directories (say, /var/www/vlcstream1 & /var/www/vlcstream2) and have made minor changes to the stylesheet definitions.
I have created a user on my server, called 'media', which is a user account that I want to run the vlc media servers under, which has access to specific directories containing media to stream, since vlc cannot (and I don't really want to) run as root. User 'media' belongs to group 'media', which is the group (with r-x privileges) for the /var/www/stream1 and /var/www/stream2 directories mentioned above.
I am trying to get these vlc servers to start when the system boots. I'm doing this by executing the vlc commands I need, using sudo for my 'media' user, from within a script written by myself called rc.media, and is called by rc.local. This all works.
The problem is that when I execute the sudo vlc command:
Code:
sudo -s -b -u media /usr/local/bin/cvlc -vvv --color --sout "#transcode{acodec=vorb,ab=192}:std{access=shout,mux=ogg,dst=source:mypass@192.168.0.100:1499/stream1.ogg}" -I http --http-src "/var/www/stream1" --http-continuous --http-host 192.168.0.100:14990 &> /var/log/streams/vlc-14990-stream1.log
...as root, manually (not by running rc.mediad) from within a terminal, it works fine!
But when I run rc.mediad, I'm encountering this error in the logs:
Code:
[0x8a056e8] http interface error: cannot find any file in directory "/var/www/stream1"
I have no idea why. Obviously there is something different between running vlc in a terminal versus running it from a script, but can't figure out what it is.
I've even examined some of the code in vlc/modules/control/http/util.c and vlc/modules/control/http/http.c to try and pinpoint where things are failing, but I've only been able to go so far as I don't do a lot with C and debugging. What I
have found that in function ParseDirectory, a call to utf8_opendir is causing it to return value VLC_EGENERIC (or int value -666), which makes me suspect some kind of UTF8 filesystem problem (?), but I'm not sure exactly how to proceed.
I have done the usual checks: permissions on the /var/www/stream1 & /var/www/stream2 directories, ensured they each have a .hosts file (with proper permissions & configuration), and nothing makes a difference. When I remove the --http-src argument in the command (forcing it to use the files in /usr/local/share/vlc/http/), it works fine... from the rc.mediad script.
So I suspect either I'm missing something extremely obvious that I'm oblivious to, or dare I say I may have found a 'bug' with vlc itself (unless this is somehow intentional)??
I'm using vlc 1.0.3, compiled from source on the same system I'm trying to run it on.
Does anyone have any ideas? Perhaps someone know something I don't?
Any help would be greatly appreciated.
- skubik