Let’s say we have two different sinks in a pipeline for example the following
gst-launch-1.0 -e \
videotestsrc pattern=ball do-timestamp=true is-live=true ! video/x-raw, width=800, height=600 framerate=30/1 ! queue ! \
nvvidconv ! \
tee name=t \
t. ! queue ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=example.mp4 sync=false \
t. ! queue ! nvv4l2h264enc ! h264parse ! matroskamux ! tcpserversink port=8000
I have used Nvv4l2h264 twice in this pipeline and worked fine but my question is more of a performance related. For this resolution the encoder might work but it feels like its speed reduced by half now hardware probably tries to convert the same image twice. Does gstreamer optimize this behaviour ?
On the other half this pipeline also works
gst-launch-1.0 -e \
videotestsrc pattern=ball do-timestamp=true is-live=true ! video/x-raw, width=800, height=600 framerate=30/1 ! queue ! \
nvvidconv ! \
nvv4l2h264enc ! h264parse !\
tee name=t \
t. ! queue ! qtmux ! filesink location=example.mp4 sync=false \
t. ! queue ! matroskamux ! tcpserversink port=8000
Which seems an optimizated version of above.
Are these the same or the latter is more efficient use of encoder?