dmlc / dmlc/decord

Can decord provide random access to video frames in an URL?

Open
#199 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.5k
Forks
232
PR merge metrics
No merged PRs in 30d

Description

## Use case:
I have a video stored in the web and the URL to it. Now I want to download specific frames of it (e.g. the 10th and 100th). Can I access these frames using decord without needing to download the full video?

Example URL: [example](https://mediandr-a.akamaihd.net/progressive/2018/0912/TV-20180912-1628-0000.ln.mp4)

## Benchmark code
```
# creating the video reader takes 30s to download the 100MB video
vr = decord.VideoReader("https://mediandr-a.akamaihd.net/progressive/2018/0912/TV-20180912-1628-0000.ln.mp4")
# The access itself is super fast
for timestamp in range(0,1000,100):
frame = vr[timestamp]
```

I rather want the video reader to be created instantly, even if the access itself takes longer as it hast to download the individual frames.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.