ratoaq2/knowit

Segmentation Fault when using mediainfo under Alpine Linux 3.16.4

Closed this issue · 4 comments

Environment:

  • Docker containers host running Ubuntu 20.04.6 LTS on amd64
  • Docker container running Alpine Linux 3.16.4 with:
    • mediainfo 22.03
    • Python 3.10.10:
      • knowit==0.5.2
      • pymediainfo==6.0.1
      • trakit==0.2.1

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.

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

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

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