yartat / MP-MediaInfo

Mediaportal MediaInfoLib wrapper
Other
45 stars 21 forks source link

All MediaInfo properties are 0 or null #23

Closed frankzoldan closed 3 years ago

frankzoldan commented 3 years ago

All my trials to get any information out of a .mkv file failed. In a C# .NET Framework 4.6.1 Console Application, I have a simple code line like this: var miWrapper = new MediaInfoWrapper(filePath); In the Visual Studio Debugger, all property values of miWrapper are shown as null or 0. I'm quite sure that I'm making a silly mistake. A problem is, I couldn’t find a project in the Internet, that just does something simple like the above. If you know of any simple example or if you could provide one, I would very appreciate. When I just have the code to get one or two valid properties, I'll be able to do all the rest as I want.

shubhank008 commented 3 years ago

@yartat Facing same problem, I thought I was doing something wrong and due to lack of documentation of this project, I started studying the framework's classes and test units and the code and its call do seem as simple as that one liner, yet everything and all the properties are 0 or null.
Tried passing a ILogger as well but no errors or anything in logs.

yartat commented 3 years ago

Have you looked #14 issue and the it's workaround?

shubhank008 commented 3 years ago

Have you looked #14 issue and the it's workaround?

I actually figured out and fixed it already, it was because I am using the wrapper in Unity and so detailed logs (the logger) doesn't work to provide detailed message on what's going on.
basically my .dll files were not getting found out and it was throwing MediaInfoNotFound false but I didn't realize it, once I did, I tinkered more as to why dll are not found and I just wrote my own post-process code for Unity to copy the .dll files where MediaInfo was trying to find it and wrote a alternative location/path code to provide to MediaInfo.

AKA, its solved for me.

hwmaat commented 3 years ago

Facing the same issue. But for using MediaInfo in a docker container. The mediainfo files do not make it into the docker when building. Both Debug and Release configuration.

Can you share where MediaInfo expects the files?

yartat commented 3 years ago

I added dependencies in case deploy with docker. I close issue.