Run ffmpeg as non-root user

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
finn

Run ffmpeg as non-root user

Post by finn »

Hi,

I am having a problem with IM running ffmpeg as a non-root user. I installed IM and ffmpeg when logged in as root and they play well together when I issue commands from the commandline logged in as root.

Code: Select all

/usr/local/bin/convert `/bin/ls -rt /tmp/sunset/*.jpg` /tmp/sunset/sunset.mp4
works fine and creates the movie.

su data and issuing the same command results in:
convert: delegate failed `"ffmpeg" -v -1 -mbd rd -flags +4mv+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1/2 -i "%M%%d.jpg" "%u.%m" 2> "%Z"' @ error/delegate.c/InvokeDelegate/1061.

The data user does have write permissions to /tmp/sunset/ (touch /tmp/sunset/somefile works fine. I even gave 777 just to be sure)
The ffmpeg application has 755 permissions, so data should be able to execute it (I gave this 777 to be sure)
IM works fine as data user. /usr/local/bin/convert /tmp/sunset/0001.jpg /tmp/sunset/0001.png outputs the image as expected.
I have tried make uninstall, make distclean on IM and recompiled/built/installed to see if having ffmpeg installed first would help. Same result.

I'm running out of ideas...any thoughts would be welcomed.

Many thanks,
Finn
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Run ffmpeg as non-root user

Post by snibgo »

I suggest you try running an ffmpeg command directly from the command line, both as su root and su data. That will indicate whether you have a problem within ffmpeg or IM.

ffmpeg -i /tmp/sunset/*.jpg /tmp/sunset/sunset/mp4

If that works (as data), build up to the fuller comand. Two-pass ffmpeg creates a temporary file. I forget where it tries to create it, but that might be the problem.
snibgo's IM pages: im.snibgo.com
Post Reply