{"id":8748,"date":"2022-05-01T22:05:14","date_gmt":"2022-05-01T20:05:14","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=8748"},"modified":"2023-12-20T08:42:46","modified_gmt":"2023-12-20T07:42:46","slug":"ffmpeg-copy-bridge-a-stream-to-an-internal-icecast-server","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/ffmpeg-copy-bridge-a-stream-to-an-internal-icecast-server\/","title":{"rendered":"ffmpeg: Copy\/bridge a mp3 stream to an (internal) icecast server"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_8748 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_8748')){$('.twoclick_social_bookmarks_post_8748').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"ffmpeg%3A%20Copy%2Fbridge%20a%20mp3%20stream%20to%20an%20%28internal%29%20icecast%20server\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Aa%20friend%20of%20mine%20has%20an%20internal%20icecast%20server%20and%20want%20to%20distribute%20an%20exiting%20internet%20stream%20to%20it.%0D%0A%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/ffmpeg-copy-bridge-a-stream-to-an-internal-icecast-server\\\/\",\"post_id\":8748,\"post_title_referrer_track\":\"ffmpeg%3A+Copy%2Fbridge+a+mp3+stream+to+an+%28internal%29+icecast+server\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>a friend of mine has an internal icecast server and want to distribute an exiting internet stream to it.<\/p>\n<p><!--more--><\/p>\n<p>For such a task you can use ffmpeg to copy or bridge a stream. ffmpeg can read a stream and can write to a stream.<\/p>\n<p>Example:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmichael@debdev ~ # ffmpeg -i https:\/\/mp3.internetradio.org\/stream.mp3 -acodec libmp3lame -ab 128k -content_type audio\/mpeg -f mp3 icecast:\/\/source:Password@10.10.100.120:8000\/stream \r\n<\/pre>\n<p>Or disable metadata map and set your own title<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmichael@debdev ~ # ffmpeg -i https:\/\/mp3.internetradio.org\/stream.mp3 -acodec libmp3lame -ab 128k -content_type audio\/mpeg -map 0 -map_metadata 0:s:0 -metadata title=&quot;My Stream title&quot; -f mp3 icecast:\/\/source:Password@10.10.100.120:8000\/stream \r\n<\/pre>\n<p>This receives a stream from the URL https:\/\/mp3.internetradio.org\/stream.mp3. reencodes the stream to 128k mp3 and sends it to an icecast server icecast:\/\/source:Password@10.10.100.120:8000\/stream<\/p>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, a friend of mine has an internal icecast server and want to distribute an exiting internet stream to it.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1552],"tags":[531,153,574,1483,1850],"class_list":["post-8748","post","type-post","status-publish","format-standard","hentry","category-icecast","tag-bridge","tag-copy","tag-ffmpeg","tag-stream","tag-to-icecast"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/8748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=8748"}],"version-history":[{"count":5,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/8748\/revisions"}],"predecessor-version":[{"id":8750,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/8748\/revisions\/8750"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=8748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=8748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=8748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}