简体   繁体   English

GStreamer Tee:x264enc + jpegenc->死锁?

[英]GStreamer Tee : x264enc + jpegenc -> deadlock?

I have the following GStreamer commands working : 我有以下GStreamer命令正在工作:

1°) streaming 2 MJPEG streams over TCP : 1°)通过TCP流式传输2个MJPEG流:

gst-launch-1.0 v4l2src device=/dev/video0 ! deinterlace mode=1 ! videorate ! videoscale ! tee name=tp \
\
tp. ! queue ! video/x-raw, framerate=10/1, width=960, height=540 ! jpegenc quality=40 ! multipartmux ! tcpserversink host=0.0.0.0 port=8093 \
\
tp. ! queue ! video/x-raw, framerate=15/1, width=960, height=540 ! jpegenc quality=40 ! multipartmux ! tcpserversink host=0.0.0.0 port=8096

2°) streaming 2 MP4 streams over TCP : 2°)通过TCP流式传输2个MP4流:

gst-launch-1.0 v4l2src device=/dev/video0 ! deinterlace mode=1 ! videorate ! videoscale ! tee name=tp \
\
tp. ! queue ! video/x-raw, framerate=10/1, width=960, height=540 ! x264enc bitrate=1000 ! mpegtsmux ! tcpserversink host=0.0.0.0 port=8093 \
\
tp. ! queue ! video/x-raw, framerate=15/1, width=960, height=540 ! x264enc bitrate=1000 ! mpegtsmux ! tcpserversink host=0.0.0.0 port=8096

But this one doesn't (trying to stream 1 MJPEG stream and 1 MP4 stream over TCP) : 但这不是(尝试通过TCP传输1个MJPEG流和1个MP4流):

gst-launch-1.0 v4l2src device=/dev/video0 ! deinterlace mode=1 ! videorate ! videoscale ! tee name=tp \
\
tp. ! queue ! video/x-raw, framerate=10/1, width=960, height=540 ! jpegenc quality=40 ! multipartmux ! tcpserversink host=0.0.0.0 port=8093 \
\
tp. ! queue ! video/x-raw, framerate=15/1, width=960, height=540 ! x264enc bitrate=1000 ! mpegtsmux ! tcpserversink host=0.0.0.0 port=8096

The command line says : 命令行说:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...

Which sounds fine, but I'm unable the play the streams in VLC (it's working with the 1st command line). 听起来不错,但我无法在VLC中播放流(它正在使用第一个命令行)。

The only change is that I replaced, for only one of the streams : 唯一的变化是我只替换了其中一个流:

jpegenc quality=40 ! multipartmux

by : 创建人:

x264enc bitrate=1000 ! mpegtsmux 

Any help would be appreciated... 任何帮助,将不胜感激...

Thanks 谢谢

Found the answer here : http://gstreamer-devel.966125.n4.nabble.com/Pipeline-Freezes-When-Adding-In-Tee-With-x264enc-td4301890.html 在此处找到答案: http : //gstreamer-devel.966125.n4.nabble.com/Pipeline-Freezes-When-Adding-In-Tee-With-x264enc-td4301890.html

Using "x264enc tune=zerolatency" made it working ! 使用“ x264enc tune = zerolatency”使其正常工作!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM