[英]Gstreamer streaming and receiving on macOS
我正在尝试在macOS上运行发送方和接收方应用程序。 这些是我正在使用的命令:
在发送方:
./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.
在接收方:
./gst-launch-1.0 -v udpsrc port=5000 ! tsparse ! decodebin name=dec ! videoconvert ! osxvideosink sync=true dec. ! queue ! audioconvert ! audioresample ! osxaudiosink sync=true
在接收器端,我得到的只是一个绿色框。 我知道服务器端正在运行,因为我已经在VLC中尝试过。 任何帮助将不胜感激!
接收器的正确管道应如下所示:
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
在Linux下使用下一个输入管道进行了测试,该输入管道与您的发送者管道完全相同(使用gstreamer测试源):
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.
您可以将autoaudiosink和autovideosink接收器包装更改为OS X,但我认为这不是必须的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.