KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
encoded-video
★ 13
Open GitHub ↗
Utilities for working with videos
Download README (.md)
Explore Similar Repositories
openmax
:
No description available.
Sitegeist.LostInTranslation
:
Automatic Translations for Neos via DeeplApi
PPLCNet2PyTorch
:
尝试将PP-LCNet转为PyTorch版本,并测试相关指标
Th17_single_cell
:
No description available.
vmrp.github.io
:
vmrp网页版
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
encoded-video
?
Download (.md)
# encoded-video <a href="https://colab.research.google.com/github/nateraw/encoded-video/blob/main/examples/encoded_video_demo.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> Utilities for serializing/deserializing videos w/ `pyav` and `numpy`. ## Purpose 1. Have a helpful API for working with videos 2. Liberate myself from relying on `torch` or `tensorflow` to do the above 3. Serialize/deserialize videos without writing directly to file (helpful for sending/recieving videos over APIs) ## Acknowledgments This is more or less a `torch`-less version of `EncodedVideo` from [`pytorchvideo`](https://github.com/facebookresearch/pytorchvideo). ## Setup ``` pip install encoded-video ``` ## Usage ```python import numpy as np from encoded_video import bytes_to_video, read_video, video_to_bytes vid = read_video('archery.mp4') video_arr = vid['video'] # (T, H, W, C) audio_arr = vid['audio'] # (S,) out_bytes = video_to_bytes( video_arr, fps=30, audio_array=np.expand_dims(audio_arr, 0), audio_fps=vid['audio_fps'], audio_codec='aac' ) restored_video = bytes_to_video(out_bytes) ```