Sonarr version (exact version): 2.0.0.5153 Mono version (if Sonarr is not running on Windows): 5.8.0.108 OS: Synology DSM
So I got my custom subtitle extraction script to work, only quirk I haven’t been able to tackle is an exception thrown which results in all ffmpeg processing to be added as error level in the Sonarr logs. I don’t get this issue when running the script manually.
But that throws a lib exception, which doesn’t seem the hinder functionality, but results in a error in the logs. (p.s. I had the same thing with PHP)
18-4-11 15:47:48.6|Debug|CustomScript|Executing external script: /usr/bin/python
18-4-11 15:47:48.6|Debug|python|Starting /usr/bin/python /volume1/Sonarr/extract-NL-EN-subs-Sonarr.py
18-4-11 15:47:49.4|Debug|PendingReleaseService|Removing previously pending release, as it was grabbed.
18-4-11 15:47:49.6|Debug|PendingReleaseService|Removing previously pending release, as it was grabbed.
18-4-11 15:47:50.3|Error|python|ffmpeg: /volume1/@appstore/nzbdrone/lib/libz.so.1: no version information available (required by /lib/libavformat.so.56)
18-4-11 15:47:50.4|Error|python|ffmpeg: /volume1/@appstore/nzbdrone/lib/libz.so.1: no version information available (required by /lib/libavcodec.so.56)
18-4-11 15:47:50.4|Error|python|ffmpeg version 2.7.1 Copyright (c) 2000-2015 the FFmpeg developers
Has anyone got any idea on how to mitigate the error, or at least how to supress the FFMPEG processing feedback to limit the clutter?
ffmpeg is logging those to standard error which in turn Sonarr logs as an error. Having your script redirect the standard error to a file may work, though that could suppress something valid in the future.
[NULL @ 0x15742e0] Unable to find a suitable output format for '2>&1'
2>&1: Invalid argument
Edit 2: Nevermind, seems my nights sleep was a bit too short, and I’m closing the command at the wrong place ]. Have to do some more testing, but this seems to work running it manually call([ffmpeg, '-i', filePath, '-vn', '-an', '-map', '0:s:0', srt], stderr=sys.stdout.fileno())
Staying in debug nicely. Gonna retry with 2>&1 now I know where to place the ] as that seems to be the more common annotation.
18-4-12 11:03:21.7|Debug|python|Starting /usr/bin/python /volume1/Sonarr/extract-NL-EN-subs-Sonarr.py
18-4-12 11:03:23.2|Debug|python|ffmpeg: /volume1/@appstore/nzbdrone/lib/libz.so.1: no version information available (required by /lib/libavformat.so.56)
18-4-12 11:03:23.3|Debug|python|ffmpeg: /volume1/@appstore/nzbdrone/lib/libz.so.1: no version information available (required by /lib/libavcodec.so.56)
18-4-12 11:03:23.3|Debug|python|ffmpeg version 2.7.1 Copyright (c) 2000-2015 the FFmpeg developers
With the help of someone who actually knows what he doing the script is coming along nicely. Still some stuff I want to change, but if someone wants a look, here’s the extraction script.