Add video feature
See original GitHub issueFeature request
Add a Video
feature to the library so folks can include videos in their datasets.
Motivation
Being able to load Video data would be quite helpful. However, there are some challenges when it comes to videos:
- Videos, unlike images, can end up being extremely large files
- Often times when training video models, you need to do some very specific sampling. Videos might end up needing to be broken down into X number of clips used for training/inference
- Videos have an additional audio stream, which must be accounted for
- The feature needs to be able to encode/decode videos (with right video settings) from bytes.
Your contribution
I did work on this a while back in this (now closed) PR. It used a library I made called encoded_video, which is basically the utils from pytorchvideo, but without the torch
dep. It included the ability to read/write from bytes, as we need to do here. We don’t want to be using a sketchy library that I made as a dependency in this repo, though.
Would love to use this issue as a place to:
- brainstorm ideas on how to do this right
- list ways/examples to work around it for now
Issue Analytics
- State:
- Created 10 months ago
- Reactions:3
- Comments:7 (6 by maintainers)
Top Results From Across the Web
How To Add A Featured Video on Your Facebook Page
1. Navigate to your video page by clicking on the videos tab on your page. · 2. Click on the “Choose Video” button...
Read more >Add features to your video in FMV—Imagery Workflows
Walk through a tutorial on how to add features to your video using FMV.
Read more >How to Feature a Video on Facebook - SlideShare
Facebook has released a feature allowing Facebook Page Managers the option to feature a video on their Facebook Page. This guided tutorial takes...
Read more >How to Add Featured Video Thumbnails in WordPress
Instead, scroll to the 'Embed Videos' section. This is where you will find settings for any videos you embed from third-party video platforms ......
Read more >Upload YouTube videos - Android - Google Support
Upload videos · Open the YouTube app . · Tap Create "" and then Upload a video. · Select the file you'd like...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@NielsRogge @rwightman may have additional requirements regarding this feature.
When adding a new (decodable) type, the hardest part is choosing the right decoding library. What I mean by “right” here is that it has all the features we need and is easy to install (with GPU support?).
Some candidates/options:
decord
: no longer maintained, not trivial to install with GPU supportpyAV
: used for CPU decoding intorchvision
, GPU decoding not supported if I’m not mistaken, otherwise the best candidate probablyvideo_reader
: used for GPU decoding intorchvision
, depends on `torch’ffmpeg
for video decoding under the hoodAnd the last resort is building our own library, which is the most flexible solution but also requires the most work.
PS: I’m adding a link to an article that compares various video decoding libraries: https://towardsdatascience.com/lightning-fast-video-reading-in-python-c1438771c4e6
For standalone usage, decoding on GPU could be ideal but isn’t async processing of inputs on CPUs while letting the accelerator busy for training the de-facto? Of course, I am aware of other advanced mechanisms such as CPU offloading, but I think my point is conveyed.