[WDX] MediaTime - sum up length of media files in dir

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

New Version 1.1!
  • added: reference to the average overall bitrate in custom format fields (kbit/s or Mbit/s),
    plus new option for decimal precision (might be useful for evaluating quality level)
  • added: reference to an error string in custom format fields, that will show only
    when some files in a dir could not be opened for reading, plus shows the amount of such files
  • added a 2nd custom format string, so you can now choose between two custom formats
    (e.g. one for time, one for avg. bitrate)
  • fixed: with RoundTcTime=1 a duration >= xx:xx:59.500 was incremented to xx:xx:60
    for a TC time field -> now properly increments to next minute or hour
  • slight plug-in file size reduction
  • updated to MediaInfoLib 0.7.76
Check the first post for the new file.
TC plugins: PCREsearch and RegXtract
petkos01
New Member
New Member
Posts: 1
Joined: 2023-05-01, 08:01 UTC

Re: [WDX] MediaTime - sum up length of media files in dir

Post by *petkos01 »

Dear Milo,
Your addon was lifesafer for me. I had a lot of folders with video and wanted to add information about bitrate of files in those folders to the folder name. The issue is some videos have so many audio tracks that bitrate doesn't represent video quality that well. Is it possible to add "Format 3" with average video bitrate? I know you've provided source files for addon but I wasn't able to alter it. Maybe someone with a bit of C programming can do it easily. Thanks in advance.
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Re: [WDX] MediaTime - sum up length of media files in dir

Post by *milo1012 »

2petkos01
Thanks for the feedback, it's good to hear that the plugin is useful.
Concerning your request: there would be no reason to add a new custom format dedicated entirely to that. It would be simpler if I'd try to add new field references to the two existing custom formats, like "stream 1 bitrate", "stream 2 bitrate" and so on.
I don't think you can have a pure video bitrate that easily, because mp4/mkv containers can have them at any position, and even having multiple video streams. I'll see what I can do. The mediainfo lib needs an update anyway, so maybe I have a new version ready soon.
TC plugins: PCREsearch and RegXtract
User avatar
karist
Junior Member
Junior Member
Posts: 8
Joined: 2023-11-03, 09:48 UTC
Location: Hungary

Re: [WDX] MediaTime - sum up length of media files in dir

Post by *karist »

Dear Milo,
Your plugin is very useful! :)

But if it possible I need a new useful feature:
When I entered a directory, the mp3 elements and the elements duration are listed.

It is OK, but I need the summarized the actual directory mp3 duration for example show on the top line ('..') row:

NameDuration
..2:00
file1.mp31:10
file2.mp30:50


or other place is good, I have not idea... but it would be very good!

Thank you! :roll:
Steve
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Re: [WDX] MediaTime - sum up length of media files in dir

Post by *milo1012 »

karist wrote: 2023-11-03, 10:06 UTCBut if it possible I need a new useful feature:
When I entered a directory, the mp3 elements and the elements duration are listed.
I'm not sure if I understand your request correctly, but: you want to display the length of the content from that dir while you're INSIDE that dir, and not just outside from it (i.e. go one level up in TC to display it for that dir/folder?

I'm not sure if the wdx API makes a request for the ".." entry, but if it does, I might be able to add it. But even then it would not be quite "correct", because ".." means: everything that "resides one level up", which could be additional files and dirs, and not just the current dir at hand. But sure, as a non-default option it could be useful.

But besides the ".." entry, there is unfortunately no other place for the wdx plug-in logic. The only thing I could do is to add a "reversed" logic, i.e. add a new field for all files which says "sum up all files in the dir the current files resides in". But this would be a mess, code- and performance-wise. We already have the standard dir-based behavior for that.
TC plugins: PCREsearch and RegXtract
User avatar
karist
Junior Member
Junior Member
Posts: 8
Joined: 2023-11-03, 09:48 UTC
Location: Hungary

Re: [WDX] MediaTime - sum up length of media files in dir

Post by *karist »

Thank you your fast answer! :)

You absolute understand me! :)
The '..' row is unlogical, but as you say no other place to write that value.

Other idea: new summarize column, that all row value is the same, the sum of durations. It calculate once when entered in directory, and write its value in all rows. It is a little bit dirty solve but work.

The absolutely good will be the wdx plug-in logic would allow a value to be written to the sum row below the list after the sum file long.

Thank you!
Steve
Post Reply