本文介绍了有没有办法从网页录制流媒体广播的音频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我正在寻找从源(例如在线广播)创建记录流式音频的网页。I'm looking to create webpage for record streaming audio from source (like online radio).起初我想过做一些像扬声器录音这样的事情,但是 flash,java和javascript等解决方案是指从麦克风录制而非直接从扬声器录制。At first I thought of doing something like recording from speakers, but solutions like flash, java and javascript refer to recording from microphone and not directly from speakers.其他替代方法是尝试捕获流式传输并保存到本地文件,但我无法从网页中找到任何方法。 此等解决方案涉及iPad平台,不适用于标准网页。Other alternative is to try capturing the streaming and save to local file, but I couldn't find any way of doing so from a webpage.Solutions like this refer to iPad platfrom, and not suitable for standard webpage.任何帮助都会非常感激,因为任何开发环境(python,ruby,php ..)。Any help will be much appreciated, as any development environment (python, ruby, php..).推荐答案通过系统发出的声音通常(1)可通过 TargetDataLines 中的一个 Java Sound(采样)API 。挂钩 TargetDataLine &将字节直接写入磁盘。The sound coming through the system is generally (1) available through one of the TargetDataLines of the Java Sound (sampled) API. Hook into that TargetDataLine & write the bytes directly to disk.(当然,假设你有权这样做。)(Assuming you have the right to do so, of course.)参见捕获音频课程。请参阅我对带有端口和DataLine的JavaSound调音台的回答(s)?使源可以轻松探索可用的数据线。它可能就是你需要的主要声音捕获驱动程序。See the Capturing Audio lesson in the Java Tutorial for details. See my answer to JavaSound mixer with both Port(s) and DataLine(s)? for source to easily explore the available data lines. It is probably the "Primary Sound Capture Driver" that you need for this.必须信任Java代码(或在没有安全管理器的情况下运行)才能窃听声音线。Java code must be trusted (or running with no security manager) to eavesdrop on the sound lines. 在某些系统上,Java Sound似乎无法检测到所有行。对于那些系统,几乎没有基于硬件的音频环回(例如将扬声器输出连接回麦克风的电缆),这将解决问题。 这篇关于有没有办法从网页录制流媒体广播的音频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-02 20:59