Ffmpeg problems

First issue- I was working through the documentation on the IP Camera (RLC-420 camera) binding and ran into a problem installing ffmpeg on my Rpi3 running OH 2.4. After the command

sudo apt update && sudo apt install ffmpeg

I get

Package ffmpeg is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

E: Package ‘ffmpeg’ has no installation candidate

So after going to the ffmpeg website (very confusing on what to download) I found another website and managed to install ffmpeg in usr/bin/FFmpeg.

Next with the Thing File for one camera:

Thing ipcamera:HTTPONLY:Basement “Camera1” @ “Basement”
PASSWORD= “xxxxxxxx”,

And with this Rule file (Note: Basement motion is from a separate Z-wave “eyeball” and I do have the Update Image working on the camera)

rule “Camera1snapaction”
Item Basement_Motion changed to ON
Basement_UpdateTheImage.sendCommand (ON)
BasementCreateGif.sendCommand (ON)

I get the following three lines on the log file related to my issue:

2019-08-25 08:19:08.089 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Starting ffmpeg with this command now:/usr/bin/FFmpeg/ -y -t 6 -rtsp_transport tcp -i rtsp://admin:xxxxxxx@ -filter_complex fps=4,scale=480:-2:flags=lanczos,setpts=0.25*PTS,split[o1][o2];[o1]palettegen[p];[o2]fifo[o3];[o3][p]paletteuse /tmpfs/camera1/ipcamera.gif
2019-08-25 08:19:08.111 [ERROR] [hab.binding.ipcamera.internal.Ffmpeg] - java.io.IOException: Cannot run program “/usr/bin/FFmpeg/”: error=13, Permission denied
2019-08-25 08:19:08.113 [DEBUG] [hab.binding.ipcamera.internal.Ffmpeg] - Animated GIF has been created and is ready for use.

Before the test above, I was already getting the permission error, so I tried (I’m not a Linux expert, I googled the error code and found these solutions- none have worked):

sudo chown openhab:openhab /usr/bin/FFmpeg and /usr/bin/FFmpeg/ffmpeg
sudo chmod a+x /usr/bin/FFmpeg and /usr/bin/FFmpeg/ffmpeg

As to line three, although the log says the gif file is created it is not. I next extracted the command in line 1 and ran it directly in a putty session with the result below:

So I think I may have a couple of issues, probably all related to the version and way I installed ffmpeg. Any suggestions?

I’m going to stick this item in this topic as fyi for others that may have the same problem with the snap function, as I have worked around it…

Above, I noted I have the snap feature working on the RLC-420, but it wasn’t elegant. The log below was taken at the same time as the test above (log:set = TRACE). Thing file is the same as above. What it looked like to me was after the first picture either Openhab or the binding or my Rpi is overwhelmed (I thought there was supposed to be a 2 second delay, but the WARN seems to fire off repeatedly in fractions of a second), so I added a rule to only open the UpdateTheImage for 4 seconds.

rule “camera1snaptime”
Item Basement_UpdateTheImage changed to ON
var Timer timer1 = null
if (timer1 === null) {
timer1 = createTimer(now.plusSeconds(4), [ |
Basement_UpdateTheImage.sendCommand (OFF)
timer1 = null

and I also put this in the console:

log:set ERROR org.openhab.binding.ipcamera

I do get the picture and do not fill up the log file. The file below is a version of what I was getting before these changes that indicates something is overwhelmed. I’m not smart enough to figure it out. I can get a new picture by changing the item back ON in a few seconds after it is turned off, so for my purposes I’m good.

snaplogs-snipped.txt (35.6 KB)

After three days and four tries at installing ffmpeg (and deleting three), plus primers of Linux permissions and file management, I feel like a moron to report that I misunderstood the FFMPEG LOCATION and did not include the actual executable ffmpeg. Correct and working is:


On the bright side I increased my Linux knowledge.