Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
109.82k stars 10.55k forks source link

audio recording via line-in #1104

Open ftonat opened 4 years ago

ftonat commented 4 years ago

Hi, I love your tool, and I am using it for several scenarios.

There is a very special need for the windows version, but I am not able to do the coding stuff by myself. Is there anyone in the crew or the community able to help me out?

Due to known limitations (issue #14 ) it is not possible to record audio on windows. In our special setup, we do have the possibility to deliver the android device audio via line-out to the windows pc. There is also a dadicated windows sound device (Soundblaster USB stick) available to use the line-in to forward android's audio to the windows pc.

I am now looking for the possibility to record the display video via scrcpy including the sound via line-in of the soundblaster USB stick.

As this scenario is covering the needs for special purpose vehicles for a German special police unit I am willing to spend some money on this.

Any help is highly appreciated!

Frank

rom1v commented 4 years ago

Hi,

Out of curiosity, do your devices run Android 10?

Technically, on Android 10 (with the new playback capture API), it is (should be) possible to record the audio directly (over USB).

Technically, it requires to develop a separate APK, and the user would have to explicitly approve the capture (click OK on a dialog box). But this would avoid an additional cable, and recent devices don't have a JACK port anymore.

As this scenario is covering the needs for special purpose vehicles for a German special police unit I am willing to spend some money on this.

You can contact me privately (rom@rom1v.com) if you want to discuss about specific developments.

ftonat commented 4 years ago

Have hoped to get a solution soon. I am in contact with rom1v, but he has to write a solution around the existing scrcpy.

My vision was to get a new version of scrcpy with this function integrated, as the usbaudio recording is integrated part of the Linux binary. A view lines of code here and there, and that’s it.

I am afraid I was to naive :-)

rom1v commented 4 years ago

as the usbaudio recording is integrated part of the Linux binary

USBaudio does not record. A fortiori, it does not encode the audio stream and mux it with a video stream.

A ~view~ few lines of code here and there, and that’s it.

coding

ftonat commented 4 years ago

Are you really that fast on the keyboard ? :)

I see...

MegaZeroX10 commented 4 years ago

Is it possible to record via line-in or not? I bought the following items on Amazon and was wanting to know if it is possible to get the audio recorded to the .mp4/.mkv made via the -r option:

https://www.amazon.com/gp/product/B0719PKWNT/ https://www.amazon.com/gp/product/B072TYZ89H/

MegaZeroX10 commented 4 years ago

I ended up returning them and getting https://www.amazon.com/gp/product/B076C4MM5P/ instead. It would be nice if the requested functionality was added soon.