Log in

View Full Version : MediaInfo.NET


Pages : 1 [2] 3

stax76
28th October 2019, 21:55
I did a last polishing today before work on staxrip and mpv.net continues.

5.2
---

- in the settings dialog the layout was improved,
the font picker was replaced with a drop down and
a link was added to open the settings folder
- using raw view, MediaInfo is now queried only once
instead of twice which is marginally more efficient
- on startup MediaInfo.NET registers itself at
HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\
which enables third party apps to find and start MediaInfo.NET
- a assembly title attribute was added so the shell will use
MediaInfo.NET instead of MediaInfoNET (for instance in the
Explorer 'Open with' menu)
- the website was improved and added to the context menu
- the about dialog shows now the MediaInfo version
- all message boxes were migrated to use the TaskDialog API
which has a improved presentation and copy and support
links in case of an error


screenshot of the improved settings dialog:

https://i.postimg.cc/xTY4yYGb/Screenshot-44.png


Next staxrip build will integrate MediaInfo.NET.


runtimes:

https://dotnet.microsoft.com/download/dotnet-core/3.0/runtime


website:

https://github.com/stax76/MediaInfo.NET

stax76
30th October 2019, 16:05
5.3
---

- in normal view language names are now shown instead of two letter language codes
- MediaInfo API spelling errors were corrected
- duplicated entries are now removed

- critical fix: file associations did not work when UserChoice key was defined


runtimes:

https://dotnet.microsoft.com/download/dotnet-core/3.0/runtime


website:

https://github.com/stax76/MediaInfo.NET

redbtn
1st November 2019, 18:29
Oh, now it's super cool! Thank you!
Switch between modes is great idea!

stax76
1st November 2019, 19:10
You're welcome!

stax76
2nd December 2019, 02:19
5.4.0.0
-------

- new: the track navigation tab bar was only showing the format family
like DTS, now it's showing the exact format like DTS XLL
- new: update check, must first be enabled in settings
- new: update feature, requires PowerShell 5 and curl,
an up to date Windows 10 system has both included


runtimes:

https://dotnet.microsoft.com/download/dotnet-core/3.0/runtime


website:

https://github.com/stax76/MediaInfo.NET


https://i.postimg.cc/B6C9gJB9/Untitled.png

OAKside
8th December 2019, 02:29
MediaInfo.NET is just incredible, thank you again very much stax76! Drag and drop. Customizable (fonts, dark mode, etc). Beautiful. Works great in Windows "Send To" menu. Previously using MediaInfo "lite" (by Atak Snajpera).

Nitpicks: The "menu" section seems formatted oddly: Chapter times read "00[30 spaces]:[1 space]00:00.000" but perhaps should be "00:00:00.000" with no spaces. Then chapter names could be aligned nicely like rest of text. Also: there in no mention of "menu" in top summary, maybe by design though. And: (at risk of being slapped) top summary for "text" is not labeled "T" but "S" (for subtitle).

stax76
7th March 2020, 16:07
Thanks for the awesome feedback, new build should have everything covered!

Please note that it's a 32bit only app now.

https://github.com/stax76/MediaInfo.NET/releases/tag/5.5.0.0

https://dotnet.microsoft.com/download/dotnet-core/current/runtime

JKyle
7th March 2020, 20:21
Please note that it's a 32bit only app now.

Does it mean that I need to install .NET Core Runtime x86 along with x64?

I updated .NET Core Runtime x64 to the latest one, but 5.5.0.0 doesn't seem to launch at all. I can't see any instance of MediaInfo.NET on Task Manager.

I rolled back to the previous version (5.4.0.0), and it works nicely (without x86).

stax76
7th March 2020, 21:17
Does it mean that I need to install .NET Core Runtime x86 along with x64?

Yes, I know it's a mess, I even considered to back port it to .NET Framework. I also don't know about compatibility between Core 3.0 and Core 3.1. The point of using Core in the first place was to prepare for the future and in December the future will be here, I needed to learn this new platform. Doing separate builds for 32 and 64 bit is cumbersome, in particular it makes the auto update feature uglier than it needs to be, I like the simplicity of the powershell code, it's like ten lines.

Generally .NET code can be built against x64, x86 or Any Platform which works on both due to the just in time compiler, the MediaInfo library is native though so it's either x64 or x86.

WebAssembly which can also be used outside the web is interesting because it's fast but also using just in time compilation so works on any platform.

Core or .NET 5 as it will be called later this year has also a mode where the entire runtime is included and it appears as a regular application that does not need a runtime, right now the files are too big, I think it involves a complicated process called tree shaking and will be one of the most valuable features of the new platform once it's ready.

Going x86 only is a way to achieve simplicity because Windows supports both side by side and for certain types of apps it's not making a real difference.

stax76
7th March 2020, 21:54
I've indeed missed updating the target Core platform from 3.0 to 3.1 and just made another release:

5.5.0.0 -> Core 3.0 x86
5.6.0.0 -> Core 3.1 x86

https://github.com/stax76/MediaInfo.NET/releases

https://dotnet.microsoft.com/download/dotnet-core/current/runtime

JKyle
7th March 2020, 21:54
Thank you for the quick and kind reply.

Yes, 5.5.0.0 (and 5.6.0.0) works nicely after installation of .NET Core 3.1 Runtime x86.

I think most x64 users will easily ignore this requirement unless they read this thread or visit the official github page.

Thanks again. :)

gpower2
10th March 2020, 19:12
Hey! Thanks for your great work!

I have also made a small MediaInfo in .NET that detects runtime the running platform and loads the correct MediaInfo library, allowing for targeting Any CPU.

https://github.com/Gpower2/gMediaTools/blob/master/gMediaTools/MediaInfo/gMediaInfo.cs

I know you prefer VB, but maybe this will give you some ideas about your project. ;)

PS. It is based on an old MediaInfo wrapper from MeGUI project. ;)

stax76
10th March 2020, 20:30
Hello gpower2,

C# is OK (MediaInfo.NET and mpv.net are written in C#).

Sometimes it greatly helps to look at other peoples code to understand how it works and how other people do things.

Typically, I do things my own way however.

Native MediaInfo.dll is used in 4 of my projects:

https://github.com/staxrip/staxrip/blob/master/General/MediaInfo.vb

https://github.com/stax76/mpv.net/blob/master/mpv.net/Native/MediaInfo.cs

https://github.com/stax76/MediaInfo.NET/blob/master/src/Generic/MediaInfo.cs

https://github.com/stax76/Get-MediaInfo/blob/master/MediaInfoNET/MediaInfoNET.cs

I've not really analyzed your code but it's probably inefficient since it uses GetProcAddress all over the place instead of the idiomatic .NET way DllImport, I could be wrong because I did not benchmark it but if you disassemble MS code with dotPeek (frequent task of an experienced .NET dev) then you see that it uses almost always DllImport.

It seem to call GetProcAddress for every request instead of only one initialization, that is inefficient.

gpower2
10th March 2020, 21:17
Hmmm, you actually gave me an idea of caching the Delegates instead of constantly resolving their address, thanks for that!

Unfortunately I don't think you can use DllImport when you want to do a runtime bidning to different Dlls unknown to compile time.

Of course using Dllimport would be the preferred way, if only it could work in this case! :P

PS. You could also use ILSpy (open source) ;)

stax76
10th March 2020, 21:26
As far as I know LoadLibrary most importantly first looks in the startup folder and after that in System32 but it's not a problem to use DllImport if your DLL is located somewhere else, just call LoadLibrary once before the DllImport method, that's how my MediaInfo code works, see here:

https://github.com/staxrip/staxrip/blob/master/General/MediaInfo.vb#L12

If I had written this code today I probably would have checked the return value for an error even though it's not having a real benefit.

gpower2
10th March 2020, 21:37
I don't think LoadLibrary, which is a kernel32.dll method, is related to DllImport, which is managed class.

I actually use the LoadLibrary in my code too, I just went full dynamic and use GetProcAddress from the library handle returned from LoadLibrary.

BTW, I just pushed the cache implementation for the function delegates and it works like a charm! :)

stax76
10th March 2020, 21:57
The CLR sits on top of the OS, under the hood the DllImport implementation will just call LoadLibrary, try it and you will see that it works because it has always works for me and I just found out now but instead of calling LoadLibrary this will much likely work as well:

SetDllDirectory and AddDllDirectory

stax76
10th March 2020, 22:39
There is also DefaultDllImportSearchPathsAttribute (https://docs.microsoft.com/de-de/dotnet/api/system.runtime.interopservices.defaultdllimportsearchpathsattribute?view=netframework-4.8) so there are various ways to achieve the same thing, some more elegant than others, performance wise your way should be fine, for performance critical code resolving the address should definitely be done only once.

stax76
4th April 2020, 18:46
There was a new MediaInfo version, so I made a new release of this little project.

I've integrated another small project of mine called Get-MediaInfo, it's a complete MediaInfo PowerShell solution, in MediaInfo.NET there is a new menu item 'Folder View' which runs the powershell command:

. Get-MediaInfo.ps1; gci 'folder' | gmi | ogv

It looks like so:

https://github.com/stax76/Get-MediaInfo#examples

I hope it works, software dependencies and distribution can be very difficult!

https://github.com/stax76/MediaInfo.NET#installation

People that already use MediaInfo.NET may try to update using the built-in update feature found in the menu, that is powershell powered as well and I hope that it works too.

stax76
11th April 2020, 12:07
Version 6.0.0.0 runs on good old .NET Framework 4.8, it's compiled as Any CPU so runs on x64 and x86 but the included native MediaInfo.dll is x64 so x86 users have to replace MediaInfo.dll.

- there was an issue with the feature that allowed to customize the settings directory, so I removed this feature
- Get-MediaInfo 3.0 is included, it fixes few bugs, it's used for the folder view
- the folder view uses now an internal in process PowerShell so no terminal is shown

The outlook for staxrip is:


- internal MediaInfo GUI replaced with external MediaInfo.NET app
which was ported to good old .NET Framework 4.8. StaxRip includes only one MediaInfo.dll
and it's located in the MediaInfo.NET folder and there is also only one Get-MediaInfo.ps1 also
located in the MediaInfo.NET folder. The folder view now uses the internal PowerShell instead
of showing a terminal. Get-MediaInfo.ps1 was updated to 3.0.


https://github.com/stax76/MediaInfo.NET

stax76
11th April 2020, 21:15
Unfortunately there was a critical issue in 6.0.0.0, it's fixed in 6.1.0.0.

https://github.com/stax76/MediaInfo.NET/issues/7

https://github.com/stax76/MediaInfo.NET/releases

OAKside
28th April 2020, 02:14
- there was an issue with the feature that allowed to customize the settings directory, so I removed this feature


I was wondering why settings were reset (was using "portable"). No problem, awesome new right-click menu, pointed me to proper directory. Thanks again for your work on MediaInfo.NET (and of course StaxRip), honestly a pleasure to use, beautiful and customizable (esp. dark mode, windows size, font).

Request: Is it possible to format the "Menu" section differently? This (https://i.imgur.com/w5h7Q0B.jpg) is what mine looks like (MediaInfo formats fine, like this (https://i.imgur.com/tx2POAH.jpg)).

stax76
28th April 2020, 16:01
Thanks for the great feedback, there is a new release with the only change fixing this bug, please try the built-in update feature.

stax76
4th May 2020, 04:24
6.3.0.0 is a bug fix release.

https://github.com/stax76/MediaInfo.NET

hajj_3
4th May 2020, 11:43
does this have anything to do with the regular mediainfo program, do you use their .dll file to get all the media information and use your app as the front end? Do you have a binary of this app and your Open with++ app?

stax76
4th May 2020, 14:23
Does this have anything to do with the regular mediainfo program

yes


do you use their .dll file to get all the media information and use your app as the front end?

yes


Do you have a binary of this app and your Open with++ app?

yes, on the release page but before you go to the release page please read the full main page first. Often there is important information like a description what the application is about, system requirements and install instructions and also other useful information like a list of features or screenshots.

hajj_3
4th May 2020, 16:09
Mediainfo.net uses 46.7MB ram whereas the latest mediainfo uses only 5.1MB, that seems quite high for an app like this?

When registering the app in the right click menu of file explorer it shows up as "mediainfo" and without a logo. You could do with renaming it Mediainfo.NET and possibly adding a logo.

Adding an option in the settings to create an icon for the application in the start menu would be nice.

stax76
4th May 2020, 16:37
Other people might not like the .NET caption or the icon, with Open with++ you have full control and it allows you to learn the command line which is a very powerful concept.

MediaInfo.NET uses 35 MB here for a simple file, it's not really that much, a modern XAML based GUI uses more memory like a classic Win32 GUI.

OAKside
6th May 2020, 08:17
Request: Is it possible to format the "Menu" section differently? This (https://i.imgur.com/w5h7Q0B.jpg) is what mine looks like (MediaInfo formats fine, like this (https://i.imgur.com/tx2POAH.jpg)).

Thanks for the great feedback, there is a new release with the only change fixing this bug, please try the built-in update feature.

Holy cow, that was quick. Tested, indeed fixed! Looks great now! :thanks: (Forgot to try update feature in my delirium, ha, I need to check it out.)

redbtn
7th May 2020, 12:22
Other people might not like the .NET caption or the icon, with Open with++ you have full control and it allows you to learn the command line which is a very powerful concept.
Yeah, no need to add ".NET" or/and icon, it's perfect as is. Thank you for great apps!

stax76
22nd May 2020, 15:49
6.4.0.0

- Update and Folder View feature did not work on systems with restricted PowerShell execution policy.

stax76
13th December 2020, 06:35
v6.7.0.0

- New icon
- MediaInfo 20.09

https://github.com/stax76/MediaInfo.NET

hajj_3
13th December 2020, 15:32
v6.7.0.0

- New icon
- MediaInfo 20.09

https://github.com/stax76/MediaInfo.NET

the update functionality in v6.4.0.0 doesn't seem to work, a powershell window appears for a split second then disappears and the program closes but when i restart the program it hasn't updated.

stax76
13th December 2020, 18:10
Yes, I noticed it when I wanted to auto update the version that is included in staxrip, I will take a look.

stax76
13th December 2020, 19:08
Found the problem, could have happened when I back ported it from .NET Core to .NET Framework.

I changed the update routine using zip instead of 7z (same as mpv.net), uploaded 6.8, this has to be updated manually, from 6.8 to 6.9 it should work again.

Again I changed the back color of the dark theme.

JKyle
15th March 2021, 21:23
@stax76,

Plz take a look at this issue report (https://github.com/stax76/MediaInfo.NET/issues/10) on GitHub.

stax76
16th March 2021, 01:49
It's fixed in the last release 7.0.0.0.

hajj_3
26th March 2021, 14:34
mediainfo 21.03 is out now, i hope you can release a new version. Out of curiosity why did you revert back to .net from .net core?

stax76
26th March 2021, 15:25
Thanks for the note, I try to update it soon.

MediaInfo.NET much like mpv.net was originally built for staxrip and are very important for staxrip. .NET Core or as it's called today NET 5 is not yet part of the Windows OS. That's the main problem at the moment, but I'm really not sure if it's still true for the latest Windows build.

And maybe more and more apps require .NET 5 and people start accepting it. I used .NET 5 for my dark voidtools Everything frontend, and it became surprisingly popular, it was like staxrip, mpv.net and Open with++ reviewed by www.ghacks.net and has 51 Stars on GitHub, it can be found here:

https://github.com/stax76/Everything.NET

It was built in only 3 days which is a lot less than MediaInfo.NET.

Nobody has complained about the .NET 5 install requirements, that is good. But generally .NET Framework and .NET 5 are not compatible and applications have very different requirements, for many applications a port does not make sense, and for other it makes a lot of sense. There are many factors.

stax76
31st March 2021, 14:06
7.1.0.0

- MediaInfo 21.3
- Get-MediaInfo 3.7
- psy-rd moved to Analysis section

hajj_3
18th September 2021, 09:46
mediainfo 21.09 is out.

hajj_3
31st March 2022, 15:49
mediainfo 22.03 is out.

stax76
1st April 2022, 16:03
There was crash reported lately, so I tried to fix it and made a new release:

v7.2.0.0

- Next/Previous uses only known media file types as defined in the settings
- Larger list of known media file types
- Bit depth parameter is hidden for DTS
- Rebuild of corrupted settings file
- MediaInfo 22.03

hajj_3
24th June 2022, 09:57
mediainfo 22.06 is out.

hajj_3
5th October 2022, 07:48
mediainfo 22.09 is out.

hajj_3
23rd December 2022, 14:07
mediainfo 22.12 is out.

hajj_3
29th March 2023, 12:53
mediainfo 23.03 is out.

hajj_3
27th April 2023, 17:15
mediainfo 23.04 is out.

hajj_3
28th June 2023, 10:47
mediainfo 23.06 is out.

Klaus1189
12th July 2023, 21:24
mediainfo 23.07 is out.