Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ggreco/hudl-video-test
https://github.com/ggreco/hudl-video-test
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ggreco/hudl-video-test
- Owner: ggreco
- Created: 2020-05-08T13:00:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T16:56:31.000Z (almost 2 years ago)
- Last Synced: 2023-03-24T07:57:05.631Z (almost 2 years ago)
- Language: C++
- Size: 63.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node Video native module
This module allows a node or electron application to decode audio/video natively with frame accurate precision.
## Available APIs
### load
Signature: boolean load(string filename)
Load a local or remote (rtsp/http/https...) videofile. Most formats are supported.
### start
Signature: boolean start()
Start buffering video.
### frame
Signature: object frame([integer wait])
Get a YUV frame object from the video, a file must be loaded and the decoder should have been started.
object frame has the following properties:
width - frame width
height - frame height
pts - actual presentation timestamp, in seconds.
lum_data/u_data/v_data - node buffers containing the actual frame data (not copied, shared with the c++ core)### rgb_frame
Signature: object rgb_frame([integer wait])
Get a RGB frame object from the video, a file must be loaded and the decoder should have been started.
object frame has the following properties:
width - frame width
height - frame height
pts - actual presentation timestamp, in seconds.
data - node buffers containing the actual frame data (not copied, shared with the c++ core) in BGR format (1 byte per component, no alpha)### next
Signature: number next()
Get the pts of the next frame.
### eof
Signature: boolean eof()
Check if the file decoding is ended (and all the frames have been decoded)
### seek
Signature: boolean seek(number position)
Seek to a given PTS, in seconds.
### length
Signature: boolean length()
Get the total length of the loaded video (in seconds).
### get_direction/set_direction
Signature: string get_direction()
boolean set_direction(string)Get and the set the playback direction, you can set: forward/backward, values that can be returned from get_direction() are forward/backward/none.