Hi there,
I'd like to have AniDB derive the episode lengths from the new "file length" entry you added today.
I'd love to see how long an episode is everywhere and even I was to lazy to add all those episode lengths back last year
If the file is more than 10% longer than a certain percentage of all files then the file most likely is a double episode and that could be another indicator for the future or whatever
Build yourself a nice algorithm... maybe if 80% of all the files are withing a 1 or 2 minute range caluclate the average of those 80% of files and use that as the episode length...
Hmm... what would be a nice algorithm? Take file length of ep 1 and substract the length of file 2. Put in array[0]. Substract length 3 from length 2 and put in array[1] ... upto n files. once done go through array and take every value from -1 ot 1 (minutes) and add them all up to $lengths while $i++ for every file within -1 to 1. $eplength = $lengths devided by $i
Or something like that.
1st run: do it for all episodes and put all EP IDs with lengths +/- more than 2 minutes into a file to check later (sorta creqs).
daily run: only for episodes that have a length of 0 or over 150 (which is close to impossible, no movie is that long.
Just a thought
Auto-Generate Episode lengths [tracked]
Moderator: AniDB
True, but Skywalka is talking about the per-file entry for the length exp recently added (- which now luckily takes the exact time, and not just rounded to full minutes ^^)rowaasr13 wrote:Not possible, IMHO, because compression and container overheads do not allow you to compute ep.
And as always: Approx Len instead of just Len - a thread in which something similar has been suggested already *eg*AniDb Changes; Posted: Tue Oct 19, 2004 wrote:- added new "length" data value for files (aom 0.6 will auto creq those)
EDIT:
Since I'm being evil already, let's take a look at
Let's say l(i) is the length of episode i (in seconds) and we have a total of n episodes. Your first step means to calculate some d(i)=l(i) - l(i+1) with i in 1,...,n-1. Then, the total is calculated as (sum from 1 to n-1 of d(i)) / n.Skywalka wrote:Hmm... what would be a nice algorithm? Take file length of ep 1 and substract the length of file 2. Put in array[0]. Substract length 3 from length 2 and put in array[1] ... upto n files. once done go through array and take every value from -1 ot 1 (minutes) and add them all up to $lengths while $i++ for every file within -1 to 1. $eplength = $lengths devided by $i
With d(i) = l(i) - l(i+1), we get: (sum from 1 to n-1 of (l(i) - l(i+1))) / n.
Explicitly: ((l(1) - l(2)) + (l(2) - l(3) + ... + (l(n-1) - l(n))) / n
Which is the same as: (l(1) - l(n)) / n.
... which won't work