{"id":1966,"date":"2024-07-05T14:56:54","date_gmt":"2024-07-05T13:56:54","guid":{"rendered":"https:\/\/matthewolden.co.uk\/?p=1966"},"modified":"2024-07-08T13:47:06","modified_gmt":"2024-07-08T12:47:06","slug":"youtube-streaming","status":"publish","type":"post","link":"https:\/\/matthewolden.co.uk\/?p=1966","title":{"rendered":"YouTube Streaming from a Raspberry Pi"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"374\" height=\"766\" src=\"https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/youtube-live.jpg\" alt=\"\" class=\"wp-image-2041\" style=\"width:135px;height:auto\" srcset=\"https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/youtube-live.jpg 374w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/youtube-live-146x300.jpg 146w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/youtube-live-332x680.jpg 332w\" sizes=\"auto, (max-width: 374px) 100vw, 374px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">its dead easy to stream to you tube. You could use OBS  <a href=\"https:\/\/matthewolden.co.uk\/?p=1958\">(find out how here)<\/a> or use this method, which runs on a raspberry pi with an attached camera , it uses  a few lines of code typed into a raspberry pi terminal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">raspivid -o &#8211; -t 0 -vf -hf -fps 30 -b 600000 | ffmpeg -i pipe: -f alsa -ac 1 -i plughw:1,0 -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp:\/\/a.rtmp.youtube.com\/live2\/XXXX-your youtube code here-XXXX<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">to get your streaming key ( the &#8220;XXXX-your youtube code here-XXXX&#8221; bit of the code) go to Youtube and join up. then click on the camera iscon the go live<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"464\" height=\"335\" src=\"https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/youtubecameras.jpg\" alt=\"\" class=\"wp-image-2044\" srcset=\"https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/youtubecameras.jpg 464w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/youtubecameras-300x217.jpg 300w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/youtubecameras-332x240.jpg 332w\" sizes=\"auto, (max-width: 464px) 100vw, 464px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You need to sign up for streaming 24 hours before you use it (handy to know if you&#8217;re running a workshop on streaming)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">the streaming key is in your streaming settings<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"747\" src=\"https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/stream-key-1024x747.jpg\" alt=\"\" class=\"wp-image-2045\" srcset=\"https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/stream-key-1024x747.jpg 1024w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/stream-key-300x219.jpg 300w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/stream-key-768x561.jpg 768w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/stream-key-1536x1121.jpg 1536w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/stream-key-2048x1495.jpg 2048w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/stream-key-700x511.jpg 700w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/stream-key-332x242.jpg 332w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">theres a few ducks to get in a row before you can start streaming<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Set up your raspberry pi, <a href=\"https:\/\/matthewolden.co.uk\/?p=1270\">follow the instructions here<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Attach the camera to your raspberry pi. <a href=\"https:\/\/www.raspberrypi.com\/documentation\/accessories\/camera.html#:~:text=The%20flex%20cable%20inserts%20into,then%20towards%20the%20Ethernet%20port.\">follow the instructions here<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Choose the camera from the preferences, or by the raspi-config<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"365\" src=\"https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/raspberri_pi_configuration-3.png\" alt=\"\" class=\"wp-image-2050\" srcset=\"https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/raspberri_pi_configuration-3.png 320w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/raspberri_pi_configuration-3-263x300.png 263w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"227\" src=\"https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/raspberry_pi_enable_camera-3.png\" alt=\"\" class=\"wp-image-2051\" srcset=\"https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/raspberry_pi_enable_camera-3.png 320w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/raspberry_pi_enable_camera-3-300x213.png 300w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">or in a terminal window type,  sudo raspi-config , and choose the legacy camera from the menu<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"677\" src=\"https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/ras1-1024x677.jpg\" alt=\"\" class=\"wp-image-2052\" srcset=\"https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/ras1-1024x677.jpg 1024w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/ras1-300x198.jpg 300w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/ras1-768x508.jpg 768w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/ras1-700x463.jpg 700w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/ras1-332x219.jpg 332w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/ras1.jpg 1325w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"657\" src=\"https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/rasp2-1024x657.jpg\" alt=\"\" class=\"wp-image-2053\" srcset=\"https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/rasp2-1024x657.jpg 1024w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/rasp2-300x192.jpg 300w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/rasp2-768x493.jpg 768w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/rasp2-700x449.jpg 700w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/rasp2-332x213.jpg 332w, https:\/\/matthewolden.co.uk\/wp-content\/uploads\/2024\/07\/rasp2.jpg 1383w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The raspberry pi camera support is legacy ware, but still works, you might have to download ffmpeg to get it working. Type this into a terminal window to install it<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">sudo apt-get install ffmpeg<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check to see if your camera is working type in a terminal<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">vcgencmd get_camera<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>its dead easy to stream to you tube. You could use OBS (find out how here) or use this method, which runs on a raspberry pi with an attached camera , it uses a few lines of code typed into a raspberry pi terminal. raspivid -o &#8211; -t 0 -vf &#8230;<\/p>\n","protected":false},"author":2,"featured_media":2041,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[83],"tags":[],"class_list":["post-1966","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-transmissions-radio-art-lab","column","fourcol","has-thumbnail"],"_links":{"self":[{"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1966"}],"version-history":[{"count":5,"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1966\/revisions"}],"predecessor-version":[{"id":2061,"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1966\/revisions\/2061"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=\/wp\/v2\/media\/2041"}],"wp:attachment":[{"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}