htypeof "video" and set
sample_compressionto the format of the video.
hub.readcan also read videos from
s3://urls given you have the credentials to access them. Examples include:
.timestampattribute after indexing it just like in the previous section:
ds.videos[index].data()will return a dict with keys 'frames' and 'timestamps' with the corresponding numpy arrays as values. Indexing works the same way as it does with
.visualize()on your dataset in a jupyter or colab notebook.
link[video]can be used to store links to videos. All of the above features are supported for linked videos.
gdrive://links are accepted.
managedset to True to add the credentials to your dataset. Multiple credentials can be added.
hub.link, simply mention which credentials to use through the
hub://datasets, you can use credentials set in your environment by mentioning
.numpy(). Instead, they are streamed from storage. Only the required packets are decompressed and converted to numpy arrays based on how the tensor is indexed.
.play()also streams videos from storage.