Updated README

This commit is contained in:
Alex Eidt 2021-12-27 13:51:54 -08:00
parent 55e0e4b15d
commit 3e4424ec3b

View file

@ -12,15 +12,6 @@ go get github.com/AlexEidt/Vidio
The `Video` struct stores data about a video file you give it. The code below shows an example of sequentially reading the frames of the given video.
```go
video := vidio.NewVideo("input.mp4")
for video.Read() {
// "frame" stores the video frame as a flattened RGB image
frame := video.framebuffer // stored as: RGBRGBRGBRGB...
// Video processing here...
}
```
```go
type Video struct {
filename string // Video Filename
@ -39,6 +30,15 @@ type Video struct {
}
```
```go
video := vidio.NewVideo("input.mp4")
for video.Read() {
// "frame" stores the video frame as a flattened RGB image
frame := video.framebuffer // stored as: RGBRGBRGBRGB...
// Video processing here...
}
```
## `Camera`
The `Camera` can read from any cameras on the device running Vidio. It takes in the stream index. On most machines the webcam device has index 0.