GithubHelp home page GithubHelp logo

Comments (9)

at-wat avatar at-wat commented on August 19, 2024 2

@a1xon could you open a new issue with detailed informations of your configuration?
(e.g. including Go version, what kind of camera do you use, changes in sample code if something changed, etc)

from mediadevices.

lherman-cs avatar lherman-cs commented on August 19, 2024

This has been my goal. The original thought was to bundle everything statically and reduce the number of dependencies that you need to install (basically I want people to be able to just get the library by go get and just build their code with it, no need apt-get install or anything like that). My aggressive goal is to actually write these codecs in pure Go, but obviously we don't have the time for that yet... ^^

From my research in the past, we can build the libraries statically for every OS and architecture, and link them conditionally in Go (which is somewhat what we currently have, we just need to extend more support to other OS and arch).

In fact, this approach has been done before in a project called, mysterium:

Honestly, the main problem has been getting hardware with different OSes and arch to compile it statically. I saw some articles that you could use Docker to get the proper toolchain for cross-compilation. But, I'm not sure how we can do cross-OS compilations since Windows and Mac toolchain can't be used in Linux AFAIK.

Also, it seems that making a static build with cgo might become easier in the future with this proposal, golang/go#26492. I really wonder that if it's going to be possible to cross-compile with cgo in the future... It would be pretty awesome!

from mediadevices.

at-wat avatar at-wat commented on August 19, 2024

I agree that bundling everything statically is useful.
However, static link is sometimes problematic due to their licenses (currently, linked libs excepting libgcc are all BSD-like, so it's OK) and binary size when building multiple executables. It would be better to be selectable via -tags or something.

from mediadevices.

lherman-cs avatar lherman-cs commented on August 19, 2024

That makes sense. But, it seems like OpenH264 doesn't distribute their dynamic version to package managers... I'm having a hard time to find one for Ubuntu.

from mediadevices.

at-wat avatar at-wat commented on August 19, 2024

Hmm, it seems that Cisco's AVC/H.264 Patent Portfolio is only applied to their precompiled binary.

http://www.openh264.org/faq.html
http://www.openh264.org/BINARY_LICENSE.txt

The binary form of this Software is distributed by Cisco under the AVC/H.264 Patent Portfolio License from MPEG LA, and is subject to the following requirements, which may or may not be applicable to your use of this software:

from mediadevices.

lherman-cs avatar lherman-cs commented on August 19, 2024

Ah, that explains why we can't find the dynamic library.

from mediadevices.

a1xon avatar a1xon commented on August 19, 2024

So using mediadevices will not be possible on an RPi? :\

from mediadevices.

at-wat avatar at-wat commented on August 19, 2024

@a1xon You can use system wide installed openh264 library instead of using bundled one by specifying -tags dynamic.

from mediadevices.

a1xon avatar a1xon commented on August 19, 2024

@a1xon You can use system wide installed openh264 library instead of using bundled one by specifying -tags dynamic.

Tried that with the simple example on the RPi 4 (2GB) and I'm getting Failed to map request buffers: cannot allocate memory for GetUserMedia(). I also rebuild openh264 and replaced the lib/libopenh264.x86_64-linux.a file.

from mediadevices.

Related Issues (20)

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.