GP SoftwareTwitter
Opus FAQsManualCommandsObjects

How to display total duration of a video/audio folder

Hi all, hi Leo,

I was wondering whether it is possible to display the total length (duration) of a folder containing video and/or audio files.

Many thanks in advance.

The {tmp3} status bar code will show total media duration for any files Opus knows how to get the duration from. You can add it under Preferences / Display / Status Bar. The menu there gives you a list of the other codes.

Having it in the status bar will cause extra disk access when you change folders, which you may not always want (especially on network drives or other slow media). In my own status bar, I make it something I can turn on and off as needed:

// If the folder tab variable "ShowExtraInfo" is set,
//  the line below shows selected/total media duration:
{h!{var:tab:ShowExtraInfo}!{smp3}} {smp3} /{h!}{h!{var:tab:ShowExtraInfo}!{tmp3}} {tmp3} {h!}

I then have this command in the Lister Context menu, so I can right-click the status bar (or file display background; same menu) to toggle the information for the current tab:

@toggle:if $tab:ShowExtraInfo

@set tab:ShowExtraInfo
@set tab:ShowExtraInfo=on

1 Like

Thanks, Leo. It works just fine.

However suppose I would like the total duration info for each subfolder to be displayed in Duration column inside a tab. Would it be possible to get it displayed there?
Many thanks in advance.