{"id":856,"date":"2021-02-13T16:01:59","date_gmt":"2021-02-13T08:01:59","guid":{"rendered":"https:\/\/www.cith.ddnsfree.com:5444\/?p=856"},"modified":"2021-02-13T16:02:42","modified_gmt":"2021-02-13T08:02:42","slug":"subsonic-%e8%bd%ac%e7%a0%81%e8%ae%be%e7%bd%ae%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/blog.cithwu.com\/wp5444\/subsonic-%e8%bd%ac%e7%a0%81%e8%ae%be%e7%bd%ae%e5%91%bd%e4%bb%a4\/","title":{"rendered":"Subsonic \u8f6c\u7801\u8bbe\u7f6e\u547d\u4ee4"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Transcoding is the process of converting media from one format to another. Subsonic&#8217;s transcoding engine allows for streaming of media that would normally not be streamable, for instance lossless formats. The transcoding is performed on-the-fly and doesn&#8217;t require any disk usage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The actual transcoding is done by third-party command line programs which are installed in:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Windows<\/td><td><strong>c:\\subsonic\\transcode<\/strong><\/td><\/tr><tr><td>Mac<\/td><td><strong>\/Library\/Application Support\/Subsonic\/transcode<\/strong><\/td><\/tr><tr><td>Linux<\/td><td><strong>\/var\/subsonic\/transcode<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Note that two transcoders can be chained together. Subsonic comes pre-installed with ffmpeg which supports a huge range of audio and video formats.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Recommended configuration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The recommended settings for audio transcoding is:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>mp3 audio<\/td><td><strong>ffmpeg -i %s -map 0:0 -b:a %bk -v 0 -f mp3 &#8211;<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The recommended <strong>downsample<\/strong> command is:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>ffmpeg -i %s -map 0:0 -b:a %bk -v 0 -f mp3 &#8211;<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Note that &#8220;%s&#8221; is substituted with the path of the original file at run-time, and &#8220;%b&#8221; is substituted with the max bitrate of the player. &#8220;%t&#8221;, &#8220;%a&#8221; and &#8220;%l&#8221; are substituted with the song&#8217;s title, artist and album.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Adding custom transcoders<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can add your own custom transcoder given that it fulfills the following requirements:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>It must have a command line interface.<\/li><li>It must be able to send output to stdout.<\/li><li>If used in transcoding step 2 it must be able to read input from stdin.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Troubleshooting<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Is the transcoder installed in <strong>c:\\subsonic\\transcode<\/strong> (or <strong>\/var\/subsonic\/transcode<\/strong>)?<\/li><li>Is the transcoder activated for your player (in Settings &gt; Players)?<\/li><li>Is the proper file extension added to the list of recognized file types (in Settings &gt; General)?<\/li><li>If it still doesn&#8217;t work, please check the Subsonic log.<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Transcoding is t&#46;&#46;&#46;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-856","post","type-post","status-publish","format-standard","hentry","category-9"],"_links":{"self":[{"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/posts\/856","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/comments?post=856"}],"version-history":[{"count":1,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/posts\/856\/revisions"}],"predecessor-version":[{"id":857,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/posts\/856\/revisions\/857"}],"wp:attachment":[{"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/media?parent=856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/categories?post=856"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.cithwu.com\/wp5444\/wp-json\/wp\/v2\/tags?post=856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}