wenxin-wang / PulseDroidRtp

Receive and play PulseAudio RTP stream on Android
48 stars 2 forks source link

Can PulseDroidRTP play RTP streams sent by ffmpeg? #10

Open dilyanpalauzov opened 2 years ago

dilyanpalauzov commented 2 years ago

I would like to use `ffmpeg to send RPT over multicast and PulseDroidRtp to get the sound.

When I call /usr/bin/ffmpeg -re -i ZZZ.mp3 -filter_complex 'aresample=8000,asetnsamples=n=160' -acodec pcm_mulaw -ac 1 -f rtp udp://239.239.239.240:4444 I can listen the file over VLC for Android. But on PulseDroidRtp, when I configure with the IP and port above, MTU 320 (default), channels 1, channel mask 0, my Android device buzzes when something is played, but it is unclear what is played.

Is it possible ot play with PulseAudioRtp the RTP stream send by ffmpeg over multicase, as stated above?

wenxin-wang commented 2 years ago

Sorry for the long wait. Please try:

/usr/bin/ffmpeg -re -i ZZZ.mp -filter_complex 'aresample=48000,asetnsamples=n=140' -acodec pcm_s16be -f s16be -ac 1 -f rtp udp://224.0.0.56:4010

I managed to play some music with this.

Please refer to the README for why these parameters are needed:

dilyanpalauzov commented 2 years ago

Thanks for your answer. Unfortunately it does not help me. I have hardware, which announces the input from /usr/bin/ffmpeg -re -i ZZZ.mp3 -filter_complex 'aresample=8000,asetnsamples=n=160' -acodec pcm_mulaw -ac 1 -f rtp udp://239.239.239.240:4444. The invocation cannot be changed. Thus, I am looking for Android software, which accepts and plays the output of the above command.