Opus streaming directly from file

Tim Müller tim at centricular.com
Mon Apr 23 18:56:57 UTC 2018


On Mon, 2018-04-23 at 06:36 -0700, JoeArtAV wrote:

Hi Joe,

> 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?

I was going to say have you tried

  filesrc location=.. ! opusparse ! rtpopuspay ! .. ?

but opusparse doesn't seem to do the right thing for me here in my
quick testing.

I would recommend putting the opus audio into a proper container such
as Matroska, Ogg or MPEG-TS and then you should be able to use

  filesrc location=... ! xyzdemux ! rtpopuspay ! ..

or even

  filesrc location=.. ! parsebin ! rtpopuspay ! ...

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com


More information about the gstreamer-devel mailing list