Skip to main content
17 events
when toggle format what by license comment
Oct 21, 2019 at 22:34 comment added llionevans Having come back to this, it actually seems to work without having made any real changes since I looked at it a few weeks ago (see solution). I must have done something dumb when testing before. Thanks for the help.
Oct 21, 2019 at 22:32 vote accept llionevans
Oct 21, 2019 at 22:32 answer added llionevans timeline score: 0
Oct 9, 2019 at 10:28 comment added llionevans Thanks, I'm away at the moment. I'll try this when I can next week and get back to you.
Oct 8, 2019 at 19:50 comment added Fred The output doesn't ever say "/home/pi/snapshot.png found" so it looks like the test for if the file exists isn't working properly. If you comment out the if/else when you know the stream works, does at least the VLC bit work OK? I have no idea why the [ -e "$file" ] doesn't work, but I'd try replacing it with ls /home/pi | grep snapshot > /dev/null and then if [[ $? -eq 0 ]] instead to check the return code from grep, which should only be 1 if the file is found.
Oct 7, 2019 at 23:04 comment added llionevans Yes, if I manually run ./vlc_autorun.sh from the terminal I get the desired behaviour.
Oct 7, 2019 at 22:12 comment added llionevans Sorry, in that last paste is seems that the camera server went down (probably due to all of the connecting/disconnecting). Try this pastebin.com/pkKYWSb9
Oct 7, 2019 at 21:59 comment added Fred In that output ffmpeg is never connecting to a network stream: "Network is unreachable". It looks like it's not auto-connecting to your network? Is your WiFi/Ethernet correctly configured? Can you verify running your script once logged in works OK?
Oct 7, 2019 at 21:42 comment added llionevans Thanks for the continued support. Sorry, I should have said that I'd already tried that. But the script didn't get very far. Output of rc.local > pastebin.com/i8CzxC5w
Oct 7, 2019 at 21:38 comment added Fred raspberrypi.org/forums/viewtopic.php?t=159544 suggests starting the script in a screen session to catch any output. pi.bek.no/internetRadio suggests that VLC will refuse to run as root, and currently your rc.local script does run as root. Try changing /home/pi/./vlc_autorun.sh to sudo -u pi bash /home/pi/./vlc_autorun.sh.
Oct 7, 2019 at 21:32 comment added llionevans Ok, I've updated the question above with the most up to date script and a copy of /etc/rc.local. I had noticed that when I was doing the screengrab it had a relative path and the check to see if screengrab had worked was absolute. But even with this fixed it still doesn't work. I can see that snapshot.png is being created and removed over and over, so the script is running.
Oct 7, 2019 at 21:30 history edited llionevans CC BY-SA 4.0
added 870 characters in body
Oct 7, 2019 at 20:02 comment added Fred Try adding export DISPLAY=:0 to the start of the script. Try launching the script from /etc/rc.local with the command sudo -u pi bash myscript.sh.
Oct 7, 2019 at 16:39 comment added llionevans I tried a few ways: adding to init.d, editing /home/pi/.bashrc and editing /etc/rc.local (no guarantee that I did these correctly).
Oct 6, 2019 at 8:27 comment added Fred How are you running this on startup?
Oct 6, 2019 at 0:45 review First posts
Oct 6, 2019 at 8:27
Oct 6, 2019 at 0:42 history asked llionevans CC BY-SA 4.0