ratoaq2 / knowit

Know better your media files
MIT License
29 stars 5 forks source link

Segmentation Fault when using mediainfo under Alpine Linux 3.16.4 #62

Closed morpheus65535 closed 2 months ago

morpheus65535 commented 1 year ago

Environment:

When running this code, I get a Segmentation Fault and python interpreter close:

from knowit.api import know
know(video_path="/share/series/season/episode.mkv", context={"provider": "mediainfo", "mediainfo": "/usr/bin/mediainfo"})

Running this command in terminal return valid JSON:

/usr/bin/mediainfo --Output=JSON --Full "/share/series/season/episode.mkv"

{
"creatingLibrary": {
"name": "MediaInfoLib",
"version": "22.03",
"url": "https://mediaarea.net/MediaInfo"
},
"media": {
"@ref": "/share/series/season/episode.mkv",
"track": [
{
"@type": "General",
"Count": "331",
"StreamCount": "1",
"StreamKind": "General",
"StreamKind_String": "General",
"StreamKindID": "0",
...

I would expect Knowit to properly use the mediainfo binary when I configure the binary path.

morpheus65535 commented 1 year ago

Reference: https://github.com/morpheus65535/bazarr/issues/2098

ratoaq2 commented 2 months ago

I don't know if this still happens, but knowit only fallback to the mediainfo-cli... primarily it uses the .so/.dll natives and it might have an issue or incompatibility in this distribution of alpine + mediainfo

morpheus65535 commented 2 months ago

I'll run some tests and come back to you soon.

morpheus65535 commented 2 months ago

Seems to be working now, I'll close this issue and get back to it if required. Thanks!