Jump to content

Post Processing > ffmpeg > Segmentation fault (on Raspberry Pi OS Lite (32-bit))


TMCsw
Go to solution Solved by softworkz,

Recommended Posts

I've created a test script called /usr/bin/pp2 it contains:

#!/bin/bash -x
eval 'ffmpeg -y -hide_banner -v info -i /usb/m/Who.ts -c copy /usb/m/emby.mkv' >/usb/m/emby.1 2>/usb/m/emby.2

when run on a terminal it works fine, when called by emby via:

image.png.43bb84e8cf884913dbd40abfc05a09bb.png

results in:

emby.1 & emby.mkv 0 bytes and emby.2 contains:

/usr/bin/pp2: line 2: <PID> Segmentation fault      ffmpeg -y -hide_banner -v info -i /usb/m/Who.ts -c copy /usb/m/emby.mkv

I did find that if I give the path to the emby version (/opt/emby-server/bin/ffmpeg

) it works in emby but fails in a terminal (/opt/emby-server/bin/ffmpeg: relocation error: /opt/emby-server/bin/ffmpeg: symbol avfilter_alloc version LIBAVFILTER_7 not defined in file libavfilter.so.7 with link time reference).

How can i make emby use whatever version of ffmpeg I would like it to?

TMC

 

Link to comment
Share on other sites

Hi, I think you're trying to use the server's embedded ffmpeg build. You're not going to be able to do that, well not very easily at least. 

Link to comment
Share on other sites

Actually I'm trying NOT to use the server version, guess I should have been more clear.

ffmpeg is installed on the pi (sudo apt install ffmpeg). It runs as expected in a terminal but when called by the server in a post process bash script (ffmpeg or /usr/bin/fmpeg) it throws the Segmentation fault error.

Link to comment
Share on other sites

  • Solution
33 minutes ago, TMCsimple said:

Actually I'm trying NOT to use the server version, guess I should have been more clear.

ffmpeg is installed on the pi (sudo apt install ffmpeg). It runs as expected in a terminal but when called by the server in a post process bash script (ffmpeg or /usr/bin/fmpeg) it throws the Segmentation fault error.

You need to add

unset LD_LIBRARY_PATH

to your bash script.

 

  • Like 1
Link to comment
Share on other sites

4 minutes ago, Q-Droid said:

And also reference ffmpeg using the full path to the executable you want to run. 

If he hadn't already done that, he couldn't have gotten a segfault.. 😉 

Link to comment
Share on other sites

Q-Droid
4 hours ago, softworkz said:

If he hadn't already done that, he couldn't have gotten a segfault.. 😉 

The script is using whichever ffmpeg is found first in the search path. There is no guarantee it will be the desired one. It's better, safer, to be specific when more than one exist on the system. 😉

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...