TMCsw 179 Posted February 24, 2021 Posted February 24, 2021 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: 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
Luke 40077 Posted February 24, 2021 Posted February 24, 2021 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.
TMCsw 179 Posted February 24, 2021 Author Posted February 24, 2021 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.
Solution softworkz 4568 Posted February 24, 2021 Solution Posted February 24, 2021 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. 1
Q-Droid 880 Posted February 24, 2021 Posted February 24, 2021 And also reference ffmpeg using the full path to the executable you want to run.
softworkz 4568 Posted February 24, 2021 Posted February 24, 2021 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..
TMCsw 179 Posted February 24, 2021 Author Posted February 24, 2021 Thanks all the unset was what I needed. Now i can stop the Tylenol...
Q-Droid 880 Posted February 24, 2021 Posted February 24, 2021 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.
softworkz 4568 Posted February 24, 2021 Posted February 24, 2021 Emby does not add its bin folder to the search path
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now