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.