From 3e4424ec3b951f1309c15805566a7248c6d2de6b Mon Sep 17 00:00:00 2001 From: Alex Eidt Date: Mon, 27 Dec 2021 13:51:54 -0800 Subject: [PATCH] Updated README --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index fdb3831..40afd7c 100644 --- a/README.md +++ b/README.md @@ -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.