GStreamer makes streaming "from" a G.711 audio file easy.
6001.wav is already encoded as G.711uLaw:
$ gst-launch-1.0 -v filesrc location = /home/greg/jars/audio/6001.wav ! wavparse ! rtppcmupay ! udpsink host=127.0.0.1 port=19001
And with ffmpeg and yt-dlp:
gst-launch-1.0 -v souphttpsrc location=$(yt-dlp -x -g https://www.youtube.com/watch?v=ljnxZypkjn0) ! decodebin ! audioconvert ! audioresample ! mulawenc ! rtppcmupay ! udpsink host=127.0.0.1 port=19001
No comments:
Post a Comment