8000 GitHub - cleroux/go-rpicamvid: Go (Golang) wrapper for rpicam-vid
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

cleroux/go-rpicamvid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-rpicamvid

Go (Golang) wrapper for rpicam-vid (Raspberry Pi Video Capture Application) with stream demultiplexer and HTTP server.

image

The demultiplexer allows multiple concurrent stream consumers from a single rpicam-vid process.

This implementation produces a MJPEG image stream.

Build

git clone https://github.com/cleroux/go-rpicamvid.git
cd go-rpicamvid
make

Run

./rpicamvid-server

Open video stream in browser at http://localhost:8080

Example Code

stream, err := r.Start()
if err != nil {
	fmt.Printf("Failed to start camera: %v\n", err)
	return
}
defer stream.Close()

for {
	jpegBytes, err := stream.GetFrame()
	if err != nil {
		fmt.Printf("Failed to get camera frame: %v\n", err)
		continue
	}
	// TODO: Do something with the JPEG frame
}

See cmd/server/main.go for a complete example.

About

Go (Golang) wrapper for rpicam-vid

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0