"Freezes" transcoding RTP g.711 stream to mp3
|Reported by:||Sara||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
I am trying to connect to a live RTP stream of g.711 audio from an intercom and then output it as an mp3 file.
N-86996-g931c0ac95c-Reino cross-compiled for Windows 64 w/ pthreads and debug=3 enabled
ffmpeg -re -f mulaw -i rtp://10.200.1.14:32760 -sample_rate 44100 -filter:a "asetrate=9000" -acodec libmp3lame -ar 44100 live-rtp-g711-toMP3.mp3 -report
gdb backtrace: “live-rtp-g711-toMP3-BACKTRACE.txt”
With this command, the window “freezes” after printing “[udp @ 0000002c748241e0] end receive buffer size reported is 65536”.
The command line will stay that way indefinitely until I enter ctrl+c (q doesn’t work), after which it seems to say that nothing was written to the output, and the output file produced is indeed empty/unplayable.
Unfortunately I cannot provide access to th live rtp stream, as it requires VPN access. I saw something about using ffplay if my output isn’t reproducable, but I’m not sure how to do that. If it’s needed could you please give more details on how to do this?
However I can say that, using Wireshark, I have confirmed that there is traffic coming through port 32760 — packets using the RTP protocol and g.711U payload type, as expected (attached screenshot “wireshark-RTP-g711-traffic.png”). I Analyzed and Saved the data from Wireshark as a "synchronized forward stream audio” in the .raw format, then used the same command with the .raw input instead of an RTP stream, and that works:
ffmpeg -re -f mulaw -i wireshark-rtp-g711-syncedRAW.raw -sample_rate 44100 -filter:a "asetrate=9000" -acodec libmp3lame -ar 44100 wireshark-rtp-g711-syncedRAW-toMP3.mp3 -report
I don’t know why the command works with the saved audio from Wireshark but not with a live stream. I’m very new to FFmpeg so I apologize if this is just a user error.
I would appreciate any light that can shed on this problem!
Thanks very much,