2025年airplay2(airplay2如何使用)

airplay2(airplay2如何使用)1 SSH 连接上锐角云 安装准备包 p p p apt update p p apt install no install recommends build essential git autoconf automake libtool p p libpopt dev p

大家好,我是讯享网,很高兴认识大家。



1.  SSH连接上锐角云,安装准备包

    

    </p><p>    # apt update</p><p>    # apt install --no-install-recommends build-essential git autoconf automake libtool </p><p>        libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev </p><p>        libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev libgcrypt-dev xxd</p><p>   

    

2.  安装 nqptp

    

    </p><p>    $ git clone https://github.com/mikebrady/nqptp.git</p><p>    $ cd nqptp</p><p>    $ autoreconf -fi</p><p>    $ https://www.bilibili.com/read/configure --with-systemd-startup</p><p>    $ make</p><p>    # make install</p><p>   

    

    </p><p>    # systemctl enable nqptp</p><p>    # systemctl start nqptp</p><p>   

    

3.  安装Mqtt client

    

    </p><p>    apt install libmosquitto-dev</p><p>   

    

4.  安装Shairport-Sync,这里没有使用Apple的解码包 –with-apple-alac

    

    </p><p>    $ git clone https://github.com/mikebrady/shairport-sync.git</p><p>    $ cd shairport-sync</p><p>    $ autoreconf -fi</p><p>    $ https://www.bilibili.com/read/configure --sysconfdir=/etc --with-alsa </p><p>       --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-airplay-2 </p><p>       --with-stdout --with-pipe  --with-metadata </p><p>       --with-mqtt-client</p><p>    $ make</p><p>    # make install</p><p>   

    

5.  配置文件


讯享网

    

    </p><p>    #/etc/shairport-sync.conf</p><p>    </p><p>    general = {</p><p>      name = &#34;惠威音箱&#34;;</p><p>      output_backend = &#34;alsa&#34;; </p><p>      port = 7100;  #7000</p><p>      #alac_decoder = &#34;hammerton&#34;;   #apple</p><p>    };</p><p>    </p><p>    alsa =</p><p>    {</p><p>            output_device = &#34;default&#34;;</p><p>    };</p><p>    </p><p>    metadata =</p><p>    {</p><p>          enabled = &#34;yes&#34;;</p><p>          include_cover_art = &#34;yes&#34;; </p><p>          cover_art_cache_directory = &#34;/tmp/shairport-sync/.cache/coverart&#34;; </p><p>          pipe_name = &#34;/tmp/shairport-sync-metadata&#34;;</p><p>          pipe_timeout = 5000; </p><p>    </p><p>    };</p><p>    </p><p>    mqtt =</p><p>    {</p><p>         enabled = &#34;yes&#34;;  </p><p>          hostname = &#34;192.168.1.xx&#34;; </p><p>          port = 1883;  </p><p>          username = &#34;mqtt&#34;; </p><p>          password = &#34;xxxx&#34;; </p><p>         topic = &#34;player/shairport&#34;;  </p><p>          publish_parsed = &#34;yes&#34;; </p><p>          empty_payload_substitute = &#34;--&#34;; </p><p>          publish_cover = &#34;yes&#34;;</p><p>         enable_remote = &#34;yes&#34;; </p><p>    };</p><p>    </p><p>    </p><p>    sessioncontrol =</p><p>    {</p><p>          active_state_timeout = 30.0;</p><p>          allow_session_interruption = &#34;yes&#34;;  </p><p>          session_timeout = 120; </p><p>    };</p><p>   

    

6.  启动

    

    </p><p>    # systemctl enable shairport-sync</p><p>    # systemctl restart shairport-sync</p><p>   

    

7.  日志

    

    </p><p>    systemctl enable shairport-sync</p><p>   

    

8.  接入Home-assistant

    

    </p><p>    # Shairport Sync media player for Home Assistant</p><p>      # https://github.com/parautenbach/hass-shairport-sync</p><p>      # https://www.home-assistant.io/integrations/universal/</p><p>      media_player:</p><p>          - platform: shairport_sync</p><p>            name: shairport</p><p>            topic: player/shairport</p><p>   

    

二、测试播放

三、加入苹果家庭APP,HomeKit。

小讯
上一篇 2025-04-27 12:35
下一篇 2025-04-25 21:23

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/189648.html