XY properties: 28
=================
#LinkTarget =
#ShortcutTarget =
#JunctionTarget =
#ResolveJunctions = E:\DM\G\Gathering\1992 - Always\1.wav
#ResolveJunctionsAll = E:\DM\G\Gathering\1992 - Always\1.wav
#Label =
#Tags =
#Comment =
#HardLinks = 1
#AspectRatio =
#audio.bitdepth = 16-bit
#audio.bitrate = 1411 kBit/s
#audio.channels = 2
#audio.length = 48:21.800
#audio.samplerate = 44100 Hz
#mp3.album =
#mp3.artist =
#mp3.Comments =
#mp3.genre =
#mp3.title =
#mp3.track =
#mp3.year =
#date.created = 2019 08 18 11 52 24
#date.modified = 2019 08 18 11 52 34
#date.accessed = 2019 09 06 15 23 32
#image.dimensions =
#image.datetaken =
#version =
IDs with names & values: 11
===========================
#001 | Size: 499 881 KB
#002 | Type: WAV File
#003 | Date Modified: 2019 08 18 11 52
#004 | Date Created: 2019 08 18 11 52
#005 | Date Accessed: 2019 09 06 15 23
#006 | Attributes: A
#007 | Status: Online
#008 | Owner: Administrators
#022 | Bit Rate: 1411kbps
#033 | Audio sample rate: 44 kHz
#034 | Channels: 2 (stereo)
IDs with names but not a value: 26
==================================
#009 = Author
#010 = Title
#011 = Subject
#012 =
#013 = Pages
#014 = Comments
#015 = Copyright
#016 = Artist
#017 = Album Title
#018 = Year
#019 = Track Number
#020 = Genre
#021 = Duration
#023 = Protected
#024 = Camera Model
#025 = Date Picture Taken
#026 = Dimensions
#029 = Episode Name
#030 =
#031 =
#032 =
#035 = Company
#036 = Description
#037 = File Version
#038 = Product Name
#039 = Product Version
Unused IDs: 2
=============
#027
#028
Calculate audio playtime
Re: Calculate audio playtime
Re: Calculate audio playtime
Try this version:
One of my scripts helped you out? Please donate via Paypal
Re: Calculate audio playtime
i selected 2 wav-files:
1) 10:53.147
2) 6:24.880
v0.5 displays:
1) 10:53.147
2) 6:24.880
v0.5 displays:
Code: Select all
Total playtime: 00 288055555555556:00:17
Re: Calculate audio playtime
Interesting, if I do it with similar files, the computation is fine.
find this line:
Add one line above (indented by at least one space!):
Post the output
find this line:
Code: Select all
$start = now("msecs");
Code: Select all
text $duration; end true;
One of my scripts helped you out? Please donate via Paypal
Re: Calculate audio playtime
Add one line above
Code: Select all
text $duration; end true;
$start = now("msecs");
// Remove items which don't have a length
$duration = formatlist($duration, 'tue', '+');
0+00:10:53+00:06:24Post the output
Re: Calculate audio playtime
Looks correct. Used XY version?
One of my scripts helped you out? Please donate via Paypal
Re: Calculate audio playtime
I've just tried v19.40.0100 with two selected .wav files (06:24 + 10:53 playtime) and the v0.5 script calculates the result correctly. Sorry, I don't know what's wrong on your system.
One of my scripts helped you out? Please donate via Paypal
Re: Calculate audio playtime
highend, thank you for the attempts to help me
Re: Calculate audio playtime
jupe, thanks, it is working/displaying:a quick alternate script
Code: Select all
00:17:18
could this modification be successful?
generally, if i could choose, then the following variant would have been ideal to me:as decimal separator
Code: Select all
17 18 027
and if there are hours, minutes, seconds, ms,
then, for example, the ideal variant is:
Code: Select all
67 18 027
(kind of off-topic) i wish my version of xy could be customized so that it displayed this total duration right in status-bar,
where i have this:
Code: Select all
StatusBar3OnFile="<curname> <datem yyyy mm dd hh mm ss> <prop #audio.length> <prop #audio.bitdepth> <prop #audio.samplerate>"
Re: Calculate audio playtime
I removed my original post (but quoted some of it above), because I thought it might not work (without changes) in locales that don't use the decimal sep, but you had obviously already successfully tried it, anyway I read your requested changes and made some mods, I think something like the below script is what you want (with only minutes no hours + ms), I just did it in a quick janky way, so you may want to clean up the script a bit, but it should do what I think you are requesting.jupe wrote:I knocked up a quick alternate script If you are interested, since the inbuilt way doesn't work for you this version requires CLI version of MediaInfo, and you need to set the path in the script to it.
Code: Select all
$exe = "MediaInfo.exe";
$ms = eval(trim(runret("""$exe"" --""Inform=General;%Duration%+"" <selitems>", <curitempath>, 65001), "<crlf>+", "R"));
$secs = $ms / 1000;
$ms = substr(gettoken($secs, -1, ".") . "000",, 3);
$secs = floor($secs);
$mins = format(floor($secs / 60, "00"));
$secs = format($secs % 60, "00");
echo "$mins $secs $ms", "Total:";
Re: Calculate audio playtime
i'm not sure that i understood these words correctly(with only minutes no hours + ms)
i appreciate your attention to this topic,I just did it in a quick janky way
at a first glance:
- this version of script displays hours+minutes as minutes (which is the desired behavior)
- this version displays spaces between minutes/seconds/ms (which is the desired behavior)
- this version displays absolutely incorrect ms
Re: Calculate audio playtime
ms looks ok to me in most cases, but you could try changing the 4th line to something like this:
I was just providing a rough outline, any further changes are up to you, but with that change it should all work as requested anyway. (unless you don't use a decimal sep in your locale)
Code: Select all
$ms = regexmatches($secs, "\.") ? substr(gettoken($secs, -1, ".") . "000",, 3) : "000";
Re: Calculate audio playtime
Hi
this look interesting !
Could this script add the timing of the folder to the name of the folder ?
Thanks
this look interesting !
Could this script add the timing of the folder to the name of the folder ?
Thanks