java-airplay-lib icon indicating copy to clipboard operation
java-airplay-lib copied to clipboard

How to use the audio stream.

Open LuohanCC opened this issue 5 years ago • 5 comments

I've tried to write aac data locally, and I've tried to convert it to PCM format and write it locally. But it won't play.

LuohanCC avatar Mar 12 '20 07:03 LuohanCC

@LuohanCC, I'm also trying to save audio data to playable file. For now, I've compiled fdk-aac lib with JNI bindings to decode aac-eld. This will make sure that decrypting method is correct.

serezhka avatar Mar 12 '20 09:03 serezhka

I have completed transcoding in JNI using the fdk-aac library, and directly wrote to the file in JNI, and then played, but the playback failed. I hope you have good news.

LuohanCC avatar Mar 12 '20 10:03 LuohanCC

Hi serezhka. Have you finished?

LuohanCC avatar Mar 18 '20 02:03 LuohanCC

@LuohanCC unfortunately, no. C code is here if someone else interested. Currently I'm analyzing apowermirror app from apowersoft. They have managed to make audio work and use shairplay lib, @dsafa22's code, fdk-aac, .. under the hood. Now I can confirm that service discovery entries, /info, RTSP SETUP responses exactly the same as in this java-airplay-lib, nothing is special.

serezhka avatar Mar 18 '20 09:03 serezhka

@LuohanCC I've successfully decrypted audio! But still, you need to compile fdk-aac-jni and put libfdk-aac.dll in classpath (windows). Decoded audio will be written to audio.pcm file. ffplay -autoexit -f s16le -ar 44100 -ac 2 audio.pcm see https://youtu.be/BFuYug8MO6s

serezhka avatar Sep 21 '20 12:09 serezhka