您尚未登录。

楼主 #1 2020-10-26 00:19:12

逸俊晨晖
会员
注册时间: 2018-08-29
已发帖子: 151
积分: 137.5

荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

基本思路:
B站投屏和网易云推送音乐是通过DLNA协议实现的 它可以把B站视频和网易云音乐推送到同一网络下支持DLNA的设备
为荔枝派zero配置DLNA客户端需要用到组件gmrender-resurrect 可在buildroot里添加组件 而gmrender-resurrect基于gstreamer1.0实现
我们已经实现了使用gstreamer1.0调用openmax硬解H264
B站通过DLNA投屏时会发送flv封装的H264流 类似于直播
也就是说 我们可以用gstreamer硬解B站投屏视频

联网使用荔枝派zero配套的wifi模块rtl8723bs
视频显示使用配套的800*480屏幕
音频播放使用USB声卡

前置参考:
1.    gstreamer硬解码 https://whycan.com/t_5398.html
2.    rtl8723bs联网 https://whycan.com/t_652.html
3.    USB声卡 https://whycan.com/t_2400.html


buildroot配置:

进入buildroot

make menuconfig

-> Target packages
-> Libraries
-> Networking
liburiparser libhttpparser libsoup libupnpp

-> Target packages
-> Libraries
-> Networking
-> libcurl (BR2_PACKAGE_LIBCURL [=y]) 
-> SSL/TLS library to use (<choice> [=y])
GnuTLS

-> Target packages
-> Networking applications
lftp
HTTP protocol

-> Target packages 
-> Libraries
-> Crypto
gnutls
OpenSSL compatibility library
install tools

-> Target packages
-> Audio and video applications
-> gstreamer 1.x
     gst1-plugins-good
        id3demux
        flv
        mpg123
        souphttpsrc

     gst1-plugins-bad
        id3tag
        mpegdemux
        faad
        fbdev

     gst1-libav取消选择
gst-omx

-> Target packages
-> Audio and video applications
gmrender-resurrect

注意:
gmediarender在启动时会注册所有gstreamer检测到的插件 其中gst1-libav是ffmpeg的所有编解码器 会占用非常大的资源 所以要取消选择 否则无法正常播放 之前试了下 开了它要额外占用6-70M的swap区RAM 这里也可以不取消 直接在荔枝派系统上删除
rm /usr/lib/gstreamer-1.0/libgstlibav.so

进入buildroot的gstreamer修改过的插件目录进行删除标记 否则新添加或者删除的组件不会生效

cd output/build/gst1-plugins-good-1.16.0 rm .stamp_built .stamp_configured .stamp_target_installed
cd ../gst1-plugins-bad-1.16.0/
rm .stamp_built .stamp_configured .stamp_target_installed .stamp_staging_installed
cd ../gst1-libav-1.16.0/
rm .stamp_built .stamp_configured .stamp_target_installed
cd ../../../
rm output/target/usr/lib/gstreamer-1.0/libgstlibav.so
make

编译构建烧录

进入荔枝派zero系统
配置好wifi联网

配置gst-omx硬解码注册

vi /etc/xdg/gstomx.conf

可以发现有两个omxh264dec
第一个把它优先级改为0
rank=0

第二个把它所有键值对替换成

type-name=GstOMXH264Dec                                                                                         
core-name=/usr/lib/libOmxCore.so                                                                                
component-name=OMX.allwinner.video.decoder.avc                                                                  
rank=256                                                                                      
in-port-index=0                                       
out-port-index=1                                                                                      
hacks=no-component-role;no-disable-outport

保存退出

:wq

先用此命令确定gstreamer可以正常播放音视频

gst-launch-1.0 filesrc location=bad_apple.mp4 ! qtdemux name=demux demux.audio_0 \
! queue ! decodebin ! audioconvert ! audioresample ! alsasink \
demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! videoscale ! fbdevsink

接下来可以通过gmediarender运行DLNA客户端了

gmediarender -f "licheePi Zero" --gstout-videosink=fbdevsink --gstout-audiosink=alsasink

B站投屏操作:
手机打开B站搜索bad apple视频打开
点一下视频使其右上角出现TV图标
点击TV图标
点击出现的licheePi Zero设备

网易云推送操作:
点击左上角三条杠
点击设置 直接拉倒最下面
点击连接DLNA设备
点击选择DLNA设备
点击出现的licheePi Zero设备

win10自带播放器推送操作:
在PC上右键一个mp3文件
选择播放到设备
选择licheePi Zero
(如果没找到设备 则再次右键 选择播放到设备 荔枝派zero刚开DLNA客户端可能要重复这个操作几次)

找不到licheePi Zero?
注意:
手机和荔枝派zero要连接到同一个局域网
并且这个局域网不能是这个手机开的热点
比如手机A开热点 荔枝派zero连接上 那么手机A将看不到荔枝派
此时手机B再连接上手机A热点 那么手机B就能看到荔枝派
所以最好将手机和荔枝派都连接到一个路由器wifi上 不要手机开热点
手机开热点 PC和荔枝派zero连接上后 PC可以推送音视频给荔枝派zero

最近编辑记录 逸俊晨晖 (2020-10-26 00:31:38)

离线

楼主 #2 2020-10-26 00:22:55

逸俊晨晖
会员
注册时间: 2018-08-29
已发帖子: 151
积分: 137.5

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

操作演示:

离线

楼主 #3 2020-10-26 01:47:47

逸俊晨晖
会员
注册时间: 2018-08-29
已发帖子: 151
积分: 137.5

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

镜像和使用方法
zero配置DLNA镜像和使用方法.zip

最近编辑记录 逸俊晨晖 (2020-10-26 01:50:12)

离线

#4 2020-10-26 08:23:19

motoedy
会员
注册时间: 2018-05-16
已发帖子: 11
积分: 56

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

膜拜大佬,这个厉害了!

离线

#5 2020-10-26 09:14:18

tianjjff
会员
注册时间: 2018-12-24
已发帖子: 129
积分: 22

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

大佬牛逼!膜拜!!!

离线

#6 2020-11-12 10:21:16

dragoniye
会员
注册时间: 2019-02-07
已发帖子: 39
积分: 37.5

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

mark一下  慢慢学习

离线

#7 2020-11-12 10:49:06

willX
会员
注册时间: 2019-09-06
已发帖子: 40
积分: 24

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

这个厉害了,V3S的硬解确实厉害,不知道openmax能移植到f1c200s上不?如果可以的话,做个支持DLNA的电子相框,确实不错。

离线

#8 2020-11-20 15:45:07

小熊猫
会员
注册时间: 2020-05-21
已发帖子: 71
积分: 65.5

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

赞赞

离线

#9 2020-11-20 19:07:44

powerpan
会员
注册时间: 2019-05-05
已发帖子: 52
积分: 45

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

我们用 S3 做了个专业的。

FluxBB bbcode S3车载

离线

#10 2020-11-24 09:27:04

xfdr0805
会员
注册时间: 2020-07-23
已发帖子: 291
积分: 344

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

膜拜大佬,这个厉害了! airplay要是支持那就全了

离线

#11 2020-11-24 11:50:39

powerpan
会员
注册时间: 2019-05-05
已发帖子: 52
积分: 45

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

xfdr0805 说:

膜拜大佬,这个厉害了! airplay要是支持那就全了

我们是专业的,一直都支持 airplay,github下载代码就行了
但是airplay声音不好。。。。可能故意有损的

离线

#12 2020-11-24 13:49:20

dgtg
会员
注册时间: 2017-11-08
已发帖子: 253
积分: 217.5

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

这个厉害了! 膜拜大佬!

离线

#13 2020-12-18 16:21:29

shunshn
会员
注册时间: 2020-04-13
已发帖子: 15
积分: 15

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

逸俊晨晖 说:

用的这个镜像,本地播放很好,投屏卡的厉害,投屏没走硬解?

离线

#14 2021-01-14 11:44:55

b7376811
会员
注册时间: 2019-09-12
已发帖子: 27
积分: 27

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

大佬,你的显示是用simplefb还是drm?

离线

楼主 #15 2021-01-15 01:38:43

逸俊晨晖
会员
注册时间: 2018-08-29
已发帖子: 151
积分: 137.5

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

shunshn 说:
逸俊晨晖 说:

用的这个镜像,本地播放很好,投屏卡的厉害,投屏没走硬解?

怀疑有没走硬件 你可以把omx注册的硬解码器优先级改0试试

离线

楼主 #16 2021-01-15 01:39:18

逸俊晨晖
会员
注册时间: 2018-08-29
已发帖子: 151
积分: 137.5

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

b7376811 说:

大佬,你的显示是用simplefb还是drm?

荔枝派官方的linux5.2内核 应该是drm

离线

#17 2021-01-16 17:42:31

小智
会员
注册时间: 2019-10-16
已发帖子: 109
积分: 86

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

离线

#18 2021-02-20 10:38:48

sy373466062
会员
注册时间: 2018-11-12
已发帖子: 130
积分: 116

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

学习了,这样子的话,也可以将视屏投屏到Linux电脑上了。

离线

#19 2021-03-22 11:52:31

xfdr0805
会员
注册时间: 2020-07-23
已发帖子: 291
积分: 344

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

感谢大佬,搞定DLNA了,AIRPLAY怎么弄? 我只需要音频

最近编辑记录 xfdr0805 (2021-03-22 14:46:59)

离线

#20 2021-03-26 11:50:26

b7376811
会员
注册时间: 2019-09-12
已发帖子: 27
积分: 27

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

该评论内容与本帖子无关,鼓励各位坑友积极发言讨论与帖子有关的内容!

离线

  • 不通过:与技术无关

#21 2021-08-13 09:54:14

loveme758
会员
注册时间: 2021-01-25
已发帖子: 14
积分: 2.5

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

这不是一般得强啊,什么原理都能用DLNA吗?大佬,能讲讲吗?

离线

#22 2022-01-21 09:38:05

秦皇岛岛主
会员
注册时间: 2020-05-22
已发帖子: 59
积分: 38

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

该评论内容与本帖子无关,鼓励各位坑友积极发言讨论与帖子有关的内容!

离线

  • 不通过:其他

#23 2022-01-21 13:23:57

xiongxinjian
会员
注册时间: 2019-01-13
已发帖子: 43
积分: 13

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

优秀,给你点赞👍👍

离线

#24 2022-05-16 15:12:36

zhou
会员
注册时间: 2019-07-09
已发帖子: 6
积分: 2

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

楼主MPEG-1 Layer 3这个插件在Buildroot哪个位置选择  另外我查了下 下面有存在typefindfunctions: audio/mpeg: mp3, mp2, mp1, mpga 

ERROR [1970-01-01 08:47:40.794009 | gstreamer] uridecodebin1: Error: Your GStreamer installation is missing a plug-in. (Debug: ../gst/playback/gsturidecodebin.c(1027): no_more_pads_full (): /GstPlayBin:play/GstURIDecodeBin:uridecodebin1:
no suitable plugins found:
../gst/playback/gstdecodebin2.c(4720): gst_decode_bin_expose (): /GstPlayBin:play/GstURIDecodeBin:uridecodebin1/GstDecodeBin:decodebin1:
no suitable plugins found:
Missing decoder: MPEG-1 Layer 3 (MP3) (audio/mpeg, mpegversion=(int)1, layer=(int)3, parsed=(boolean)false)
)
ERROR [1970-01-01 08:47:40.799390 | gstreamer] source: Error: Internal data stream error. (Debug: ../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPlayBin:play/GstURIDecodeBin:uridecodebin1/GstSoupHTTPSrc:source:
streaming stopped, reason not-linked (-1))

/ # gst-inspect-1.0 | grep audio
autodetect:  autoaudiosink: Auto audio sink
autodetect:  autoaudiosrc: Auto audio source
typefindfunctions: audio/x-musepack: mpc, mpp, mp+
typefindfunctions: audio/x-au: au, snd
typefindfunctions: audio/qcelp: qcp
typefindfunctions: audio/x-imelody: imy, ime, imelody
typefindfunctions: audio/midi: mid, midi
typefindfunctions: audio/riff-midi: mid, midi
typefindfunctions: audio/mobile-xmf: mxmf
typefindfunctions: audio/x-ttafile: tta
typefindfunctions: audio/x-mod: 669, amf, ams, dbm, digi, dmf, dsm, gdm, far, imf, it, j2b, mdl, med, mod, mt2, mtm, okt, psm, ptm, sam, s3m, stm, stx, ult, umx, xm
typefindfunctions: audio/mpeg: mp3, mp2, mp1, mpga
typefindfunctions: audio/x-ac3: ac3, eac3
typefindfunctions: audio/x-dts: dts
typefindfunctions: audio/x-gsm: gsm
typefindfunctions: audio/x-m4a: m4a
typefindfunctions: application/x-pn-realaudio: ra, ram, rm, rmvb
typefindfunctions: audio/x-wav: wav
typefindfunctions: audio/x-aiff: aiff, aif, aifc
typefindfunctions: audio/x-svx: iff, svx
typefindfunctions: audio/x-paris: paf
typefindfunctions: audio/x-nist: nist
typefindfunctions: audio/x-voc: voc
typefindfunctions: audio/x-sds: sds
typefindfunctions: audio/x-ircam: sf
typefindfunctions: audio/x-w64: w64
typefindfunctions: audio/x-rf64: rf64
typefindfunctions: audio/x-shorten: shn
typefindfunctions: audio/x-amr-nb-sh: amr
typefindfunctions: audio/x-amr-wb-sh: amr
typefindfunctions: audio/iLBC-sh: ilbc
typefindfunctions: audio/x-sbc: sbc
typefindfunctions: audio/x-sid: sid
typefindfunctions: audio/x-flac: flac
typefindfunctions: audio/x-vorbis: no extensions
typefindfunctions: application/x-ogm-audio: no extensions
typefindfunctions: audio/x-speex: no extensions
typefindfunctions: audio/x-celt: no extensions
typefindfunctions: audio/aac: aac, adts, adif, loas
typefindfunctions: audio/x-spc: spc
typefindfunctions: audio/x-wavpack: wv, wvp
typefindfunctions: audio/x-wavpack-correction: wvc
typefindfunctions: audio/x-caf: caf
typefindfunctions: audio/x-nsf: nsf
typefindfunctions: audio/x-gym: gym
typefindfunctions: audio/x-ay: ay
typefindfunctions: audio/x-gbs: gbs
typefindfunctions: audio/x-vgm: vgm
typefindfunctions: audio/x-sap: sap
typefindfunctions: audio/x-kss: kss
typefindfunctions: audio/x-xi: xi
typefindfunctions: audio/audible: aa, aax
typefindfunctions: audio/x-tap-tap: tap
typefindfunctions: audio/x-tap-dmp: dmp
wavparse:  wavparse: WAV audio demuxer
audioconvert:  audioconvert: Audio converter
audioresample:  audioresample: Audio resampler
mpg123:  mpg123audiodec: mpg123 mp3 decoder

最近编辑记录 zhou (2022-05-17 09:24:46)

离线

#27 2023-05-15 13:12:13

merlin
会员
注册时间: 2023-05-11
已发帖子: 5
积分: 15

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

大佬,我的zero设备上用 gst-launch-1.0可以播放本地是视频,也有声音。
gmediarender 运行时,它可以收到B站的投屏,但只能听到声音,没有视频。

请问可以指点一下为什么吗?

离线

#28 2023-05-16 09:47:40

merlin
会员
注册时间: 2023-05-11
已发帖子: 5
积分: 15

Re: 荔枝派zero配置DLNA客户端进行B站投屏和网易云推送音乐

merlin 说:

大佬,我的zero设备上用 gst-launch-1.0可以播放本地是视频,也有声音。
gmediarender 运行时,它可以收到B站的投屏,但只能听到声音,没有视频。

请问可以指点一下为什么吗?

已解决
这是因为gstomx.conf的第二个[omxh264dec],其中rank误设置成0导致的,设置成256即可。

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn