Skip to content

MediaInfo.Open works on windows but not on Ubuntu #33

@modmanx

Description

@modmanx

Hello, I hope someone can help me out here :) I have pretty basic example, which works fine on Windows but not on Ubuntu 20.04. File does exist and I'm keep getting "No video streams in file" on Ubuntu without any error message. Is there a way how to figure out what's going on?

if (!System.IO.File.Exists(filename))
{
    return new { Error = "File does not exists" };
}

var mw1 = new MediaInfo.MediaInfo();
mw1.Option("ParseSpeed", "0");
mw1.Open(filename);            

var videostreamcount = mw1.CountGet(StreamKind.Video, 0);
if (videostreamcount > 0)
{
    var _height = mw1.Get(StreamKind.Video, 0, "Height");
    var _scanType = mw1.Get(StreamKind.Video, 0, "ScanType");
    var _isInterlaced = _scanType == "Interlaced";
    var _duration = mw1.Get(StreamKind.Video, 0, "Duration");
    return new { Height = _height, ScanType = _scanType, IsInterlaced = _isInterlaced, Duration = _duration };
}
else
{
    return new { Error = "No video streams in file" };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions