The tee element is the one that you need but, in my experience, this element is a bit tricky, sometimes fails due to missing queues on the branches. Sadly I don’t have a hardware setup right now to the your pipelines but I can suggest you an example with tee.
From your stream pipeline (which already has a tee) just let’s add another branch and queues to save the file:
Please, test the pipeline above, this has both features together but it may fails due to caps or something else. You can add GST_DEBUG=3 gst-launch-1.0 … to the pipeline to obtain information from errors.
Let me know if this help you, otherwise attach error log to check the possible issue.
Hello, thank you so much! This saves and send file on the host machine.
The challenge is that the video being sent and the video being saved are of the same quality.
I want it to be viewed and stored on the client computer.
The actual video being viewed does not have to be high quality. but the video that is saved I want as high quality as possible. I think that the video needs to be in jpeg file in order to provide the highest quality possible.
This pipeline first downscale from camera input to 640x480, the tee here does the following:
Encoded 640x480 to h264 with omxh264enc, this may suffer quality issues, check encoder’s properties to fine-tune the output, example the properties profile and bitrate may help here, Run gst-inspect-1.0 omxh264enc for more information related to encoder’s properties.
The second branch upscale from 640x480 to 1920x1080, this scaling may introduce quality issues.
Regarding your suggestion, avimux already uses jpeg.
If you are referring to the video stream quality, you can change the encoder/payloader from h264 to jpeg in case you can give it a try.
Just remember that depayloader on receiving pipeline must change to jpeg.