On 4/4/24 10:53, Nagulan Bsc cs wrote:
Dear FFmpeg Team, I hope this email finds you well. I am writing to seek your assistance with a project involving audio recording using FFmpeg. I am currently working on a project that requires capturing both the input and output audio from mobile devices. After some research, I came across FFmpeg as a potential solution for recording audio. However, I am facing difficulties in achieving this functionality. Specifically, I need to record the audio input (microphone) and output (speaker) simultaneously on mobile devices. I have tried various approaches, including using "alsa" input for microphone and "pulse" output for the speaker, but haven't been successful in obtaining the desired results. Below is a simplified version of the script I've been using: *import subprocess* *def record_audio(output_audio): try: ffmpeg_command = [ 'ffmpeg', '-f', 'alsa', '-i', 'pulse', '-ac', '2', '-vn', output_audio ] subprocess.run(ffmpeg_command, check=True) print("Audio recording completed successfully.") except subprocess.CalledProcessError as e: print("Error:", e)if __name__ == "__main__": output_audio = "output_audio.mp3" record_audio(output_audio)* Could you please provide guidance on how I can achieve simultaneous recording of mobile device input and output audio using FFmpeg? Any insights, suggestions, or examples would be greatly appreciated. Thank you very much for your time and assistance. I look forward to hearing from you soon. *Best regards,Nagulan M*
It doesn't feel like mobile devices and ffmpeg would be the way to go. Mobile devices (Android, iOS presumably) have dedicated APIs for media capture, recording, muxing, etc. A very quick google search suggests MediaRecorder and MediaMuxer are places to start in Android API. I am sure you can find an iOS equivalent. hv _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".