Calculating video duration in minutes
I would like to include the duration of a video in minutes in its title.
However, I have only found the following option:
<Duration Hour><Duration Min>
Result, for example: 0235
Is it possible to convert this into minutes, which could look something like this:
<Duration Hour>*60+<Duration Min>
Result: 155
Kind regards
Manniclick
However, I have only found the following option:
<Duration Hour><Duration Min>
Result, for example: 0235
Is it possible to convert this into minutes, which could look something like this:
<Duration Hour>*60+<Duration Min>
Result: 155
Kind regards
Manniclick
Reply to #1:
The <Duration Min> cannot be used since it only returns the minutes part, not the total number of minutes. I don't think there is a tag to be used as of right now, but you can do it in the script method. Like this:
return Math.round(item.Duration / 60);
If you want to append it to the existing name, you can do it like this:
return item.newBasename + Math.round(item.Duration / 60);
The <Duration Min> cannot be used since it only returns the minutes part, not the total number of minutes. I don't think there is a tag to be used as of right now, but you can do it in the script method. Like this:
return Math.round(item.Duration / 60);
If you want to append it to the existing name, you can do it like this:
return item.newBasename + Math.round(item.Duration / 60);