How can I insert the value of the Total Bitrate column into the Info Tip for Movie Type?

Hi, I have a question as follows:
In File Explorer's default Details file, I see it displays the Total bitrate column as shown below.

With Opus, I currently only see the Data rate column displayed. I also want to add the same Total bitrate column. Can I insert that column for Movie Type because I searched in the Insert Field and didn't see this column? Thank you very much

In v13, check Total Bitrate in the Preferences...

... then insert it

In v12, do the same with a script column like here.

1 Like

Thank you for your support, I tried it and the total birate data is already displayed. But there is a problem: my value is displayed as having an extra sign, for example: the value is 16031 but it is displayed as 16,031 as shown below.

This is my script code

function OnInit(initData) {
    initData.name = 'TotalBitrate';
    initData.version = '12.';
    initData.url = 'https://resource.dopus.com/t/is-there-an-opus-equivalent-to-the-date-column-as-implemented-in-win10-file-explorer/40834';
    initData.desc = 'Retrieves System.Video.TotalBitrate from the Shell (File Explorer\'s "TotalBitrate")';
    initData.default_enable = true;
    initData.min_version = '12.0';
}

function OnAddColumns(addColData) {
    var col = addColData.AddColumn();
    col.name = 'TotalBitrate';
    col.label = 'TotalBitrate';
    col.header = 'TotalBitrate';
    col.justify = 'left';
    col.type = 'number';
    col.autogroup = true;
    col.method = 'OnColumn';
}

function OnColumn(scriptColData) {
    var bytes = scriptColData.item.ShellProp('System.Video.TotalBitrate');
    var kbps = bytes / 1000;
    scriptColData.value = kbps;
}

And here is the script code when I try to remove the sign, but when I use this code, the value of total bitrate cannot be displayed.

function OnInit(initData) {
    initData.name = 'TotalBitrate';
    initData.version = '2022-03-19';
    initData.url = 'https://resource.dopus.com/t/is-there-an-opus-equivalent-to-the-date-column-as-implemented-in-win10-file-explorer/40834';
    initData.desc = 'Retrieves System.Video.TotalBitrate from the Shell (File Explorer\'s "TotalBitrate")';
    initData.default_enable = true;
    initData.min_version = '12.0';
}

function OnAddColumns(addColData) {
    var col = addColData.AddColumn();
    col.name = 'TotalBitrate';
    col.label = 'TotalBitrate';
    col.header = 'TotalBitrate';
    col.justify = 'left';
    col.type = 'number';
    col.autogroup = true;
    col.method = 'OnColumn';
}

function OnColumn(scriptColData) {
    var bytes = scriptColData.item.ShellProp('System.Video.TotalBitrate');
    var kbps = bytes / 1000;
    kbps = kbps.replace (/,/g, '');
    scriptColData.value = kbps;
}

Could you please help me fix my wrong code? Thank you very much

Try

kbps = String(kbps).replace (/,/g, '');
1 Like

Thanks for your suggestion. But I found out the problem was col.type = 'number' so I changed it to text. And I found it worked exactly the way I wanted it to. Thank you very much. Here is my complete code if anyone needs it, they can use it

function OnInit(initData) {
    initData.name = 'TotalBitrate';
    initData.version = '12.';
    initData.url = 'https://resource.dopus.com/t/is-there-an-opus-equivalent-to-the-date-column-as-implemented-in-win10-file-explorer/40834';
    initData.desc = 'Retrieves System.Video.TotalBitrate from the Shell (File Explorer\'s "TotalBitrate")';
    initData.default_enable = true;
    initData.min_version = '12.0';
}

function OnAddColumns(addColData) {
    var col = addColData.AddColumn();
    col.name = 'TotalBitrate';
    col.label = 'TotalBitrate';
    col.header = 'TotalBitrate';
    col.justify = 'left';
    col.type = 'text';
    col.autogroup = true;
    col.method = 'OnColumn';
}

function OnColumn(scriptColData) {
    var bytes = scriptColData.item.ShellProp('System.Video.TotalBitrate');
    var kbps = bytes / 1000;
    scriptColData.value = Math.floor(kbps)+ ' kbps';
}