Open attac-t opened 3 years ago
Hi Attac-t,
Thanks for reaching out. As of now, there are no immediate plans to support audio for screen capturing.
But Having said that, if there are more requests/upvotes to enables the audio feature, I can prioritize it.
Please, priority it!
+1
@prasanaworld at a high level what are the steps needed to achieve this?
Hey @ScalaWilliam,
Need a setup listener to listen for audio stream using chrome-dev getRealTimeData method and combine the audio stream with video stream using FFmpeg library.
The problem here is the Audio API of the chrome-dev tool is still under the experimental stage, So it is subject to change and may also break the implementation with browser compatibility issue. so, I'm not inclined toward implementation this feature any sooner as of now.
Hi, since audio stream is no go, what do you think about using an external audio source when recording the video? I forked this repo and tried using addInput(pathToAudioFile)
(and input(pathToAudioFile)
) but I couldn't make it work (I am not that fluent in fluent-ffmpeg
).
Further details on the simplified use-case. Since I need to record screen that has video on it, and I have access to the video, I am considering this approach:
ffmpeg
but if there is an easier way, even better)ffmpeg
by using multiple input
s.Thank you for making this library, right now I believe it is the best solution to screen recording problem.
Hi @MiselKING, you can achieve this by using pulseaudio on linux. Create a new sink where the headless browser will output its audio and then pass that sink to ffmpeg. You can get the chrome process id from puppeteer.
It would be tidier to try to use the Chrome API, it's unlikely they would change it that significantly, and of course, it would work across multiple platforms quite easily, whereas external capture is platform-specific.
+1
+1
+1
Hey @ScalaWilliam,
Need a setup listener to listen for audio stream using chrome-dev getRealTimeData method and combine the audio stream with video stream using FFmpeg library.
The problem here is the Audio API of the chrome-dev tool is still under the experimental stage, So it is subject to change and may also break the implementation with browser compatibility issue. so, I'm not inclined toward implementation this feature any sooner as of now.
Hi @prasanaworld ,
So how to deal with the WebAudio.ContextRealtimeData that getRealTimeData
method returns? Seems not relate to audio stream.
+1
This is working great for video. Would love to also be able to capture audio!
+1
Have you any solution for audio recording ?
Same here, super interested in having audio recording :)
Please add audio support 🙏🏻
+1
add audio support please
+1! Would love to see this supported
+1 please support it!
+1 please support it!
In my research about this topic, i don`t think there is any meaningful way to capture Audio using the CDPs WebAudio domain.
I thought about maybe using the Presentation API and the Cast.startTabMirroring method to record it throught the ChromeCast protocol. But it deviates too much from the current library design and could suffer from some delay.
If there is any other method this could be done i would be glad to help, but im failing to see it right now.
I'm submitting a ... [ ] bug report [x] feature request [ ] question about the decisions made in the repository [ ] question about how to use this project
Summary Ability to record screen audio in headless.
Other information (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)