Motion Jpeg Encoder/Decoder
go get github.com/mattn/go-mjpeg
MIT
Yasuhiro Matsumoto (a.k.a. mattn)
Motion JPEG Decoder
License: MIT License
I'm having a little trouble with the performance of the library - my use-case is more-or-less exactly as [_example/mjpegproxy.go] - I'm reading several MJPEG streams and re-serving them. Looking at the code I notice that it effectively reads the JPEG bytes from each part, decodes that into an image.Image, then turns that image.Image back into bytes, which seems very inefficient?
I've tried skipping the JPEG decode -> encode and just writing the bytes from the part straight to the stream, but the output comes out very broken. I'd love to find a way to achieve this without needing the decode/encode step as I'm finding that's putting a lot of pressure on the CPU with multiple streams - I'm seeing it take on average between 50ms and 80ms per part, which isn't great for a 25fps stream.
I'll open a PR if I figure out a way to handle this, but otherwise I'd love to know what the decode->encode is doing under the hood, because it's clearly necessary!
Seems I can use this package to decode Motion-JPEG from Raspberry Pi V4L2, but what value should I send to second argument boundary
? Will be good to have it in func docs. Thanks!
I don't see a license here, which means I can't use this for commercial work. If it's alright with you, I'd prefer MIT, Apache-2.0, BSD or some other liberal license.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.