Send and stream live video with TCP

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Send and stream live video with TCP

katariina
Hi! I'm working on a project, where I'm supposed send live videostream (from
nvidia jetson TX2) with TCP without saving that current video into a file.
At the moment I'm able to send video stream, but I have to save it to an
.avi-file on the receiver pipeline.

My sender pipeline is following (creates an .avi-video from jpeg-pictures):
gst-launch-1.0 nvcamerasrc fpsRange="30.0 30.0" intent=3 ! nvvidconv !
'video/x-raw, width=(int)1280, height=(int)720, format=(string)I420,
framerate=(fraction)30/1' ! \
nvjpegenc ! \
'image/jpeg,width=1280,height=720,framerate=30/1' ! \
jpegdec ! \
tee name=t ! \
queue ! \
xvimagesink t. ! \
queue ! \
videorate ! \
capsfilter caps="video/x-raw, width=(int)1280, height=(int)720,
framerate=1/1" ! \
videoconvert ! \
jpegenc ! \
avimux ! \
tcpclientsink host=127.0.0.1 port=5000

The receiver pipeline (atm it is saving a file)
gst-launch-1.0 tcpserversrc port=5000 ! filesink location=
"/home/nvidia/Projects/test.avi"

Would anyone have any good suggestions, or is it even possible to send and
stream video without saving it to a file?
Thanks before hand,
Katariina



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Send and stream live video with TCP

sk_gst
1. Did you try to save the file on the Nvidia TX2 board itself? Replace your
tcpclientsink to a filesink. Check if you are able to play back the saved
file. In that case you can be sure that there are no issues at the
transmission side.

2. You are using 'nvjpegenc' at the transmission side. So you must also use
the corresponding decoder to 'nvjpegenc' at the receiving side, before you
store it to a file. Search for appropriate 'jpegdec' element for your
usecase.

3. Try to stream the video you receive at the reception side using
autovideosink. I also think, you might be required to match the caps when
you try to stream or save the video at the reception side. To get the caps,
run the command at the transmission side with '-v' option (gst-launch-1.0
-v), and use the caps at the reception side.

4. You can also try using UDP instead of TCP which might be faster when you
are using wireless link. I have successfully streamed live video using UDP
on Freescale imx6 board.


Regards.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Send and stream live video with TCP

Benedict Holland
Hi Katariina,

Is that theoretically possible? You would have to possibly resend a portion of the video a countless number of times via TCP. That would mean you would have to save the file and share it at any moment. This is why streaming video gets sent via UDP but a saved file gets sent in pieces via TCP. 

Thanks,
~Ben

On Fri, Jul 6, 2018 at 9:43 AM, vk_gst <[hidden email]> wrote:
1. Did you try to save the file on the Nvidia TX2 board itself? Replace your
tcpclientsink to a filesink. Check if you are able to play back the saved
file. In that case you can be sure that there are no issues at the
transmission side.

2. You are using 'nvjpegenc' at the transmission side. So you must also use
the corresponding decoder to 'nvjpegenc' at the receiving side, before you
store it to a file. Search for appropriate 'jpegdec' element for your
usecase.

3. Try to stream the video you receive at the reception side using
autovideosink. I also think, you might be required to match the caps when
you try to stream or save the video at the reception side. To get the caps,
run the command at the transmission side with '-v' option (gst-launch-1.0
-v), and use the caps at the reception side.

4. You can also try using UDP instead of TCP which might be faster when you
are using wireless link. I have successfully streamed live video using UDP
on Freescale imx6 board.


Regards.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel