sylar^z 发表于 2020-8-30 08:11

【树莓派4B测评】+ DLNA服务器搭建

<div class='showpostmsg'><p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">DLNA</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">(</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">DIGITAL LIVING NETWORK ALLIANCE<font face="宋体">,数字生活网络联盟</font><font face="Arial">)</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">的出现是为了实现互联网中</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">数字媒体和内容服务无限制共享</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">的一种解决方案。</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">其前身是</font>DHWG <font face="宋体">(</font><font face="Arial">Digital Home Working Group</font><font face="宋体">,数字家庭工作组),成立于</font><font face="Arial">2003</font><font face="宋体">年</font><font face="Arial">6</font><font face="宋体">月</font><font face="Arial">24 </font><font face="宋体">日, 是由</font></span></span></span></span></span></span></span><a href="https://baike.baidu.com/item/%E7%B4%A2%E5%B0%BC/999090"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">索尼</font></span></span></span></span></span></span></span></a><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">、</font></span></span></span></span></span></span></span><a href="https://baike.baidu.com/item/%E8%8B%B1%E7%89%B9%E5%B0%94/305730"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">英特尔</font></span></span></span></span></span></span></span></a><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">、</font></span></span></span></span></span></span></span><a href="https://baike.baidu.com/item/%E5%BE%AE%E8%BD%AF/124767"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">微软</font></span></span></span></span></span></span></span></a><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">等发起成立的一个非营利性的、合作性质的商业组织。</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">通过</font>DLNA<font face="宋体">协议,在网络中的设备可以实现多媒体数据内容分发功能,以及相关联的搜索、浏览、通知服务、设备控制、内容上传下载等功能。我们常用的</font><font face="Arial">DLNA</font><font face="宋体">功能还是多媒体数据内容分发功能,就是播放远程服务器上的视频、音频及图片。</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">以下是</font>DLNA<font face="宋体">支持的格式:</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">Image</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">:</font></span></span></span></span></span></span></span><a href="https://baike.baidu.com/item/JPEG"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">JPEG</span></span></span></span></span></span></span></a><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">,</font></span></span></span></span></span></span></span><a href="https://baike.baidu.com/item/PNG"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">PNG</span></span></span></span></span></span></span></a><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">,</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">GIF</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">,</font></span></span></span></span></span></span></span><a href="https://baike.baidu.com/item/TIFF/2106"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">TIFF</span></span></span></span></span></span></span></a></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">Audio</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">:</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">LPCM</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">,</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">AAC</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">,</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">&nbsp;AC-3</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">,</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">ATRAC</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">,</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">3plus</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">,</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">MP3</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">,</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">WMA9</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">Video<font face="宋体">:</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">MPEG2</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">,</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">MPEG-1</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">,</font></span></span></span></span></span></span></span><a href="https://baike.baidu.com/item/MPEG-4"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">MPEG-4</span></span></span></span></span></span></span></a><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">,</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">AVC</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">,</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">WMV9</span></span></span></span></span></span></span></span></span></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">在树莓派上实现</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">DLNA</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">服务器,需要实现存储设备</font>(U<font face="宋体">盘</font><font face="Arial">/</font><font face="宋体">移动硬盘</font><font face="Arial">)</font><font face="宋体">挂载及</font><font face="Arial">DLNA</font><font face="宋体">软件安装两个部分。</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">树莓派默认支持</font>FAT32<font face="宋体">格式的存储设备,通过安装驱动可以实现对</font><font face="Arial">NTFS</font><font face="宋体">和</font><font face="Arial">exFAT</font><font face="宋体">格式读写的支持。我现在使用的官方</font><font face="Arial">2020-05-27</font><font face="宋体">版本默认也是支持</font><font face="Arial">NTFS</font><font face="宋体">的。</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">NTFS<font face="宋体">格式支持</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">sudo apt-get install ntfs-3g</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">exFAT<font face="宋体">格式支持</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">sudo apt-get install exfat-fuse</span></span></span></span></span></span></span></span></span></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">U<font face="宋体">盘插入树莓派</font><font face="Arial">4B</font><font face="宋体">后,需要输入密码来接入系统。接入后目录路径在</font><font face="Arial">/media/pi</font><font face="宋体">下,桌面也会出现按一个快捷文件夹。</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">接下去通过配置将</font>U<font face="宋体">盘挂载道固定目录,并在开机时自动挂载。</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">新建挂载文件夹:</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">sudo mkdir /mnt/</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">usb-ntfs</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">设置文件夹的完全读写权限</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">sudo chmod 777 </span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">/mnt/</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">usb-ntfs</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">配置自动挂载</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">打开配置文件</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">sudo nano /etc/fstab</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">配置文件格式如下</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"># &lt;file system&gt;</span></span></span></span></span></span></span>&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">&lt;dir&gt;</span></span></span></span></span></span></span>&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">&lt;type&gt;</span></span></span></span></span></span></span>&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">&lt;options&gt;</span></span></span></span></span></span></span>&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">&lt;dump&gt;</span></span></span></span></span></span></span>&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">&lt;pass&gt;</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">按文件中的格式新增</font>U<font face="宋体">盘的配置即可</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">查询</font>U<font face="宋体">盘的</font><font face="Arial">PARTUID</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">sudo blkid</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">/dev/mmcblk</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">系列是系统的分区挂载,通过</font>LABEL<font face="宋体">标签很容易找到你的</font><font face="Arial">U</font><font face="宋体">盘</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">在配置文件中新增配置项</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">PARTUUID=</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">xxx</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">&nbsp;&nbsp;/mnt/usb-ntfs &nbsp;&nbsp;ntfs-3g &nbsp;&nbsp;&nbsp;defaults</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">,nofail</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;0</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">添加</font>nofial<font face="宋体">选项,在</font><font face="Arial">u</font><font face="宋体">盘未插入时跳过挂载,避免不插</font><font face="Arial">U</font><font face="宋体">盘系统就无法启动的问题。</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">保存退出。直接到打开</font></span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">/mnt/usb-ntfs</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">,查看是否挂在成功。如果看不到,重启下系统再查看。</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">接下去就要安装</font>DLNA<font face="宋体">软件了,使用指令</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">sudo apt-get install minidlna</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">安装完成后,修改</font>minidlna<font face="宋体">的配置文件</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">sudo </span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">nano</span></span></span></span></span></span></span><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">&nbsp;/etc/minidlna.conf</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">修改</font>friendly_name<font face="宋体">配置行,可以修改</font><font face="Arial">dlna</font><font face="宋体">的显示名称</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">注释原</font>media_dir<font face="宋体">配置行,新增下面的路径配置(路径中的文件夹都已经在</font><font face="Arial">U</font><font face="宋体">盘中存在的)</font></span></span></span></span></span></span></span>&nbsp;</span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">media_dir=A,/mnt/usb-ntfs/MUSIC/</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">media_dir=V,/mnt/usb-ntfs/TV/</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">media_dir=V,/mnt/usb-ntfs/MOIVE/</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">media_dir=P,/mnt/usb-ntfs/PICTURES</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">其他默认配置。</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">通过浏览器打开</font>http://ip:8200/<font face="宋体">查看</font><font face="Arial">minidlna</font><font face="宋体">的资源情况。如果打不开,先查看两个设备是否在同一个局域网内。然后使用</font><font face="Arial">sudo service minidlna start</font><font face="宋体">开启</font><font face="Arial">minidlna</font><font face="宋体">服务。</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify">&nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">下面几个是</font>minidlna<font face="宋体">的实用指令</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">启动</font>minidlna<font face="宋体">服务(软件刚安装完默认是启用的)</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">sudo service minidlna start</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">停止</font>minidlna<font face="宋体">服务</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">sudo service minidlna stop</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">让</font>minidlna<font face="宋体">随系统启动</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">sudo update-rc.d minidlna defaults</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">取消</font>minidlna<font face="宋体">随系统启动</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">sudo update-rc.d -f minidlna remove</span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">当</font>minidlna<font face="宋体">目录下资源变更后,更新资源列表</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal">sudo service minidlna force-reload</span></span></span></span></span></span></span></span></span></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-indent:21.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#333333"><span style="letter-spacing:0.0000pt"><span style="text-transform:none"><span style="font-style:normal"><font face="宋体">安装完</font>dlna<font face="宋体">服务器后,下面来说说</font><font face="Arial">dlna</font><font face="宋体">的客户端,首先是本来就支持</font><font face="Arial">dlna</font><font face="宋体">的设备,确保在同一局域网下,直接搜索就能找到树莓派的</font><font face="Arial">dlna</font><font face="宋体">服务器。</font><font face="Arial">Android</font><font face="宋体">设备可以使用</font><font face="Arial">kodi</font><font face="宋体">软件。</font><font face="Arial">Ios</font><font face="宋体">平台推荐</font><font face="Arial">PlayerXtreme</font><font face="宋体">,亲测可用,发现</font><font face="Arial">dlna</font><font face="宋体">服务器速度及播放流畅度都不错,缺点是不免费。免费的</font><font face="Arial">nPlayer Lite</font><font face="宋体">也不错,但是有广告。</font></span></span></span></span></span></span></span></span></span></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>
</div><script>                                        var loginstr = '<div class="locked">查看本帖全部内容,请<a href="javascript:;"   style="color:#e60000" class="loginf">登录</a>或者<a href="https://bbs.eeworld.com.cn/member.php?mod=register_eeworld.php&action=wechat" style="color:#e60000" target="_blank">注册</a></div>';
                                       
                                        if(parseInt(discuz_uid)==0){
                                                                                                (function($){
                                                        var postHeight = getTextHeight(400);
                                                        $(".showpostmsg").html($(".showpostmsg").html());
                                                        $(".showpostmsg").after(loginstr);
                                                        $(".showpostmsg").css({height:postHeight,overflow:"hidden"});
                                                })(jQuery);
                                        }                </script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script>
页: [1]
查看完整版本: 【树莓派4B测评】+ DLNA服务器搭建