Giter Club home page Giter Club logo

go-mjpeg's Introduction

go-mjpeg

Motion Jpeg Encoder/Decoder

Installation

go get github.com/mattn/go-mjpeg

License

MIT

Author

Yasuhiro Matsumoto (a.k.a. mattn)

go-mjpeg's People

Contributors

danile71 avatar dikshant avatar mattn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

go-mjpeg's Issues

Performance of JPEG decode/re-encode

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!

Add documentation for NewDecoder

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!

License?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.