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
Status bar properties statistics on select
Re: Status bar properties statistics on select
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:
Hope this helps!
( edit: simplified code )
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.
Re: Status bar properties statistics on select
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?
But how do I also keep the default status bar info like: total items, number of selected items?
Re: Status bar properties statistics on select
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.
<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.
Re: Status bar properties statistics on select
The default format iscosmito 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?
Code: Select all
statusbar_selected_item_format=$o items | Size: $s | Date Modified: $m | Path: $p
Statusbar format
Re: Status bar properties statistics on select
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 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.
Re: Status bar properties statistics on select
Thank you both for your help.
Re: Status bar properties statistics on select
I tried implementing this for video bitrate: viewtopic.php?p=41868#p41868
Changed current working code (but which gives the total file bitrate average):
...with
...but it doesn't work, the bitrate value returned is 0.
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]|1Code: Select all
#eval:#videobitrate:/1000/#eval:#format-duration:#total-selection-length:,[s]|1Re: Status bar properties statistics on select
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.
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.