{"id":8347,"date":"2021-04-11T10:22:06","date_gmt":"2021-04-11T08:22:06","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=8347"},"modified":"2021-04-11T10:22:06","modified_gmt":"2021-04-11T08:22:06","slug":"ffmpeg-to-youtube-live","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2021\/04\/11\/ffmpeg-to-youtube-live\/","title":{"rendered":"FFMPEG to Youtube Live"},"content":{"rendered":"<p><em><a href=\"https:\/\/stackoverflow.com\/questions\/43586435\/ffmpeg-to-youtube-live\">video &#8211; FFMPEG to Youtube Live &#8211; Stack Overflow<\/a><\/em><\/p>\n<blockquote><p>After a lot of trial and error the solution below works pretty much perfectly. To make sure it runs 24\/7 wrap it inside a service of some description.<\/p>\n<p>This is with an up to date version of FFMPEG to include -stream_loop -1.<br \/>\nThe background is an mp4 file.<br \/>\n<code class=\"\" data-line=\"\">http:\/\/localhost:3888<\/code> = an audio stream.<\/p>\n<pre><code class=\"\" data-line=\"\">ffmpeg -stream_loop -1 -i $MYPATH\/background\/$background \\\n-i http:\/\/localhost:3888 -filter:a &quot;volume=$volume&quot; \\\n-r 24 -g 48 -pix_fmt yuv420p -x264-params keyint=48:min-keyint=48:scenecut=-1 \\\n-s $size -b:v $bitrate -b:a 128k -ar 44100 -acodec aac \\\n-vcodec libx264 -preset superfast -bufsize 960k -crf 28 -threads 2 \\\n-f flv rtmp:\/\/a.rtmp.youtube.com\/live2\/$key\n<\/code><\/pre>\n<p>Config File:<\/p>\n<pre><code class=\"\" data-line=\"\"># Config File\nbackground=out.mp4\nsize=1280x720\nbitrate=1500k\nkey=----KEY----\nvolume=0.5\n<\/code><\/pre>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">video &#8211; FFMPEG to Youtube Live &#8211; Stack Overflow After a lot of trial and error the solution below works pretty much perfectly. To make sure it runs 24\/7 wrap it inside a service of some description. This is with an up to date version of FFMPEG to include -stream_loop -1. The background is an&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2021\/04\/11\/ffmpeg-to-youtube-live\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[72,278],"tags":[268,292],"class_list":["post-8347","post","type-post","status-publish","format-standard","hentry","category-documentations","category-tricks","tag-ffmpeg","tag-youtube"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-2aD","jetpack-related-posts":[{"id":6834,"url":"https:\/\/monodes.com\/predaelli\/2020\/03\/04\/useful-ffmpeg-commands-for-working-with-audio-and-video-files-digital-inspiration\/","url_meta":{"origin":8347,"position":0},"title":"Useful FFmpeg Commands for Working with Audio and Video Files &#8211; Digital Inspiration","author":"Paolo Redaelli","date":"2020-03-04","format":"link","excerpt":"Useful FFmpeg Commands for Working with Audio and Video Files - Digital Inspiration Useful FFmpeg Commands FFmpeg supports all popular audio and video formats. Or you can running the command .\/ffmpeg -formats to get a list of every format that is supported by your FFmpeg installation. If you are just\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8990,"url":"https:\/\/monodes.com\/predaelli\/2021\/12\/19\/how-to-do-noise-reduction-using-ffmpeg-and-sox-articulating-ideas\/","url_meta":{"origin":8347,"position":1},"title":"How To Do Noise Reduction Using ffmpeg And sox &#8211; Articulating ideas","author":"Paolo Redaelli","date":"2021-12-19","format":"link","excerpt":"How To Do Noise Reduction Using ffmpeg And sox - Articulating ideas by Zohar Babin Need a quick, easy and free way of cleaning up a video\u2019s audio from background noise ? Follow the steps below to remove background audio from videos. First get and\u00a0install the tools: FFMPEG. SoX \u2013\u2026","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7993,"url":"https:\/\/monodes.com\/predaelli\/2021\/01\/03\/audio-how-to-transform-live-rtmp-video-to-live-mp3-icecast-stream-stack-overflow\/","url_meta":{"origin":8347,"position":2},"title":"audio &#8211; how to transform live RTMP video to live mp3 Icecast stream &#8211; Stack Overflow","author":"Paolo Redaelli","date":"2021-01-03","format":false,"excerpt":"Source: audio - how to transform live RTMP video to live mp3 Icecast stream - Stack Overflow I have RTMP live stream with video and audio. I can get ogg audio live stream from RTMP and translate it to Icecast2 and get it on my site using JPlayer. Now i\u2026","rel":"","context":"In &quot;Basilica's website&quot;","block_context":{"text":"Basilica's website","link":"https:\/\/monodes.com\/predaelli\/category\/basilicas-website\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13797,"url":"https:\/\/monodes.com\/predaelli\/2025\/07\/20\/13797\/","url_meta":{"origin":8347,"position":3},"title":"I visited Terence blog to\u2026","author":"Paolo Redaelli","date":"2025-07-20","format":false,"excerpt":"I visited Terence blog to read about some Easy ways to add watermarks to images and videos in Linux but I found a very nice and clean to take inspiration from! Mostly notes to myself :-) Here is a quick way to add watermarks to photos and videos. All Linux\u2026","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/shkspr.mobi\/blog\/wp-content\/litespeed\/avatar\/af6a5dd8373bf52386c67599d3a74158.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":7079,"url":"https:\/\/monodes.com\/predaelli\/2020\/06\/01\/cura-dimagrante\/","url_meta":{"origin":8347,"position":4},"title":"Cura dimagrante","author":"Paolo Redaelli","date":"2020-06-01","format":false,"excerpt":"ffmpeg -i Palme\\ 2020.mp4 -vcodec libx265 -crf 28 -vf scale=1280:-1 Domenica-delle-palme.mp4 Per far dimagrire un video da 402Mb a 9,9Mb. Ok, ok, chi si loda s'imbroda, tanto pi\u00f9 che fa tutto ffmpeg, mica io! Ma vediamo il perch\u00e9 dopo aver visto il percome: il video in origine era codificato in\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7361,"url":"https:\/\/monodes.com\/predaelli\/2020\/06\/25\/how-to-easily-stream-to-two-or-more-locations-the-helping-squad\/","url_meta":{"origin":8347,"position":5},"title":"How to easily stream to two or more locations? \u2013 The Helping Squad","author":"Paolo Redaelli","date":"2020-06-25","format":false,"excerpt":"Streaming to more than one service can be done using an RTMP Server that relays your input to several outputs or using an external service. Services like restream.io offer free and paid options to send your stream to several services at the same time. Source: How to easily stream to\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/8347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=8347"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/8347\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=8347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=8347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=8347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}