Author Topic: No properly working "Length" column for audio/video files  (Read 21359 times)

Cripple-resistant

  • Junior Member
  • **
  • Posts: 15
    • View Profile
No properly working "Length" column for audio/video files
« on: November 12, 2019, 04:48:53 »
Hello,

I've tried to find a column "Length" in MC that consistently displays the time length of audio and video file of any type (as MS Explorer and some other 3rd party file explorers do). The one that seems to be the most reliable I've found is "Audio - Length Total", nonetheless this column does not display anything for some multimedia file types like ".webm" and ".mkv" for example.

Would it be possible to have a column "Length" that reliably works (like in MS Explorer and some other 3rd party file explorers) for any type of audios and videos?

This is really important for me as this is one of these annoying "details" that end up making me return to use other file explorers than MC.

Many thanks in advance! :)


« Last Edit: November 12, 2019, 04:54:57 by Cripple-resistant »

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4491
    • View Profile
    • Multi Commander
Re: No properly working "Length" column for audio/video files
« Reply #1 on: November 12, 2019, 15:03:54 »
Sorry metadata for now only supports in audio files.
The 3rd party lib I use for this only supported audio files last time I looked. and last time I checked I did not find a good free library to use for video metadata.
But It was a while ago.. I add it to my list to investigate if there are any possible 3rd party libraries to use for this

FredeF

  • Junior Member
  • **
  • Posts: 21
    • View Profile
Re: No properly working "Length" column for audio/video files
« Reply #2 on: November 12, 2019, 19:37:15 »
You should use the MediaInfo.dll
It is open source och fungerar jätte bra. The documentation is rather inadequate and the frontend gui is awful, but for MC only the .dll is needed.
It will extremely fast rip the data even from almost any obscure file extension.
https://mediaarea.net/en/MediaInfo
https://mediaarea.net/en/MediaInfo/Download
https://mediaarea.net/en/MediaInfo/Download/Windows

Maybe you could also give this a thought, since it will soon be christmas: http://forum.multicommander.com/forum/index.php/topic,3616.0.html

Cripple-resistant

  • Junior Member
  • **
  • Posts: 15
    • View Profile
Re: No properly working "Length" column for audio/video files
« Reply #3 on: November 12, 2019, 23:24:30 »
Hi Mathias, FredeF,

Thank you both for your answers :)
Hopefully Mathias you will be able to solve this (maybe using the MediaInfo .dll as kindly suggested by FredeF).


Optional reading:
FYI I will quickly tell you why not having all the audio/video lengths makes MC unusable for one of my own main use cases:
* Basically I like browsing various news web sites, forums, etc...
* On some of the pages of these web sites, sometimes there are videos or audios
* I really don't like watching/listening to these embedded videos/audios using my web browser (because it's often very frustratingly buggy, slow, not many settings/options (specially the playing speed fine-tuning), etc...)
* So I use a software utility to download some potentially interesting embedded videos/audios in one big directory on my computer to watch them with a good offline video/audio player either on the spot or later when I have more time (the amount of audios/videos tend to grow in this directory, you know how it is: too little time / information overload etc... :-\)
* I like using a sleek file explorer to list all these video/audio files in this big directory
* I need to be able to check the length of ALL these video/audio files so that it helps me choosing which video/audio files to watch/listen to depending on the time I have in front of me.
* If some time lengths are missing in MC file listing then it makes MC pretty much unusable for this use case and hence I have to use other file explorers which do not have that problem for this use case
QED

Hopefully you can do something about it quickly,
many thanks in advance :)

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4491
    • View Profile
    • Multi Commander
Re: No properly working "Length" column for audio/video files
« Reply #4 on: November 13, 2019, 08:10:45 »
You should use the MediaInfo.dll
It is open source och fungerar jätte bra. The documentation is rather inadequate and the frontend gui is awful, but for MC only the .dll is needed.
It will extremely fast rip the data even from almost any obscure file extension.
https://mediaarea.net/en/MediaInfo
https://mediaarea.net/en/MediaInfo/Download
https://mediaarea.net/en/MediaInfo/Download/Windows

Maybe you could also give this a thought, since it will soon be christmas: http://forum.multicommander.com/forum/index.php/topic,3616.0.html

I have look at it. the API is horrible and bloated. Not sure I want to increase the size of MC with 80% just to get some minor data about video files.
There must be something better.


Cripple-resistant

  • Junior Member
  • **
  • Posts: 15
    • View Profile
Re: No properly working "Length" column for audio/video files
« Reply #5 on: November 13, 2019, 20:34:41 »
You should use the MediaInfo.dll
It is open source och fungerar jätte bra. The documentation is rather inadequate and the frontend gui is awful, but for MC only the .dll is needed.
It will extremely fast rip the data even from almost any obscure file extension.
(...)
I had a look at it: the API is horrible and bloated. Not sure I want to increase the size of MC with 80% just to get some minor data about video files.
There must be something better.

One thing to note about using MediaInfo dll (not sure if other 3rd party libs would also provide this possibility):
It would allow you to provide in MC columns like:
"Video format", "Video codec id", "Audio format", "Audio codec id"
These columns would be very useful because the file name extension of a multimedia file only gives an indication about the multimedia container type and not about the video and audio formats/codecs actually being used by that file.
The video/audio format/codec information is very useful for example when you want to use a USB stick to play a video/audio file on TV: TV multimedia players often have limitations on the codecs they support so having the video/audio format/codec information of multimedia files being displayed directly in MC columns (instead of the MediaInfo GUI) would be very useful for this purpose for example.

FredeF

  • Junior Member
  • **
  • Posts: 21
    • View Profile
Re: No properly working "Length" column for audio/video files
« Reply #6 on: November 13, 2019, 20:49:19 »
You should use the MediaInfo.dll
The documentation is rather inadequate and the frontend gui is awful, but for MC only the .dll is needed.
It will extremely fast rip the data even from almost any obscure file extension.

I have look at it. the API is horrible and bloated. Not sure I want to increase the size of MC with 80% just to get some minor data about video files.
There must be something better.

That is exactly what I wrote: Use only the .dll
It is small, fast and very tolerant on buggy file headers, and is of course not bloated.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4491
    • View Profile
    • Multi Commander
Re: No properly working "Length" column for audio/video files
« Reply #7 on: November 14, 2019, 07:40:06 »
You should use the MediaInfo.dll
The documentation is rather inadequate and the frontend gui is awful, but for MC only the .dll is needed.
It will extremely fast rip the data even from almost any obscure file extension.

I have look at it. the API is horrible and bloated. Not sure I want to increase the size of MC with 80% just to get some minor data about video files.
There must be something better.

That is exactly what I wrote: Use only the .dll
It is small, fast and very tolerant on buggy file headers, and is of course not bloated.

The dll is around 6MB for 64bit version , it would be smaller if build in using static lib.. Fast hmm Well it might be okey. But since everything is string based, it could have been faster. But I don't think that would be a problem, But It is bloated in the way that it support so much more then I need, 80% of everything in the DLL I do not need.
But there might be way to get Media Length and some other properties from Windows.

Cripple-resistant

  • Junior Member
  • **
  • Posts: 15
    • View Profile
Re: No properly working "Length" column for audio/video files
« Reply #8 on: November 15, 2019, 01:03:12 »
(...)
The dll is around 6MB for 64bit version , it would be smaller if build in using static lib.. Fast hmm Well it might be okey. But since everything is string based, it could have been faster. But I don't think that would be a problem, But It is bloated in the way that it support so much more then I need, 80% of everything in the DLL I do not need.
But there might be way to get Media Length and some other properties from Windows.

Maybe you could use various (automatic or manual, binary or source-based) dead code elimination (DCE) techniques to remove all/most of MediaInfo code not referenced/called/used by MC. Or if you don't want to do it completely by yourself, you could ask the MediaInfo dev team if they would do that for you or maybe help you on how to do this (you have nothing to lose to ask them!) :)

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4491
    • View Profile
    • Multi Commander
Re: No properly working "Length" column for audio/video files
« Reply #9 on: November 15, 2019, 10:11:39 »
(...)
The dll is around 6MB for 64bit version , it would be smaller if build in using static lib.. Fast hmm Well it might be okey. But since everything is string based, it could have been faster. But I don't think that would be a problem, But It is bloated in the way that it support so much more then I need, 80% of everything in the DLL I do not need.
But there might be way to get Media Length and some other properties from Windows.

Maybe you could use various (automatic or manual, binary or source-based) dead code elimination (DCE) techniques to remove all/most of MediaInfo code not referenced/called/used by MC. Or if you don't want to do it completely by yourself, you could ask the MediaInfo dev team if they would do that for you or maybe help you on how to do this (you have nothing to lose to ask them!) :)

No that will not work since it is not really dead code.. it is just ununsed code. It will not be able to removed it.
But as I said. Windows is able to get that information. And I think it will be possible to ask windows about it. However it does not support as much as that MediaInfo.
Maybe later a option downloadable plugin to MC can be added that exposes all properties in MediaInfo to MC. BUT it will be optional and installed separately

Cripple-resistant

  • Junior Member
  • **
  • Posts: 15
    • View Profile
Re: No properly working "Length" column for audio/video files
« Reply #10 on: November 15, 2019, 21:00:31 »
(...)
1. No that will not work since it is not really dead code.. it is just unused code. It will not be able to removed it.
2. But as I said. Windows is able to get that information. And I think it will be possible to ask windows about it. However it does not support as much as that MediaInfo.
3. Maybe later a option downloadable plugin to MC can be added that exposes all properties in MediaInfo to MC. BUT it will be optional and installed separately

Hi Mathias,

Thank you for your quick & helpful answer :)

1. Wrt DCE, I know what you call "bloat" in MediaInfo is not dead code in absolute terms, it's just unused code (from the point of view of MC). I was just suggesting that you use DCE techniques which would work in this case (because MC would call into the MediaInfo code only the "length" routine (and maybe a few other ones) and all the MediaInfo code that is not used by the "length" routine would be left unused by MC and hence can be viewed as technically dead from the point of view of MC).

2. You could probably use Windows API/libs indeed as it seems MS Explorer provide the multimedia file length info in most case (although on my Windows 7, around 10% of multimedia files do not show a length in MS Explorer (and neither in some other 3rd party file managers that also probably use Windows API/libs)). Using Windows API/libs would not be perfect for that purpose but that would definitely be an improvement.

3. Providing a separately downloadable plugin to MC that could expose all properties in MediaInfo to MC would be simply amazing :) :) :)
As previously mentioned, in addition to exhaustively providing the time length of almost all possible multimedia files, it could also provide information about file codecs for example, which is extremely useful for anybody trying to play multimedia files on various devices :)
This would definitely give MC a big advantage over all existing file explorers that I know :)
You could then maybe even ask the MediaInfo team to kindly put a link from their website to your website which I am sure would bring in quite a few new MC users for you as well :)
Fingers crossed, you'll be able to implement that soon, that would be so useful & mind-blowing :) :) :)

Thank you again Mathias and have a nice week-end :)

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4491
    • View Profile
    • Multi Commander
Re: No properly working "Length" column for audio/video files
« Reply #11 on: November 17, 2019, 12:58:58 »
(...)
1. No that will not work since it is not really dead code.. it is just unused code. It will not be able to removed it.
2. But as I said. Windows is able to get that information. And I think it will be possible to ask windows about it. However it does not support as much as that MediaInfo.
3. Maybe later a option downloadable plugin to MC can be added that exposes all properties in MediaInfo to MC. BUT it will be optional and installed separately

Hi Mathias,

Thank you for your quick & helpful answer :)

1. Wrt DCE, I know what you call "bloat" in MediaInfo is not dead code in absolute terms, it's just unused code (from the point of view of MC). I was just suggesting that you use DCE techniques which would work in this case (because MC would call into the MediaInfo code only the "length" routine (and maybe a few other ones) and all the MediaInfo code that is not used by the "length" routine would be left unused by MC and hence can be viewed as technically dead from the point of view of MC).

I know about DCE and I use it a lot. Problem is that MediaInfo is not written in a way so that each property you ask for have its own clean code path, so the compiler can't detect what is used or not based on what is called. Because a lot of the evaluation of what the the MediaInfo code will do are decided in runtime.