46

很多人都在问这个,似乎没有人有答案,所以我也没有。

某些应用程序如何提供记录android系统音频输出的功能?我发现的所有内容都是在 1432 个不同站点上的相同教程,您可以在其中记录 MIC 输入。我不关心麦克风输入,我想要音频输出,只是无法想象如何访问它。

如果每个人都能让我走上正确的道路,我会很高兴。

4

5 回答 5

16

似乎目前没有办法实现这一点。

这是与此相关的另一个问题:android get device overall audio output in pcm

于 2014-09-09T09:22:46.930 回答
10

The closest API available to you for these purposes is Visualizer. Which only captures "partial and low quality audio content".

I imagine direct audio capture functionality is omitted to prevent pro-piracy apps. It may be worth noting that there is a CAPTURE_AUDIO_OUTPUT permission, but it is "Not for use by third-party applications". So if you really do have legitimate apps that are capable of this, as you claim, they are likely system apps. Even if you wrote an app that generated its own musical sequences, for example, you would still have to write your own encoder/decoder to achieve anything close to what you're asking for (and that wouldn't even be considered audio capture at that point.)

To put it bluntly, it's currently impossible without breaking any ToS with Google or your phone provider, and will probably remain so indefinitely.

于 2014-09-12T20:06:59.480 回答
5

只需使用双向 AUX 电缆并将其连接到您的手机耳机端口并将其另一端连接到您的音频接口“线路输入”通道(或您的音频接口上的任何输入),然后通过大胆或任何好的音频记录该输入录音机。

于 2015-01-26T11:26:28.280 回答
5

在 Android 10 中,他们引入了Audio Playback Capture API,我们可以使用它来捕获其他应用程序正在播放的音频。但它在以前的安卓版本中不可用。

应用 X 还可以阻止任何其他应用侦听,如果该应用未添加任何约束,则可以使用此 API。

于 2020-02-21T06:18:49.833 回答
4

TL;DR:使用SCR 屏幕录像机应用程序捕获视频 + 内部音频(不是麦克风)[需要 root]

长答案

原始答案:记录平板电脑的屏幕和音频

杰夫的回答似乎是您可以通过 adb 使用的唯一方法。但这会迫使您做一些工作(合并视频+音频)。

我可以这样做:

- connect the Android device to computer with a jack cable (headphone output to microphone input);
- record video with adb shell;
- record audio with Audacity (or anything else)
- then merge video and audio with a video editor (pitivi, openshot, avconv...)

另一种方法是直接使用android应用程序:

SCR 屏幕录像机

三星的 Mobizen :

  • 优点
    • 在谷歌游戏商店
  • 缺点
    • 只有三星版可以录制内部音频,通用或LG,小米版无法录制内部音频
    • 仍然是测试版功能
    • 需要root才能录制内部音频

推荐

  • 优点
    • 在谷歌游戏商店
  • 缺点
    • 内部录音不适用于大多数设备
    • 需要root才能录制内部音频

我个人尝试了很多应用程序,唯一对我有用的是 SCR Screen Recorder。

PS:如果不使用内部音频,所有这些应用程序都可以在没有 root 的情况下运行。

于 2018-01-04T14:57:55.640 回答