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

DateRangeHLSStream function outputs None #10

Open
pmdnhd opened this issue Feb 17, 2023 · 0 comments
Open

DateRangeHLSStream function outputs None #10

pmdnhd opened this issue Feb 17, 2023 · 0 comments

Comments

@pmdnhd
Copy link

pmdnhd commented Feb 17, 2023

Hi @valentina-s
Thank you for the notebooks and this tool to download Orcasound audio files, they help a lot!

For several date ranges, the DateRangeHLSStream.get_next_clip function outputs None but it is able to find 2 folders for the date range. It enters the if condition if segment_end_index > num_total_segments directly and exit the function.

Sometimes, I just have to retry multiple times before being able to download files but other times it just does not want to download anything...

I was trying to see in your notebook notebooks/ReadOrcasoundCatalogue.ipynb if there was any file in the buckets and there are. I am able to download the files using @scottveirs bash script with the specific buckets identified by the DateRangeHLSStream instance.

Here is one date range that do not work either locally or in Colab

from datetime import datetime
from orca_hls_utils import DateRangeHLSStream

if __name__ == '__main__':
    stream_base = 'https://s3-us-west-2.amazonaws.com/streaming-orcasound-net/rpi_orcasound_lab'
    polling_interval = 2 * 3600 # [s] time period to extract from start_unix_time

    start_unix_time = 1660093200 # Aug 9 22
    end_unix_time = start_unix_time + polling_interval
    wav_dir = './'

    stream = DateRangeHLSStream.DateRangeHLSStream(stream_base=stream_base,
                                polling_interval=polling_interval,
                                start_unix_time=start_unix_time,
                                # start_unix_time=annot_unix_time,
                                end_unix_time=end_unix_time,
                                wav_dir=wav_dir,
                                overwrite_output=True,
                                real_time=False)

    stream.get_next_clip()

Please let me know if you run into the issue with this snippet and any insights would be appreciated,

Thank you

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

1 participant