PulseDroidRtp
PulseDroidRtp copied to clipboard
Can PulseDroidRTP play RTP streams sent by ffmpeg?
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?
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:
- I use the default sample rate of your Android device, should be 48000, if it's not working then try 44100. See https://ffmpeg.org/ffmpeg-filters.html#aresample-1;
- I use the format s16be. See https://stackoverflow.com/questions/4854513/can-ffmpeg-convert-audio-to-raw-pcm-if-so-how;
- For MTU 320, there's some overhead with the IP header so we need to set smaller samples per packet;
- The App listens on the multicast address 224.0.0.56:4010 by default. Use whatever works, just make sure that the App listens on the same address that ffmpeg sends data to.
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.