Comments (9)
@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.
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:
- Blog post specifically about this, https://medium.com/mysterium-network/golang-c-interoperability-caf0ba9f7bf3
- The source codes, https://github.com/mysteriumnetwork/go-openvpn/tree/master/openvpn3
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.
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.
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.
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.
Ah, that explains why we can't find the dynamic library.
from mediadevices.
So using mediadevices will not be possible on an RPi? :\
from mediadevices.
@a1xon You can use system wide installed openh264 library instead of using bundled one by specifying -tags dynamic
.
from mediadevices.
@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)
- Compile error when using `codec/opus` in Ubuntu 22.04
- What is wrong with the C interface for opus opus_encoder_create ? HOT 2
- Closing media track causes panic
- Colour difference in generated video stream HOT 1
- How does screen capture work on Windows vs Linux? HOT 2
- ForceKeyFrame HOT 3
- Failed to start streaming: invalid argument HOT 5
- go build linux error HOT 3
- Add pion/.goassets
- GCC problem on Windows 10 HOT 1
- Display mouse cursor HOT 1
- Video not showing in video element in latest versions of chrome. HOT 5
- why does opening dev console in http example crash the server?
- rtp example problems
- Distorted audio capture on linux. HOT 5
- failed to find the best driver that fits the constraints to open usb camera HOT 1
- Multiple display for webcam device HOT 2
- use mediadevices.GetUserMedia() failed. err: failed to open device: failed to connect filters HOT 2
- jetson agx xavier ubuntu20.04 fail run HOT 2
- webrtc demo mic Sound tearing sensation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediadevices.