I'm trying to run VLC headless from a cron job. The idea is to grab single images from a RTSP stream every two minutes and (later, and in another script) ftp them to a distant machine. The command line I use is (added linebreaks for clarity):
vlc -I dummy rtsp://somesourceaddress/ --rate=1 --vout=dummy --video-filter=scene --start-time=0 --stop-time=1 --scene-format=png --scene-prefix=img1 --scene-path=/tmp/ --scene-replace vlc://quit
However, while this works beautifully from a terminal window inside an X session, running this from cron results in the following error message:
[0x81d1154] inhibit interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 [0x81d1154] main interface error: no suitable interface module [0x81d15fc] main interface error: no suitable interface module [0x80503fc] main libvlc error: interface "globalhotkeys,none" initialization failed [0x81d15fc] dummy interface: using the dummy interface module...
So, where can I obtain suitable values for $DISPLAY if there is none? Or how can I create the DBUS connection manually?