当前位置:网站首页 > R语言数据分析 > 正文

airplay2(airplay2如何使用)



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

    

    ```

    # apt update

    # apt install --no-install-recommends build-essential git autoconf automake libtool

        libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev

        libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev libgcrypt-dev xxd

    ```

    

2.  安装 nqptp

    

    ```

    $ git clone https://github.com/mikebrady/nqptp.git

    $ cd nqptp

    $ autoreconf -fi

    $ https://www.bilibili.com/read/configure --with-systemd-startup

    $ make

    # make install

    ```

    

    ```

    # systemctl enable nqptp

    # systemctl start nqptp

    ```

    

3.  安装Mqtt client

    

    ```

    apt install libmosquitto-dev

    ```

    

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

    

    ```

    $ git clone https://github.com/mikebrady/shairport-sync.git

    $ cd shairport-sync

    $ autoreconf -fi

    $ https://www.bilibili.com/read/configure --sysconfdir=/etc --with-alsa

       --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-airplay-2

       --with-stdout --with-pipe  --with-metadata

       --with-mqtt-client

    $ make

    # make install

    ```

    

5.  配置文件

    

    ```

    #/etc/shairport-sync.conf

    

    general = {

      name = "惠威音箱";

      output_backend = "alsa"; 

      port = 7100;  #7000

      #alac_decoder = "hammerton";   #apple

    };

    

    alsa =

    {

            output_device = "default";

    };

    

    metadata =

    {

          enabled = "yes";

          include_cover_art = "yes"; 

          cover_art_cache_directory = "/tmp/shairport-sync/.cache/coverart"; 

          pipe_name = "/tmp/shairport-sync-metadata";

          pipe_timeout = 5000; 

    

    };

    

    mqtt =

    {

         enabled = "yes";  

          hostname = "192.168.1.xx"; 

          port = 1883;  

          username = "mqtt"; 

          password = "xxxx"; 

         topic = "player/shairport";  

          publish_parsed = "yes"; 

          empty_payload_substitute = "--"; 

          publish_cover = "yes";

         enable_remote = "yes"; 

    };

    

    

    sessioncontrol =

    {

          active_state_timeout = 30.0;

          allow_session_interruption = "yes";  

          session_timeout = 120; 

    };

    ```

    

6.  启动

    

    ```

    # systemctl enable shairport-sync

    # systemctl restart shairport-sync

    ```

    

7.  日志

    

    ```

    systemctl enable shairport-sync

    ```

    

8.  接入Home-assistant

    

    ```

    # Shairport Sync media player for Home Assistant

      # https://github.com/parautenbach/hass-shairport-sync

      # https://www.home-assistant.io/integrations/universal/

      media_player:

          - platform: shairport_sync

            name: shairport

            topic: player/shairport

    ```

    

二、测试播放

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

到此这篇airplay2(airplay2如何使用)的文章就 介绍到这了,更多相关内容请继续浏览下面的相关 推荐文章,希望大家都能在 编程的领域有一番成就!

版权声明


相关文章:

  • redis为啥不使用长连接(redis不能连接)2025-03-28 08:45:04
  • miracl密码库(mct密码库)2025-03-28 08:45:04
  • store to store翻译(store is not available翻译)2025-03-28 08:45:04
  • spring详细教程(spring教程 csdn)2025-03-28 08:45:04
  • Resnet101模型(resnet101参数)2025-03-28 08:45:04
  • ifstream读取文件不存在报错吗?(ifstream fin读取)2025-03-28 08:45:04
  • 文件的权限是-rwxr(文件的权限是-rwxr--r--,描述正确的是____?)2025-03-28 08:45:04
  • vier是什么品牌(viera是什么牌子)2025-03-28 08:45:04
  • arg怎么读?(matter怎么读)2025-03-28 08:45:04
  • pdf expert截图(pdfexpert怎么截图)2025-03-28 08:45:04
  • 全屏图片