{"id":1510,"date":"2013-10-29T13:11:03","date_gmt":"2013-10-29T13:11:03","guid":{"rendered":"https:\/\/raspberry-projects.com\/pi\/?p=1510"},"modified":"2024-11-29T10:48:56","modified_gmt":"2024-11-29T10:48:56","slug":"streaming-video-using-gstreamer","status":"publish","type":"post","link":"https:\/\/raspberry-projects.com\/pi\/pi-hardware\/raspberry-pi-camera\/pre-bookworm-camera-use\/streaming-video-using-gstreamer","title":{"rendered":"Streaming Video Using gstreamer"},"content":{"rendered":"<p>\ngstreamer allows you to stream video with very low latency &#8211; a problem with VLC&nbsp;currently. &nbsp;The catch is that you need need gstreamer on the client used to view the stream. &nbsp;gstreamer is a development framework not a media player and there isn&#39;t a way to stream so that common players such as VLC can display the stream (without users having to install complex plugins). &nbsp;So,&nbsp;gstreamer&nbsp;can provide&nbsp;an excellent low latency video link, which is great if you are techy enough to set it up at both ends,&nbsp;but its no good if you want to directly stream so that Joe&nbsp;public can see the video on a web site for instance.\n<\/p>\n<h4>\nSetting Up The Raspberry Pi To Use gstreamer<br \/>\n<\/h4>\n<p>\nYou need to edit the sources.list file so enter:\n<\/p>\n<pre>\r\n<code>\r\nsudo nano \/etc\/apt\/sources.list\r\n<\/code><\/pre>\n<p>\nand add the following to the end of the file:\n<\/p>\n<pre>\r\n<code>\r\ndeb http:\/\/vontaene.de\/raspbian-updates\/ . main\r\n<\/code><\/pre>\n<p>\nPress CTRL+X to save and exit\n<\/p>\n<p>\nNow run an update (which will make use of the line just added):\n<\/p>\n<pre>\r\n<code>\r\nsudo apt-get update \r\n<\/code><\/pre>\n<p>\nNow install gstreamer\n<\/p>\n<pre>\r\n<code>\r\nsudo apt-get install gstreamer1.0\r\n<\/code><\/pre>\n<h4>\nTo Stream The Video From the Raspberry Pi<br \/>\n<\/h4>\n<p>\nEnter this on the command lne:\n<\/p>\n<pre>\r\n<code>\r\nraspivid -t 0 -h 720 -w 1080 -fps 25 -hf -b 2000000 -o - | gst-launch-1.0 -v fdsrc ! h264parse !  rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=YOUR_RPI_IP_ADDRESS port=5000\r\n<\/code><\/pre>\n<p>\nChange&nbsp;YOUR_RPI_IP_ADDRESS&nbsp;to be the IP address of your &nbsp;RPI.\n<\/p>\n<h4>\nTo View The Stream<br \/>\n<\/h4>\n<p>\nThere&#39;s a lot of resources around for this. &nbsp;Seems to be pretty easy on Linux, OK on a MAC and harder on Windows. Apparently&nbsp;streaming from RPi to PRi works really well.\n<\/p>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>gstreamer allows you to stream video with very low latency &#8211; a problem with VLC&nbsp;currently. &nbsp;The catch is that you need need gstreamer on the client used to view the stream. &nbsp;gstreamer is a development framework not a media player and there isn&#39;t a way to stream so that common players such as VLC can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[196],"tags":[],"class_list":["post-1510","post","type-post","status-publish","format-standard","hentry","category-pre-bookworm-camera-use"],"_links":{"self":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/1510","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/comments?post=1510"}],"version-history":[{"count":2,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/1510\/revisions"}],"predecessor-version":[{"id":1513,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/1510\/revisions\/1513"}],"wp:attachment":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/media?parent=1510"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/categories?post=1510"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/tags?post=1510"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}