-
-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add mobile commands for audio recording #1207
Conversation
When I did belw input, the input device (iPhone) was recoded
Note: We must allow microphone permission (My case was via iTerm.app) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only tested ffmpeg command for a real device
|
||
const commands = {}; | ||
|
||
const AUDIO_RECORD_FEAT_NAME = 'audio_record'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!audioInput) { | ||
log.errorAndThrow(`The mandatory audioInput option is not provided. Please set it ` + | ||
`to a correct value (e. g. ':1'). Use 'ffmpeg -f avfoundation -list_devices true -i ""' ` + | ||
`command to list available input sources`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to log the url, https://www.ffmpeg.org/ffmpeg-devices.html#avfoundation , for iPhone device to check the device audio input format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do log the output of ffmpeg
niiice. Many thanks for checking it |
This is awesome! |
The idea of this PR is that we could record Simulator audio output using Soundflower like it is described in http://www.lorisware.com/blog/2012/04/28/recording-iphone-emulator-video-with-sound/
For real devices there is a possibility to connect a phone as an input device: https://www.makeuseof.com/tag/play-audio-iphone-mac/, although I've never tested that, since I don't have a real device :-P
In the worst case one could always use the classic audio jack connected to a microphone input of a mac machine.
The feature is insecure, because it allows to access system microphone, so it must be enabled explicitly on the server side.
I'll write a separate doc later on how to configure the Simulator for audio recording. It would be great if @KazuCocoa could help to check how audio capture works with real devices, so we have a complete documentation on the feature.
cc @dpgraham