In Standard rename of course i can use video tags like this:
{picwidth}
{picheight}
{fourcc}
{duration}
but i want to rename my files in JScript, because i want to calculate the duration time in minutes, so if the movie playtime is 1h 20min i want output 80min...
This will get you the duration in seconds within a rename script, displaying it as script output without changing the files:
function OnGetNewName(getNewNameData)
{
var md = getNewNameData.item.metadata;
var duration = null;
if (md == "audio")
duration = md.audio.mp3songlength;
else if (md == "video")
duration = md.video.duration;
DOpus.Output(duration);
}
It's returned as a number, so you can divide by 60 to get minutes. (You might want to add more error checking, of course! e.g. If the duration is unknown.)