Opus streaming directly from file
JoeArtAV
joe at artav.co.uk
Mon Apr 23 13:36:29 UTC 2018
Hello. I'm looking to build a pipeline to stream a static audio file over
UDP, and I'd like to use the Opus codec for streaming.
- I can currently stream from an MP3 file, like so:
Sender:
*gst-launch-1.0 filesrc location=file.mp3 ! decodebin ! audioconvert !
rtpL16pay ! udpsink port=500 host=192.168.0.1 *
Receiver:
*gst-launch-1.0 udpsrc port=5000 caps="application/x-rtp,
media=(string)audio, format=(string)S32LE, layout=(string)interleaved,
clock-rate=(int)44100, channels=(int)2, payload=(int)0" ! rtpL16depay !
playsink*
- I can play back an Opus file locally like so:
*gst-launch-1.0 filesrc location="file.opus" ! decodebin ! audioconvert !
playsink
*
- And I can stream a test source via UDP with the Opus codec like so:
Sender:
*gst-launch-1.0 audiotestsrc ! audioconvert ! audioresample ! opusenc !
rtpopuspay ! udpsink host=192.168.0.1 port=5000*
Receiver:
*gst-launch-1.0 udpsrc
caps="application/x-rtp,media=(string)audio,clock-rate=(int)48000,encoding-name=(string)X-GST-OPUS-DRAFT-SPITTKA-00"
port=5000 ! rtpjitterbuffer latency=1000 mode=1 ! rtpopusdepay ! opusdec !
playsink*
Now, I would like to construct something like this for the sender:
*gst-launch-1.0 filesrc location="file.opus" ! rtpopuspay ! udpsink
host=192.168.0.1 port=5000
*
But this pipeline comes back with an error "No input format was negotiated"
etc.
Is it possible? I'd like to avoid re-encoding on the fly (e.g. from MP3 to
Opus) in order to maximise efficiency. Is it possible to stream Opus to UDP
by directly reading from a .opus file?
Thanks!
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list