cqzhangjunhua 发表于 2022-11-22 18:35

把机顶盒(数码视讯Q5)打造成Upnp_Dlna播放器

数码视讯Q5机顶盒介绍:


数码视讯Q5
CPU:晶晨S905M4核1.5G
内存:1g
存储:8G
显卡:Mali-450
接口:HDMI
      USB2.0(两个)
      AV
      TF卡槽
      RJ45(100M)


带2.4无线
电源:DC12V 1A


目前闲鱼的售价在:50-70元。


购买数码视讯Q5时,必须问清楚,是否可以插tf卡打游戏,可以插tf卡打游戏才买,可以插tf卡打游戏才买,可以插tf卡打游戏才买,


以下是所需软件下载链接
链接:https://pan.baidu.com/s/1q2n-Tc-5JCwvHitMHXswpQ
提取码:cqzz




一.安装armbian系统


    1.固件:Armbian_5.44_S9xxx_Debian_stretch_3.14.29_icewm_20180601.img


    2.将系统文件写入TF卡


    2.1.用DiskGenius软件将TF卡分成一个FAT32的区(分区类型:MBR)并格式化。
      注:TF卡容量大于和等于4g
    2.2.Win32DiskImager或者UltraISO将img文件写入TF卡。


    3.配置dtb文件


       这是这个固件非常智能的地方:不用配置dtb文件,不知道n1需不需要配置dtb文件(我没有n1,无法验证)。


    4.进入系统并简单设置
    4.1.将TF卡插进卡槽,接上电源、网线、HDMI线;
    4.2.按开关键,通电,然后耐心等候。
    4.3.打开电脑的浏览器,输入路由器地址,进入路由器设置,查看局域网内的设备及地址,当看到设备名:amlogic,则记下地址。
    4.4.打开PuTTY软件,并在地址栏输入aml的地址,点击打开
    4.5.在login as:输入:root
    4.6.在root@192.168.X.X's password:输入:1234(默认密码)


显示:
login as: root
root@192.168.2.43's password:
You are required to change your password immediately (root enforced)
____    ___
/___| /_\__    ____    ____    __
\___   \(_)\\//\\//\\//
___)   \__,|>   <>   <>   <
| ____/    /_ //_/\ _\/_/\_ \/_ /\ _\




Welcome to ARMBIAN 5.44 user-built Debian GNU/Linux 9 (stretch) 3.14.29
System load:   1.24 0.72 0.29   Up time:       3 min
Memory usage:8 % of 766MB   IP:            192.168.2.43
Usage of /:    13% of 15G


[ General system configuration (beta): armbian-config ]


New to Armbian? Check the documentation first: https://docs.armbian.com
Changing password for root.
(current) UNIX password:


输入root的旧密码:1234
显示
Enter new UNIX password:


输入root的新密码:67773240
显示:
Retype new UNIX password:
再次输入root的新密码:67773240
显示:
Thank you for choosing Armbian! Support: www.armbian.com


Creating a new user account. Press <Ctrl-C> to abort
Desktop environment will not be enabled if you abort the new user creation


Please provide a username (eg. your forename):


输入新用户名:cqzhangjunhua
显示:
Creating home directory `/home/cqzhangjunhua' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:


输入cqzhangjunhua的密码:67773240
显示:
Retype new UNIX password:
再次输入cqzhangjunhua的密码:677732340
显示:
passwd: password updated successfully
Changing the user information for cqzhangjunhua
Enter the new value, or press ENTER for the default
      Full Name []:
按回车
显示
Room Number []:
按回车
显示
Work Phone []:
按回车
显示
Home Phone []:
按回车
显示
Other []:
按回车
显示
Is the information correct?
输入:y
显示
Sucesfuul setup. Reboot system.


系统重启,表示安装完成。



重新以root身份和新设置密码登录系统




二.更新系统


   1.nano /etc/apt/sources.list


#中科大
deb https://mirrors.ustc.edu.cn/debian/ stretch main non-free contrib
deb https://mirrors.ustc.edu.cn/debian/ stretch-updates main non-free contrib
deb https://mirrors.ustc.edu.cn/debian/ stretch-backports main non-free contrib
deb https://mirrors.ustc.edu.cn/debian-security/ stretch/updates main non-free contrib


   2.nano /etc/hosts


   在文件后面加入以下内容


172.67.212.135 www.rutracker.org
172.65.229.194 www.deepl.com


199.232.174.132 deb.debian.org
199.232.142.132 deb.debian.org
146.75.114.132 deb.debian.org
151.101.78.132 deb.debian.org
151.101.110.132 deb.debian.org
185.199.111.133 raw.githubusercontent.com
185.199.110.133 raw.githubusercontent.com
185.199.108.133 raw.githubusercontent.com
182.43.124.6 raw.githubusercontent.com
185.199.109.133 raw.githubusercontent.com
185.199.108.133 user-images.githubusercontent.com
185.199.108.133 avatars2.githubusercontent.com
185.199.108.133 avatars1.githubusercontent.com
151.101.110.132 httpredir.debian.org
151.101.194.132 security.debian.org


204.68.111.105 downloads.sourceforge.net


116.211.120.228 bbs.hifidiy.net


205.166.94.4 ralph.irving.sdf.org


103.235.46.40 baidu.com


185.199.111.133 objects.githubusercontent.com
185.199.108.133 objects.githubusercontent.com
185.199.110.133 objects.githubusercontent.com
185.199.109.133 objects.githubusercontent.com


140.82.114.4 github.com
20.205.243.166 github.com
192.30.255.112 github.com
192.30.255.113 github.com


   保存退出:Ctrl+O、Enter、Ctrl+X


   2.apt-get update


出错提示:


Reading package lists... Done
W: GPG error: https://mirrors.ustc.edu.cn/debian stretch-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
W: The repository 'https://mirrors.ustc.edu.cn/debian stretch-backports InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

解决方法:


apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138


apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9


   apt-get update


   apt-get upgrade


出错提示:


E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?


解决方法:


输入:ps -A | grep apt
显示
5270 ?      00:00:00 apt.systemd.dai
5274 ?      00:00:00 apt.systemd.dai
输入:kill -SIGKILL 5270
输入:ps -A | grep apt
显示
5274 ?      00:00:00 apt.systemd.dai
输入:kill -SIGKILL 5274
输入:ps -A | grep apt
显示没有


输入:reboot


系统重启,等几分钟后登录。



   apt-get upgrade




三.编译gmrender-resurrect


   1.编译前的准备工作


   1.1.在典型的 Ubuntu 或 Debian 系统上,您需要能够引导编译配置的工具(编译依赖):


       apt-get install build-essential autoconf automake libtool pkg-config


   1.2.安装依赖


      apt-get install libupnp-dev libgstreamer1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav


   1.3.安装音频sink


       apt-get install gstreamer1.0-alsa gstreamer1.0-pulseaudio            
            
   1.4查看源代码:


       git clone https://github.com/hzeller/gmrender-resurrect.git
      
   1.5.然后配置和构建


       find / -name gmrender-resurrect


       cd /root/gmrender-resurrect


       ./autogen.sh


       ./configure


       make


       make install


   编译后的命令名字为:gmediarender


   查看gmediarender命令:


   gmediarender --help


root@aml:~# gmediarender --help
Usage:
gmediarender - GMediaRender


Help Options:
-h, --help                               Show help options
                                                   显示帮助选项
--help-all                              Show all help options
                                                    显示全部帮助选项
--help-gstout                        Show GStreamer Output Options
                                                    显示GStreamer输出选项   
--help-gst                               Show GStreamer Options
                                                    显示GStreamer选项


Application Options:
               应用选项
--version                                 Output version information and exit
                                                   输出版本信息并退出
-I, --interface-name                The local interface name the service is running and advertised
                                                   该服务正在运行并公布的本地接口名称
-p, --port                              Port to listen to; (libupnp does not use SO_REUSEADDR, so might increment)
                                                   监听的端口
-u, --uuid                              UUID to advertise
                                                   
-f, --friendly-name                   Friendly name to advertise.
                                                   
-o, --output                           Output module to use.
-P, --pid-file                           File the process ID should be written to.
-d, --daemon                           Run as daemon.
--mime-filter                            Filter the supported media types. e.g. Audio only: '--mime-filter audio'. Disable FLAC: '--mime-filter -audio/x-flac'.
--logfile                                    Debug log filename. Use 'stdout' or 'stderr' to log to console.
--list-outputs                            List available output modules and exit
--dump-devicedesc                   Dump device descriptor XML and exit.
--dump-connmgr-scpd             Dump Connection Manager service description XML and exit.
--dump-control-scpd                Dump Rendering Control service description XML and exit.
--dump-transport-scpd             Dump A/V Transport service description XML and exit.


   2.设置gmediarender


   2.1.设置系统默认声卡为:USB解码器


   接上USB解码器,输入以下命令查看USB解码器信息


   cat /proc/asound/cards


显示:


1 : USB-Audio - HU400 HiFi 2.0
                      Yunyue Audio HU400 HiFi 2.0 at usb-c9000000.dwc2_a-1, high speed


   2.2.通过/etc/asound.conf文件,设置系统默认声卡:


   nano /etc/asound.conf


   将以下内容添加到文件里:


pcm.!default {
      type hw
      card 1
      device 0
}


ctl.!default {
      type hw
      card 1
}


   重新启动系统


   reboot


   输入以下命令


   gmediarender -f Q5_render


   2.3安卓手机上安装Bubbleupnp


   在手机中打开Bubbleupnp,Bubbleupnp会自动搜索upnp播放器,在播放器中选择Q5_render,就可以将手机内的音乐


推送到数码视讯Q5所接的USB解码器中播放,而且好像是源码播放,在解码器里会显示“PCM44k"或“PCM   192k”。


   在播放 44k音乐时,CPU的负担,一般在3%左右,最大不超过5%
   在播放192k音乐时,CPU的负担,一般在9%左右,最大不超过13%


   遗憾的有两点:


         一点是:不能播放DSD,或者是我没有找到此类软件吧?有知道请告诉我;


         二点是:只能有线接路由器,不能通过数码视讯Q5自带的wifi连接路由器播放,
            说明:Armbian_5.44_S9xxx_Debian_stretch_3.14.29_icewm_20180601.img是集成了8189es的驱动,
                     数码视讯Q5,在主板上查看wifi芯片型号为8189ETV,8189ETV和8189es的驱动是一样的。
                     我在后面将数码视讯Q5无线驱动安装及设置方法附上。供各位热心朋友钻研。



   2.4.设置开机自动执行以上命令


   nano /etc/rc.local


   将以下命令写入文件(必须在exit 0之前)


/etc/rc.local全部内容:


#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#


gmediarender -f Q5_render


# By default this script does nothing.


exit 0


    将gmediarender -f Q5_render 命令添加在exit 0之前的一行里


   保存退出



   重新启动系统,这样不必每次输入命令。




四.设置wifi


   1.wifi驱动加载


    拆开数码视讯Q5,在主板上查看wifi芯片型号为8189ETV。


   输入命令


   modprobe 8189es                                              #8189ETV和8189ES的驱动是相同的。


   输入命令


   armbian-config


    选择:"Network"


    如果在弹出框中有“wlan0”则表示wifi驱动安装成功。


    选择: “wlan0”、 选择:"WiFi",然后选择要连接的wifi名,输入连接密码,选择“OK”按钮,退出,然后拔掉网线,重新启动就可以连接wifi了。


    如果想要开机自动加载WiFi驱动,


    nano /boot/hdmi.sh


    将以下命令写入文件(必须在exit 0之前)


modprobe 8189es


exit 0


   保存退出



   重新启动系统,这样不必每次输入命令。

恶灵森林 发表于 2022-11-23 10:00

S905真是神U啊,当初买回来用来玩怀旧模拟器,后来有人改出来播电影,现在又能改播放器;P

胡萝卜甜菜汤 发表于 2022-11-23 10:06

这系统没有写入flash?

cqzhangjunhua 发表于 2022-11-24 09:33

胡萝卜甜菜汤 发表于 2022-11-23 10:06
这系统没有写入flash?

有,见http://www.erji.net/forum.php?mod=viewthread&tid=2283866&extra=

胡萝卜甜菜汤 发表于 2022-11-24 09:34

cqzhangjunhua 发表于 2022-11-24 09:33
有,见http://www.erji.net/forum.php?mod=viewthread&tid=2283866&extra=

挖藕

helix 发表于 2022-11-24 09:45

牛逼,点赞!!!!

在树莓派板子价格起飞的现在显得无比有用
页: [1]
查看完整版本: 把机顶盒(数码视讯Q5)打造成Upnp_Dlna播放器