Urgent help needed: how to display time duration of video files in the file list

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
CPKC
Junior Member
Junior Member
Posts: 4
Joined: 2022-10-28, 12:49 UTC

Urgent help needed: how to display time duration of video files in the file list

Post by *CPKC »

greetings to all, I have a question, I would like to enter time duration in the list of video files, how can this be done automatically?
I have a lot of video files, thay all have name but i need to add duration of every file in the name, how can i add it for all of them automaticly?

I need to automatically add duration in name in multi rename tool, is it possible to make something like that? i put the name, counter and i need a duration....please help!!!
Last edited by CPKC on 2022-10-29, 11:56 UTC, edited 3 times in total.
User avatar
white
Power Member
Power Member
Posts: 4622
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: URGENT HELP

Post by *white »

Moderator message from: white » 2022-10-28, 13:46 UTC

Reminder of the forum rules:
Fourm rules wrote: 9.) Use a title that describes the content of your post. Don't use all caps or special characters to draw attention.
Please edit your post and change the subject of your post.

Suggestion:
Urgent help needed: how to display time duration of video files in the file list

Edit:
Thank you CPKC for changing the subject.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Urgent help needed: how to display time duration of video files in the file list

Post by *ghisler(Author) »

You can use custom columns with a plugin like TcMediaInfo:
http://totalcmd.net/plugring/tcmediainfo.html
Author of Total Commander
https://www.ghisler.com
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Urgent help needed: how to display time duration of video files in the file list

Post by *beb »

CPKC wrote: 2022-10-28, 13:44 UTC ...I need to automatically add duration in name in multi rename tool, is it possible to make something like that? i put the name, counter and i need a duration...
There are three MediaInfo-ish plugins suitable for your task at the first approach:
MediaInfo: https://totalcmd.net/plugring/mediainfo64.html
TCMediaInfo: http://totalcmd.net/plugring/tcmediainfo.html
MediaInfoWDX: http://www.totalcmd.net/plugring/MediaInfoWDX.html

If I understand correctly you need to get such a naming pattern: "name_counter_duration.ext"
So, at first, a plugin of our choice has to output a duration value and then do it in a suitable format.
In its turn, there are a few duration formats available in each plugin.
The most common is "(h)h:mm:ss", but it doesn't fit our needs because of Windows file-naming limitations, and at least implies extra steps in renaming.
Therefore, rather, we would prefer something like "hhmmss" format instead from the beginning.

Let's consider each plugin option:
MediaInfoWDX does not output "hhmmss" out of the box, and I even don't know how to make a custom configuration for that.
TCMediaInfo can output "hhmmss" only under custom configuration, not out of the box.
MediaInfo can output "hhmmss" right out of the box.

Thus, the first approach plugin choice is obvious and it's MediaInfo.

Hence, we are going step by step as follows:
1. Downloading and installing MediaInfo plugin https://totalcmd.net/plugring/mediainfo64.html
2. Going to the Multi-Rename tool as usual
3. Applying the following Rename-mask:

Code: Select all

[N]_[C]_[=mediainfo.duration.hms]
4. That's it

Since your urgent need is satisfied you could return back to the plugin choice considering other criteria if needed.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
CPKC
Junior Member
Junior Member
Posts: 4
Joined: 2022-10-28, 12:49 UTC

Re: Urgent help needed: how to display time duration of video files in the file list

Post by *CPKC »

Thanx beb, hope that this will help me, only one more ask, i am not familiar with plugins and i really need step by step explain how to install it...thanks in advance
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Urgent help needed: how to display time duration of video files in the file list

Post by *beb »

CPKC wrote: 2022-11-01, 15:36 UTC ...i really need step by step explain how to install it...
Oh, that becomes a piece of cake these days.

As soon as you download the plugin archive (wdx_mediainfo_22.03.rar in this instance) just enter the archive within TotalCommander.

Upon entering, Total Commander detects it's a plugin archive and asks you if you want to install the plugin.

All you need is to click "Yes" and "Ok" a couple of times upon the Total Commander requests.

As soon as the installation is over (which is a matter of a couple of seconds) you are welcome to go to the Multi-Rename Tool and do your things.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
Fla$her
Power Member
Power Member
Posts: 2309
Joined: 2020-01-18, 04:03 UTC

Re: Urgent help needed: how to display time duration of video files in the file list

Post by *Fla$her »

beb wrote: 2022-10-31, 14:03 UTC The most common is "(h)h:mm:ss", but it doesn't fit our needs because of Windows file-naming limitations, and at least implies extra steps in renaming.
No steps are required, because MRT automatically changes colons into dots. So you can use [=tcmediainfo.Duration] without any problems.
However, it's elementary to get rid of the dot. It's enough to specify a dot in the "Search for:" field.
Overquoting is evil! 👎
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Urgent help needed: how to display time duration of video files in the file list

Post by *beb »

Fla$her wrote: 2022-11-02, 03:49 UTC No steps are required, because MRT automatically changes colons into dots. So you can use [=tcmediainfo.Duration] without any problems.
However, it's elementary to get rid of the dot. It's enough to specify a dot in the "Search for:" field.
Ok. Applying [=tcmediainfo.Duration] I can see those dots in names.
Let's say I didn't like it (and I actually didn't) so I would need to get rid of it.
Then I input a dot in the search field to replace it with something...
Nice, but now I see all my extensions are gone.
So I need to rearrange my Rename mask to counter that and keep my extensions alive.

Yes, that is namely what I called extra steps.

Luckily, I have all those plugins installed and been regularly using all of them.
That's why it didn't take much of my time to do some tests and come to a conclusion on what plugin would be a better option from my point of view for a rookie user to begin with.

Of course, as soon as the OP understands how it works, sees the results, comes to the idea that they prefer another time format, and asks some other questions, -- we would try to advise a few different tricks.

Cheers
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
Fla$her
Power Member
Power Member
Posts: 2309
Joined: 2020-01-18, 04:03 UTC

Re: Urgent help needed: how to display time duration of video files in the file list

Post by *Fla$her »

2beb
Don't you think that if there is no flag on [E], the last dot should be ignored? That is, it's a bug.
Overquoting is evil! 👎
CPKC
Junior Member
Junior Member
Posts: 4
Joined: 2022-10-28, 12:49 UTC

Re: Urgent help needed: how to display time duration of video files in the file list

Post by *CPKC »

GREAT.....Thanks guys...managed to fix it, it works like a charm
added tcmediainfo in it, then in search for i put a dot, in replace with i put : and just removed replace also in file extractor boxv for E
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Urgent help needed: how to display time duration of video files in the file list

Post by *beb »

2CPKC, glad to here that.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
Fla$her
Power Member
Power Member
Posts: 2309
Joined: 2020-01-18, 04:03 UTC

Re: Urgent help needed: how to display time duration of video files in the file list

Post by *Fla$her »

CPKC wrote: 2022-11-03, 14:03 UTCin replace with i put :
What for? There will be an error when trying to rename.
Overquoting is evil! 👎
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Re: Urgent help needed: how to display time duration of video files in the file list

Post by *solid »

You can use just hms, without the colons, it will not write dots at all.
At least mediainfo(wdx) supports this syntax.
CPKC
Junior Member
Junior Member
Posts: 4
Joined: 2022-10-28, 12:49 UTC

Re: Urgent help needed: how to display time duration of video files in the file list

Post by *CPKC »

GREAT....THANKS FRENDS !!!!!!!
Post Reply