Comments (14)
A priori, multiple audio sources should be exposed as multiple pads on the cef demuxer. You can then perform mixing at your discretion with eg audiomixer. Can you confirm you do get multiple audio pads in your case?
from gstcefsrc.
Also for reference re pulse, that was the original design of the larger application I use this element in, as audio support hadn't yet been merged upstream at the time, but being able to switch to the new CEFAudioHandler made things decidedly simpler and easier to integrate.
Note that I wouldn't object to merging a higher-level bin that would take care of instantiating both the source and the demuxer, and perhaps expose a property to allow performing mixing of the audio streams, eg mix-audio-streams
. One could make that bin implement the GstChildProxy
interface as well, so that the user can also set the mix-matrix
property if more control is desired over how to perform audio mixing.
from gstcefsrc.
ping @thierrygayet :)
from gstcefsrc.
from gstcefsrc.
export LD_PRELOAD=/overlay/cef-gstreamer/Release/libcef.so
You need to do that when you don't use the appropriate option when building CEF / chromium yourself. The spotify builds that are used by default are built with that option, I'm afraid I don't remember how to set it however, you can probably find this in the CEF forums.
Futhermore, i have also generated the dot files used a debug and converted
to PDF.
That should let you verify how many audio pads were exposed by cefdemux, you can upload the dot files here if you want me to take a look.
In general, if you want to use this element with an arbitrary number of audio streams, I would recommend either writing a simple application around it, or implementing a wrapper bin as I suggested in my earlier comment, I'll be happy to review / upstream it :)
from gstcefsrc.
from https://magpcss.org/ceforum/viewtopic.php?f=6&t=14122:
The CEF binaries are built with tcmalloc by default. You need to either run with LD_PRELOAD=libcef.so or build CEF locally without tcmalloc. See https://bitbucket.org/chromiumembedded/cef/issues/1827 for additional details.
from gstcefsrc.
@thierrygayet you also haven't attached your html file anywhere that I can see ;)
from gstcefsrc.
yes i know but html if not a supported extension on github.
That's why i have sent them by email directly.
Here is a sample of html file :
<html>
<body style="background-color:aliceblue;">
<embed type="video/mp4" src="Comptines_et_chansons_pour_enfants.mp4" autostart="true" width="600" height="720" volume="1"/>
<embed type="video/webm" src="Volcano_Lava_Sample.webm" autostart="true" width="400" height="720" volume="0.3"/>
</body>
</html>
BR
Thierry
from gstcefsrc.
OK so with the spotify build, the video stream for "Comptines_et_chansons_pour_enfants.mp4" never starts, and the "Volcano_Lava_Sample.webm" starts but pauses immediatley, so I can't really reproduce your issue here, afaict their binaries are not necessarily built with the ffmpeg backend, didn't look further.
Regarding playback of multiple audio streams however, when using wave files things seem to work as expected:
gst-launch-1.0 audiotestsrc num-buffers=3000 ! audio/x-raw, channels=2 ! wavenc ! filesink location=sine.wav
gst-launch-1.0 audiotestsrc num-buffers=3000 wave=white-noise ! audio/x-raw, channels=2 ! wavenc ! filesink location=snow.wav
<html>
<body style="background-color:aliceblue;">
<embed autostart="true" type="audio/wav" src="sine.wav" />
<embed autostart="true" type="audio/wav" src="snow.wav" />
</body>
</html>
gst-launch-1.0 -v cefsrc url="file:///home/meh/Downloads/foo.html" ! queue ! cefdemux name=d d.video ! video/x-raw ! queue ! videoconvert ! xvimagesink d.audio_1 ! audio/x-raw ! queue ! audioconvert ! pulsesink volume=1.0 async=false d.audio_2 ! audio/x-raw ! queue ! audioconvert ! pulsesink volume=1.0 async=false
Both streams are output to the audio sinks :)
from gstcefsrc.
from gstcefsrc.
I would try to make an audio mix while gstreamer without having to go through pulse audio as I work environment server.
+1 to this, if you manage to make your use case work that way it's definitely the nicer solution :)
Closing this as I think we've come to a conclusion here, please reopen if the original issue statement (can't mix several audio sources) still gives you problems :)
from gstcefsrc.
Hi Matthew,
I had a question when there are several different audio in a web page. The last tests showed that we got two audio pads (audio_0 and audio_1).
My question, if you will answer it to continue the discussion we had, would be to know, if dynamically, it would be possible to manage on the fly, several pads.
When I mean dynamically, I mean that the proof of concept page could create different audio. So the question is whether a pipeline written in python for example could dynamically manage an additional pqd or add a module without disturbing the stream.
BR
Thierry
from gstcefsrc.
Yes, it is possible for an application written in any language to properly manage a dynamic GStreamer pipeline.
from gstcefsrc.
Indeed, this is what I have seen on this website that shows several examples in python's script:
https://github.com/MaZderMind/dynamic-gstreamer-pipelines-cookbook.git
from gstcefsrc.
Related Issues (20)
- Pipeline hangs (Windows) HOT 11
- Wayland Support HOT 1
- License HOT 3
- Sandbox HOT 6
- registering JS Callbacks using RenderProcessHandler::OnContextCreated() HOT 1
- Leaves 5 processes running after `stop` HOT 7
- Mixing audio and video with `matroskamux` causing deadlocks HOT 40
- Rare negotiation errors are happening between cefsrc and cefdemux HOT 3
- Not compiling on macOS Ventura on MacBook M1
- Broken Linux x64 build HOT 2
- Deadlock when mixing Audio and Video HOT 6
- trying to build for jetson nano HOT 21
- Cef Segmentation fault HOT 5
- Bad audio meta HOT 10
- [Q] what is the purpose of the audiotestsrc ? HOT 4
- cefsrc in headless environment using GPU HOT 8
- No video output with `gtk4paintablesink` and `clappersink` HOT 4
- Plugin files blacklisted but plugin still works HOT 2
- Inconsistant caps
- Ideas on making src element only generate frames when a fresh buffer is created HOT 3
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 gstcefsrc.