I was making a small python 3.8 script to sort photos and videos according to their metadata on my Synology NAS (working on DSM 7.0), overall it works well on ubuntu but it fails on the NAS with this error :
FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe'
I've been searching everywhere for help on this issue, I saw this post and tried the solutions but I still got the error on any video I try to read metadata from.
ffmpeg is installed and so are ffmpeg-python and ffprobe-python
Here's my test code:
from datetime import datetime
import ffmpeg
name = "VID_20200130_185053.mp4"
path = "/volume1/photo/phone/DCIM/Camera/"
data_keys = ["DateTimeOriginal", "DateTime", "creation_time"]
file = f"{path}{name}"
print(file)
vid = ffmpeg.probe(file)['streams']
# vid = ffprobe.FFProbe(file).streams
for key in data_keys:
if key in vid[0]['tags']:
print(datetime.strptime(vid[0]['tags'].get(key).split('T')[0], "%Y-%m-%d"))