What I'm trying to do is to simultaneously record a video from html5 canvas, which I managed to do, along with all the sounds being played on that page. Just to make it clear, I'm not trying to record sound from microphone, I am trying to intercept sound played on a page and record it.
我想要做的是同时从HTML5画布上录制一段视频,我成功地做到了这一点,以及该页面上播放的所有声音。我要说明的是,我并不是要录制麦克风的声音,我是想截取页面上播放的声音并进行录制。
The website is a browser game built with html5 browser (lime engine if it matters), and along with the video of battles it plays sounds. However it's not a single media file being player, rather multiple sounds being played, mostly several at the same time.
该网站是一款使用HTML5浏览器构建的浏览器游戏(如果重要的话,可以使用石灰引擎),并与战斗视频一起播放声音。然而,它不是一个单一的媒体文件播放,而是多个声音被播放,大多是同时播放几个声音。
I'm wondering if it's possible to record all of it in a single audio file, so I can later play it simultaneously with a captured video? I did some reverse engineering of the game code and it looks like every time they need to play a sound they create an instance of Audio. Is there any kind of "master audio context" I can use and stream out audio, pretty much like captureStream of canvas, which I use to record canvas as video.
我想知道是否有可能将所有这些都录制在一个音频文件中,这样我以后就可以与捕获的视频同时播放它?我对游戏代码做了一些反向工程,看起来每次他们需要播放声音时,他们都会创建一个Audio实例。有没有任何类型的“主音频上下文”我可以使用并流出音频,很像CaptureStream of Canvas,我用它来将Canvas录制为视频。
Thanks!
谢谢!
EDIT:
It is also likely I'm going to run that page using CEF in a background process with an offscreen buffer, so maybe that's also a way to do it using CEF.
编辑:我也可能会在后台进程中使用CEF来运行该页面,并使用离屏缓冲区,所以也许这也是使用CEF来运行页面的一种方式。
更多回答
优秀答案推荐
我是一名优秀的程序员,十分优秀!