GStreamer T 恤:x264enc + jpegenc -> 死锁?
GStreamer Tee : x264enc + jpegenc -> deadlock?
我有以下 GStreamer 命令在工作:
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°) 通过 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
但是这个没有(尝试通过 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
命令行说:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
听起来不错,但我无法在 VLC 中播放流(它使用第一个命令行)。
唯一的变化是我只替换了其中一个流:
jpegenc quality=40 ! multipartmux
来自:
x264enc bitrate=1000 ! mpegtsmux
如有任何帮助,我们将不胜感激...
谢谢
使用 "x264enc tune=zerolatency" 使其正常工作!
我有以下 GStreamer 命令在工作:
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°) 通过 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
但是这个没有(尝试通过 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
命令行说:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
听起来不错,但我无法在 VLC 中播放流(它使用第一个命令行)。
唯一的变化是我只替换了其中一个流:
jpegenc quality=40 ! multipartmux
来自:
x264enc bitrate=1000 ! mpegtsmux
如有任何帮助,我们将不胜感激...
谢谢
使用 "x264enc tune=zerolatency" 使其正常工作!