Status bar properties statistics on select

Discussion related to "Everything" 1.5.
Post Reply
cosmito
Posts: 17
Joined: Fri Mar 21, 2025 3:20 am

Status bar properties statistics on select

Post by cosmito »

Hi,

Sorry if this was discussed before. I am using latest 1.5a

I have a search view of video files with following added property columns:
- video bit rate
- length

These properties are also displayed on the status bar when a file is highlighted.

Right now, if I select multiple files, in the status bar the following is displayed: total found items, number of items selected, total size of selected items and the filter (Video)

It would be nice if when selecting multiple files, on the status bar, some properties can be averaged or added, where it makes sense. In my case:
- averaged video bitrate of selected files
- total length of selected files
win32
Posts: 44
Joined: Fri Mar 19, 2021 11:48 am

Re: Status bar properties statistics on select

Post by win32 »

First be sure you index length in Options/indexes/properties.(Add length column/property)
Then in advanced edit the statusbar_selection_format and add sth like:
  • for selection length,

    Code: Select all

     <format-duration:$total-selection-length:>
  • and an example for avg length and bitrate of the selected files:

    Code: Select all

    #if:#total-selection-length:,#printf:"(~%s at %dkbps)",<format-duration:<eval:#total-selection-length:/$x>>,#eval:#total-selection-size:*80000/#total-selection-length:

Hope this helps!
( edit: simplified code )
Last edited by win32 on Thu Apr 10, 2025 11:29 am, edited 1 time in total.
cosmito
Posts: 17
Joined: Fri Mar 21, 2025 3:20 am

Re: Status bar properties statistics on select

Post by cosmito »

Thank you, I used the second code block (slightly modified printf output) and it works great.
But how do I also keep the default status bar info like: total items, number of selected items?
cosmito
Posts: 17
Joined: Fri Mar 21, 2025 3:20 am

Re: Status bar properties statistics on select

Post by cosmito »

One more thing: the code produces average overall bitrate value, based on a calculation of:
<total file sizes< * <0.008 (to get bits)> / <number of selected items>
This correctly gives average bitrate for the selected files for video + audio but what I am after is the "Video Bit Rate" property (already indexed), so only the bitrate for the video.
NotNull
Posts: 5961
Joined: Wed May 24, 2017 9:22 pm

Re: Status bar properties statistics on select

Post by NotNull »

cosmito wrote: Sat Mar 22, 2025 8:34 pm But how do I also keep the default status bar info like: total items, number of selected items?
The default format is

Code: Select all

statusbar_selected_item_format=$o items   |   Size: $s   |   Date Modified: $m   |   Path: $p
Put your code at the end of that.


Statusbar format
win32
Posts: 44
Joined: Fri Mar 19, 2021 11:48 am

Re: Status bar properties statistics on select

Post by win32 »

cosmito wrote: Sat Mar 22, 2025 8:51 pm but what I am after is the "Video Bit Rate" property (already indexed), so only the bitrate for the video.
Unfortunately, I think that's impossible. To my knowledge, you have access to properties of the specific item in the statusbar, but you dont have any way of accessing the aggregate sum of your selection, with the exceptions of length and size. Thats why I use file size and not a property like 'total-bit-rate'.
cosmito
Posts: 17
Joined: Fri Mar 21, 2025 3:20 am

Re: Status bar properties statistics on select

Post by cosmito »

Thank you both for your help.
cosmito
Posts: 17
Joined: Fri Mar 21, 2025 3:20 am

Re: Status bar properties statistics on select

Post by cosmito »

I tried implementing this for video bitrate: viewtopic.php?p=41868#p41868

Changed current working code (but which gives the total file bitrate average):

Code: Select all

#eval:#total-selection-size:*0.008/#eval:#format-duration:#total-selection-length:,[s]|1
...with

Code: Select all

#eval:#videobitrate:/1000/#eval:#format-duration:#total-selection-length:,[s]|1
...but it doesn't work, the bitrate value returned is 0.
win32
Posts: 44
Joined: Fri Mar 19, 2021 11:48 am

Re: Status bar properties statistics on select

Post by win32 »

As I said you cant get the aggregate sum of properties, with the exception of length. And honestly, I don't see use cases for this.
Say you have 5 vids, 4 @ 400kbps of duration of 10s and 1 at 2Mbps and duration of 2hours, what's the average of bitrates?
(you cant sum and divide...)

I think you are overthinking it. You can add video-bitrate as a column for a quick inspection of vid bitrate.
Post Reply