Reputation: 6165
I have the following GStreamer commands working :
1°) streaming 2 MJPEG streams over TCP :
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 :
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) :
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).
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
Upvotes: 1
Views: 2022
Reputation: 6165
Found the answer here : http://gstreamer-devel.966125.n4.nabble.com/Pipeline-Freezes-When-Adding-In-Tee-With-x264enc-td4301890.html
Using "x264enc tune=zerolatency" made it working !
Upvotes: 2