FXUDarkNova
FXUDarkNova

Reputation: 15

Gstreamer streaming and receiving on macOS

I am trying to get a sender and receiver application working on macOS. These are the commands I am using:

On the sender side:

./gst-launch-1.0 -v uridecodebin name=uridec uri=file:///Users/nathanapps/Documents/Vuze\ Downloads/John\ Wick\ Chapter\ 2\ 2017\ 720p\ BRRip\ 900\ MB\ -\ iExTV/John\ Wick\ Chapter\ 2\ 2017\ iExTV.Com.mp4 ! queue ! videoconvert ! x264enc ! video/x-h264 ! mpegtsmux name=mux ! queue ! udpsink host=224.3.0.11 port=5000 sync=true uridec. ! audioconvert ! voaacenc ! audio/mpeg ! queue ! mux.

On the receiver side:

./gst-launch-1.0 -v udpsrc port=5000 ! tsparse ! decodebin name=dec ! videoconvert ! osxvideosink sync=true dec. ! queue ! audioconvert ! audioresample ! osxaudiosink sync=true

On the receiver end, all I get is a green box. I know the server end is working as I have tried it with VLC. Any help would be greatly appreciated!

Upvotes: 1

Views: 2446

Answers (1)

jgorostegui
jgorostegui

Reputation: 1310

The correct pipeline of the receiver should be something like this:

gst-launch-1.0 udpsrc uri=udp://127.0.0.1:5000 ! video/mpegts ! tsdemux name=demux ! video/x-h264 ! queue ! decodebin ! autovideosink  demux. ! audio/mpeg ! queue ! decodebin ! autoaudiosink

Tested on linux with the next input pipeline, which is exactly the same as your sender pipeline (using gstreamer test sources):

gst-launch-1.0 videotestsrc is-live=true ! videoconvert ! x264enc tune=zerolatency ! video/x-h264 ! mpegtsmux name=mux ! queue ! udpsink host=127.0.0.1 port=5000 sync=true audiotestsrc is-live=true ! audioconvert ! voaacenc ! audio/mpeg ! queue ! mux.

You can change autoaudiosink and autovideosink sink wrappers to the OS X ones, but I don't think that it is a must.

Upvotes: 1

Related Questions