Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

60 seconds segment length issue #16

Open
MarcoFilosi opened this issue Nov 24, 2011 · 0 comments
Open

60 seconds segment length issue #16

MarcoFilosi opened this issue Nov 24, 2011 · 0 comments
Assignees

Comments

@MarcoFilosi
Copy link

Hi all,

I'm trying to understand the source code of fp.py file and I think you are using not consistent formulas to compute segments of 60 seconds in time units.

In the first case, we can retrieve the sixty seconds segment length by multiplying 60 seconds with 43.45 as shown in line 134:

cut_code_string_length(code_string)
    """ Remove all codes from a codestring that are > 60 seconds in length.
        Because we can only match 60 sec, everything else is unnecessary """
    sixty_seconds = int(60.0 * 43.45 + first_timestamp)

But in the second case (see line 482) we use another computation to get the same parameter (segmentlength) :

    def split_codes(fp):
    """ Split a codestring into a list of codestrings. Each string contains
        at most 60 seconds of codes, and codes overlap every 30 seconds. Given a
        track id, return track ids of the form trid-0, trid-1, trid-2, etc. """

    # Convert seconds into time units
    segmentlength = 60 * 1000.0 / 43.45

Maybe I am wrong but I think the second formula is not correct. The right formula should be:

    segmentlength = 60 * 43.45

If I am wrong please explain me the meaning of the second formula, otherwise please fix this issue.
Thank you very much.

@ghost ghost assigned alnesbit Feb 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants