Raspberry Pi + Rune Audio ::: Một trải nghiệm nghe nhạc mới

quatmo

Well-Known Member
Tool này download nhạc từ Youtube tiện dụng và nhanh chóng đây các bác.
Thích bài nào vào đó search ra ngay - bấm chọn audio/webm (Opus) - download
(xem trực tiếp thì mp4 - audio 96k)

Download thẳng vào Nas hay SD Card của Pi (map network )
Tool: https://invidio.us/

Mã nguồn mở, support cài cho Arch Linux và Debian (mình chưa thử)
https://github.com/omarroth/invidious

Invidious.jpg
 

tml3nr

Moderator
Tool này download nhạc từ Youtube tiện dụng và nhanh chóng đây các bác.
Thích bài nào vào đó search ra ngay - bấm chọn audio/webm (Opus) - download
(xem trực tiếp thì mp4 - audio 96k)

Download thẳng vào Nas hay SD Card của Pi (map network )
Tool: https://invidio.us/

Mã nguồn mở, support cài cho Arch Linux và Debian (mình chưa thử)
https://github.com/omarroth/invidious

View attachment 349114
Trang này hay quá anh. Nếu mình mod được cho nó đẩy link webm / opus sang MPD là hết tuồng :rolleyes:

PS: hình như file down về phải qua proxy của invidio.us? Tốc độ em thấy chậm hơn nhiều so với dùng 3D Youtube Downloader?

https://yd.3dyd.com/home/
 
Chỉnh sửa lần cuối:

quatmo

Well-Known Member
Trang này hay quá anh. Nếu mình mod được cho nó đẩy link webm / opus sang MPD là hết tuồng :rolleyes:
Mong chờ anh em mod!

Hiện nay có 3 core hay dùng để streaming/download Youtube

1. youtube-dl

2. node-ytdl (Node JS)
Mình xem code, đính chính lại: Volumio dùng core này để lấy thông tin file (giải mã đường link, Id, Info, quality, thumbnail...) video/audio Mp4 96k/32bit với itag:18 và đẩy thẳng qua MPD play. Không gán được itag khác vd: 251 chỉ có audio webm. Có lẽ do Youtube không cho streaming chất lượng cao hơn. (Opus itag: 251)

3. invidious

PS: hình như file down về phải qua proxy của invidio.us? Tốc độ em thấy chậm hơn nhiều so với dùng 3D Youtube Downloader?
https://yd.3dyd.com/home/
Download trực tiếp, mình nghĩ không phải qua proxy đâu, chậm hơn là do kỹ thuật download khác nhau.
Phần mềm 3D Youtube Downloader dùng kỹ thuật chia nhỏ phân đoạn file thành nhiều luồng "Segmented file transfer" (tương tự IDM). Nó có ghi tính năng: fast processing (using multipart download for files and HTTP compression for pages).
 
Chỉnh sửa lần cuối:

tml3nr

Moderator
Mong chờ anh em mod!

Hiện nay có 3 core hay dùng để streaming/download Youtube

1. youtube-dl

2. node-ytdl (Node JS)
Mình xem code, đính chính lại: Volumio dùng core này để lấy thông tin file (giải mã đường link, Id, Info, quality, thumbnail...) video/audio Mp4 96k/32bit với itag:18 và đẩy thẳng qua MPD play. Không gán được itag khác vd: 251 chỉ có audio webm. Có lẽ do Youtube không cho streaming chất lượng cao hơn. (Opus itag: 251)

3. invidious


Download trực tiếp, mình nghĩ không phải qua proxy đâu, chậm hơn là do kỹ thuật download khác nhau.
Phần mềm 3D Youtube Downloader dùng kỹ thuật chia nhỏ phân đoạn file thành nhiều luồng "Segmented file transfer" (tương tự IDM). Nó có ghi tính năng: fast processing (using multipart download for files and HTTP compression for pages).
Em thử download audio opus Adele - Hello bằng 3 cách để xem nó lấy về từ server nào:


1. https://invidio.us/

Mã:
https://invidio.us/videoplayback?expire=1560174826&ei=igz-XOD7IYaphwbPzL_YCA&ip=2604%3Aa880%3A400%3Ad1%3A%3A92a%3Ab001&id=o-AIBEYnXXtijrTz2JIyDyVVANFquMLjjLisi2ruExcfjf&itag=251&source=youtube&requiressl=yes&mm=31%2C26&mn=sn-ab5szn7r%2Csn-tt1eln7s&ms=au%2Conr&mv=m&pl=49&initcwndbps=185000&mime=audio%2Fwebm&gir=yes&clen=5848944&dur=366.861&lmt=1537990192574865&mt=1560153104&fvip=5&keepalive=yes&c=WEB&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cpl%2Cinitcwndbps&lsig=AHylml4wRAIgMMl0JgdLdlLPnBSxThCB4IJqatu2kP-kqbl48JhCdJ4CIBBTu2vsFNC-fDIBQwBSxoFwBqUFjE30btdOxYJq2O9S&host=r5---sn-ab5szn7r.googlevideo.com&sig=ALgxI2wwRQIgGuMPYlJ73EvDTdImC7XTbSIGnzLDHIWlDXVmZMiEbC4CIQD36omyswjoKPxVeH30Cat-SLMLTzYl8E5oTpUtEp1g4g==&title=Adele%20-%20Hello-YQHsXMglC9A.webm

2. https://www.genyt.net/

Mã:
https://r5---sn-8qj-nboel.googlevideo.com/videoplayback?id=o-AFeTgEvmEIWtOtdiDf_MNubgRmbneVntL1KAFgM4MvMZ&itag=251&source=youtube&requiressl=yes&pl=21&ei=JQ3-XPa8AZWYiwSRu7SwDg&mime=audio%2Fwebm&gir=yes&clen=5848944&dur=366.861&lmt=1537990192574865&fvip=5&keepalive=yes&c=WEB&txp=5511222&ip=107.178.194.216&ipbits=0&expire=1560174981&sparams=clen,dur,ei,expire,gir,id,ip,ipbits,itag,lmt,mime,mip,mm,mn,ms,mv,pl,requiressl,source&key=cms1&signature=774241E007EB57B96943FEB9055E208772DB05CA.42D53E2AC6FE4F5206B9B45D752EA04823C0ED61&ratebypass=yes&utmg=ytap1&title=Adele_-_Hello.webm&cms_redirect=yes&mip=113.161.84.223&mm=31&mn=sn-8qj-nboel&ms=au&mt=1560153285&mv=m

3. 3D Youtube Downloader:

Em dùng netstat kiểm tra thì thấy trong quá trình download phát sinh giao dịch với IP 113.171.243.80 (IP này của google)

3d-youtube-check-ip.png
 

tml3nr

Moderator
Theo em hướng dễ nhất bây giờ là mod cái addon tương tự như "Send link by email" cho nó đẩy link sang MPD. MPD mình chỉ cần bật ffmpeg là phát được opus ngon nhất của Youtube. Thao tác tương đối sễ chịu, playlist mình tính sau :rolleyes:

Chắc là cần phải kết hợp với mpd client chạy trên PC để đẩy link.

https://chrome.google.com/webstore/...or-gma/plcgkgghkdfgfhiidfjkhmainebgmklf?hl=en

https://chrome-extension-downloader.com/

PS: Mình phải đi đường vòng có thể do vướng luật? Các phần mềm không được phép dùng API của YT để lấy opus?

youtube-opus-4.jpg
 
Chỉnh sửa lần cuối:

linh0983

Well-Known Member
https://www.ebay.com/itm/Interface-digitale-I2S-vers-SPDIF-BNC-WM8804/183793686935?_trkparms=aid=222007&algo=SIM.MBE&ao=2&asc=20131003132420&meid=62e0d2ed8cbe40c8b22b2715a14d2590&pid=100005&rk=1&rkt=3&sd=183793686737&itm=183793686935&_trksid=p2047675.c100005.m1851

Board này có con XinlinX XC95144XL + WM8805 chuyên dùng a . ( jitte thấp ) . o_O
Board này dùng cho FifoPi 1 vào 2 ra : ( bác @mtminh xem thử a ) . :D

* __ I2S output vào input i2S_HDMI >>> Dac có HDMI input
** __ SPDIF BNC OUT >>> Dac có BNC và COAXIAL input

2.jpg
Tìm mãi bên taobao bây giờ mới thấy dùng cho nhánh I2S còn lại của FifoPi .
Nhánh I2S trước X26 đã dùng . :rolleyes:

SD1.jpg


https://item.taobao.com/item.htm?sp...118&pvid=4ccbbfe1-dd85-4cbc-89b3-29fd9ea32324
Board này dùng cho chú amply tích hợp dual Wolfson WM8740 . ;):D
 

quatmo

Well-Known Member
Em thử download audio opus Adele - Hello bằng 3 cách để xem nó lấy về từ server nào:


1. https://invidio.us/

Mã:
https://invidio.us/videoplayback?expire=1560174826&ei=igz-XOD7IYaphwbPzL_YCA&ip=2604%3Aa880%3A400%3Ad1%3A%3A92a%3Ab001&id=o-AIBEYnXXtijrTz2JIyDyVVANFquMLjjLisi2ruExcfjf&itag=251&source=youtube&requiressl=yes&mm=31%2C26&mn=sn-ab5szn7r%2Csn-tt1eln7s&ms=au%2Conr&mv=m&pl=49&initcwndbps=185000&mime=audio%2Fwebm&gir=yes&clen=5848944&dur=366.861&lmt=1537990192574865&mt=1560153104&fvip=5&keepalive=yes&c=WEB&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cpl%2Cinitcwndbps&lsig=AHylml4wRAIgMMl0JgdLdlLPnBSxThCB4IJqatu2kP-kqbl48JhCdJ4CIBBTu2vsFNC-fDIBQwBSxoFwBqUFjE30btdOxYJq2O9S&host=r5---sn-ab5szn7r.googlevideo.com&sig=ALgxI2wwRQIgGuMPYlJ73EvDTdImC7XTbSIGnzLDHIWlDXVmZMiEbC4CIQD36omyswjoKPxVeH30Cat-SLMLTzYl8E5oTpUtEp1g4g==&title=Adele%20-%20Hello-YQHsXMglC9A.webm

2. https://www.genyt.net/

Mã:
https://r5---sn-8qj-nboel.googlevideo.com/videoplayback?id=o-AFeTgEvmEIWtOtdiDf_MNubgRmbneVntL1KAFgM4MvMZ&itag=251&source=youtube&requiressl=yes&pl=21&ei=JQ3-XPa8AZWYiwSRu7SwDg&mime=audio%2Fwebm&gir=yes&clen=5848944&dur=366.861&lmt=1537990192574865&fvip=5&keepalive=yes&c=WEB&txp=5511222&ip=107.178.194.216&ipbits=0&expire=1560174981&sparams=clen,dur,ei,expire,gir,id,ip,ipbits,itag,lmt,mime,mip,mm,mn,ms,mv,pl,requiressl,source&key=cms1&signature=774241E007EB57B96943FEB9055E208772DB05CA.42D53E2AC6FE4F5206B9B45D752EA04823C0ED61&ratebypass=yes&utmg=ytap1&title=Adele_-_Hello.webm&cms_redirect=yes&mip=113.161.84.223&mm=31&mn=sn-8qj-nboel&ms=au&mt=1560153285&mv=m

3. 3D Youtube Downloader:

Em dùng netstat kiểm tra thì thấy trong quá trình download phát sinh giao dịch với IP 113.171.243.80 (IP này của google)

3d-youtube-check-ip.png


Mình Ip Tracker: IP 113.171.243.80 là của nhà cung cấp mạng ở VN, VNPT, xài nhà mạng nào thì nó gán vào link ip nhà cung cấp đó.

Mình xem file log này của Volumio, xài Netnam thì nó gán 101.53.38.68
Mã:
https://r1---sn-oxuo5h-nboe.googlevideo.com/videoplayback?id=o-ACXu6lmKlW6mocUsX-qJ7OveA4F2RWqs6tqSIQ9TKmMp&itag=18&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-oxuo5h-nboe%2Csn-8pxuuxa-nboek&ms=au%2Crdu&mv=m&pl=24&ei=efv9XJrbGPO5igajvpK4CQ&initcwndbps=525000&mime=video%2Fmp4&gir=yes&clen=20863515&ratebypass=yes&dur=233.917&lmt=1534571084585339&mt=1560148752&fvip=7&c=WEB&ip=101.53.38.68&ipbits=0&expire=1560170457&sparams=ip%2Cipbits%2Cexpire%2Cid%2Citag%2Csource%2Crequiressl%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cei%2Cinitcwndbps%2Cmime%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&key=yt8&signature=BD2C5F56D7F8256A148E732EAD2FF500EA3E4FE7.DB638DEA2877E6D378409A117EA0D79B57A61047

Thử download cái khác bằng genyt.net thì lại thấy IP Google 107.178.194.193
Trong 1 link có 2 ip khác nhau
Screen Shot 2019-06-10 at 5.30.20 PM.png

 

Đính kèm

  • Screen Shot 2019-06-10 at 4.43.19 PM.png
    Screen Shot 2019-06-10 at 4.43.19 PM.png
    65.2 KB · Xem: 21
Chỉnh sửa lần cuối:

zeze

Well-Known Member
Cô ca sĩ Adele hát bài Hello tuyệt hay, nội dùng bài hát thật ý nghĩa, buồn sâu xa, miên man, gợi nhớ... Giọng ca hơi na ná Céline Dion hát bài My Heart Will Go on.
----------------------------------------
Hello, it's me
I was wondering if after all these years you'd like to meet
To go over everything
They say that time's supposed to heal ya
But I ain't done much healing
Hello, can you hear me?
I'm in California dreaming about who we used to be
When we were younger and free
I've forgotten how it felt
Before the world fell at our feet

There's such a difference between us
And a million miles

Hello from the other side
I must have called a thousand times
To tell you I'm sorry for everything that I've done
But when I call you never seem to be home
Hello from the outside
At least I can say that I've tried
To tell you I'm sorry for breaking your heart
But it don't matter, it clearly doesn't tear you apart
Anymore

Hello, how are you?
It's so typical of me to talk about myself, I'm sorry
I hope that you're well
Did you ever make it out of that town
Where nothing ever happened?

It's no secret that the both of us
Are running out of time

So hello from the other side (other side)
I must have called a thousand times (thousand times)
To tell you I'm sorry for everything that I've done
But when I call you never seem to be home
Hello from the outside (outside)
At least I can say that I've tried (I've tried)
To tell you I'm sorry for breaking your heart
But it don't matter, it clearly doesn't tear you apart
Anymore

(Highs, highs, highs, highs, lows, lows, lows, lows)
Anymore
(Highs, highs, highs, highs, lows, lows, lows, lows)
Anymore
(Highs, highs, highs, highs, lows, lows, lows, lows)
Anymore
(Highs, highs, highs, highs, lows, lows, lows, lows)
Anymore

Hello from the other side (other side)
I must have called a thousand times (thousand times)
To tell you I'm sorry for everything that I've done
But when I call you never seem to be home
Hello from the outside (outside)
At least I can say that I've tried (I've tried)
To tell you I'm sorry for breaking your heart
But it don't matter, it clearly doesn't tear you apart
Anymore
 

tml3nr

Moderator
Mình Ip Tracker: IP 113.171.243.80 là của nhà cung cấp mạng ở VN, VNPT, xài nhà mạng nào thì nó gán vào link ip nhà cung cấp đó.

Mình xem file log này của Volumio, xài Netnam thì nó gán 101.53.38.68
Mã:
https://r1---sn-oxuo5h-nboe.googlevideo.com/videoplayback?id=o-ACXu6lmKlW6mocUsX-qJ7OveA4F2RWqs6tqSIQ9TKmMp&itag=18&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-oxuo5h-nboe%2Csn-8pxuuxa-nboek&ms=au%2Crdu&mv=m&pl=24&ei=efv9XJrbGPO5igajvpK4CQ&initcwndbps=525000&mime=video%2Fmp4&gir=yes&clen=20863515&ratebypass=yes&dur=233.917&lmt=1534571084585339&mt=1560148752&fvip=7&c=WEB&ip=101.53.38.68&ipbits=0&expire=1560170457&sparams=ip%2Cipbits%2Cexpire%2Cid%2Citag%2Csource%2Crequiressl%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cei%2Cinitcwndbps%2Cmime%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&key=yt8&signature=BD2C5F56D7F8256A148E732EAD2FF500EA3E4FE7.DB638DEA2877E6D378409A117EA0D79B57A61047

Thử download cái khác bằng genyt.net thì lại thấy IP Google 107.178.194.193
Trong 1 link có 2 ip khác nhau
View attachment 349253
Mình Ip Tracker: IP 113.171.243.80 là của nhà cung cấp mạng ở VN, VNPT, xài nhà mạng nào thì nó gán vào link ip nhà cung cấp đó.

Mình xem file log này của Volumio, xài Netnam thì nó gán 101.53.38.68
Mã:
https://r1---sn-oxuo5h-nboe.googlevideo.com/videoplayback?id=o-ACXu6lmKlW6mocUsX-qJ7OveA4F2RWqs6tqSIQ9TKmMp&itag=18&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-oxuo5h-nboe%2Csn-8pxuuxa-nboek&ms=au%2Crdu&mv=m&pl=24&ei=efv9XJrbGPO5igajvpK4CQ&initcwndbps=525000&mime=video%2Fmp4&gir=yes&clen=20863515&ratebypass=yes&dur=233.917&lmt=1534571084585339&mt=1560148752&fvip=7&c=WEB&ip=101.53.38.68&ipbits=0&expire=1560170457&sparams=ip%2Cipbits%2Cexpire%2Cid%2Citag%2Csource%2Crequiressl%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cei%2Cinitcwndbps%2Cmime%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&key=yt8&signature=BD2C5F56D7F8256A148E732EAD2FF500EA3E4FE7.DB638DEA2877E6D378409A117EA0D79B57A61047

Thử download cái khác bằng genyt.net thì lại thấy IP Google 107.178.194.193
Trong 1 link có 2 ip khác nhau
View attachment 349253
Dạ ý chính của em là link lấy từ https://invidio.us/ hình như không trực tiếp từ server youtube o_O

Mấy cái khác em không rành.

Mã:
https://invidio.us/videoplayback?expire=1560174826&ei=igz-XOD7IYaphwbPzL_YCA&ip=2604%3Aa880%3A400%3Ad1%3A%3A92a%3Ab001&id=o-AIBEYnXXtijrTz2JIyDyVVANFquMLjjLisi2ruExcfjf&itag=251&source=youtube&requiressl=yes&mm=31%2C26&mn=sn-ab5szn7r%2Csn-tt1eln7s&ms=au%2Conr&mv=m&pl=49&initcwndbps=185000&mime=audio%2Fwebm&gir=yes&clen=5848944&dur=366.861&lmt=1537990192574865&mt=1560153104&fvip=5&keepalive=yes&c=WEB&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cpl%2Cinitcwndbps&lsig=AHylml4wRAIgMMl0JgdLdlLPnBSxThCB4IJqatu2kP-kqbl48JhCdJ4CIBBTu2vsFNC-fDIBQwBSxoFwBqUFjE30btdOxYJq2O9S&host=r5---sn-ab5szn7r.googlevideo.com&sig=ALgxI2wwRQIgGuMPYlJ73EvDTdImC7XTbSIGnzLDHIWlDXVmZMiEbC4CIQD36omyswjoKPxVeH30Cat-SLMLTzYl8E5oTpUtEp1g4g==&title=Adele%20-%20Hello-YQHsXMglC9A.webm
 

tml3nr

Moderator
Em mò tiếp việc play youtube opus sang mpd (Đã enable ffmpeg).

1. Download mpc for windows. Extract vào 1 folder. Thí dụ như c:\mpc

http://www.musicpd.org/download/mpc/0/mpc-0.22-win32.zip

2. Tạo 1 file c:\mpc.cmd có nội dung sau:

Mã:
mpc -h 192.168.1.12 clear
mpc -h 192.168.1.12 add %1
mpc -h 192.168.1.12 play
exit

3. Vào web genyt.com chọn video muốn play. Copy link webm 160abr (opus 160kbps)

4. Vào cmd c:\mpc. Chạy như sau (link video)

Mã:
c:\mpc.cmd "https://redirector.googlevideo.com/videoplayback?expire=1560282501&ei=JLH_XKKlO4PCD6vAsdgE&ip=107.178.194.210&id=o-AFwCqdPFOtl7W0LhGBT81NT1MnyF1OJ_u9mZcUGpha1d&itag=251&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-qxo7sney%2Csn-qxoedn7k&ms=au%2Crdu&mv=m&pl=28&initcwndbps=46528750&mime=audio%2Fwebm&gir=yes&clen=5848944&dur=366.861&lmt=1537990192574865&mt=1560260808&fvip=5&keepalive=yes&c=WEB&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cpl%2Cinitcwndbps&lsig=AHylml4wRAIgMQlN08Ecch26KXsIiuuPBOJlLRqrcaBMU8nrbd_hSvUCIB4jUZNBu2RdE1vPrfpqXJtEMB5og2WBC3z1nfz75xbO&sig=ALgxI2wwRAIgKoUQ9y-_akrgepfIs8xVM6Irlbs1z5lFUaliZMMABMsCIBTys4nVdQEeLl0KF4Xy4a4A8uMJbmuSNwezAmAfBXMU&ratebypass=yes&utmg=ytap1&title=Adele_-_Hello.webm"

Link opus sẽ được đẩy sang mpd và play.

Vậy nếu mình mod được cái extension browser dạng "Send link to" là có thể dùng cách này để play opus sang pi. Hơi thô thiển nhưng có thể play được trực tiếp link opus chỉ bằng 1 click chuột o_O

More info: Tham số của mpc for Windows

Mã:
Usage: mpc [options] <command> [<arguments>]
mpc version: 0.22

Options:
  -v, --verbose  Give verbose output
  -q, --quiet  Suppress status message
  -q, --no-status  synonym for --quiet
  -h, --host=<host>  Connect to server on <host>
  -P, --password=<password>  Connect to server using password <password>
  -p, --port=<port>  Connect to server port <port>
  -f, --format=<format>  Print status with format <format>
  -w, --wait  Wait for operation to finish (e.g. database update)

Commands:
  mpc  Display status
  mpc add <file>  Add a song to the current playlist
  mpc crop  Remove all but the currently playing song
  mpc current  Show the currently playing song
  mpc del <position>  Remove a song from the current playlist
  mpc play [<position>]  Start playing at <position> (default: 1)
  mpc next  Play the next song in the current playlist
  mpc prev  Play the previous song in the current playlist
  mpc pause  Pauses the currently playing song
  mpc toggle  Toggles Play/Pause, plays if stopped
  mpc stop  Stop the currently playing playlists
  mpc seek [+-][HH:MM:SS]|<0-100>%  Seeks to the specified position
  mpc clear  Clear the current playlist
  mpc outputs  Show the current outputs
  mpc enable <output #>  Enable a output
  mpc disable <output #>  Disable a output
  mpc shuffle  Shuffle the current playlist
  mpc move <from> <to>  Move song in playlist
  mpc playlist  Print the current playlist
  mpc listall [<file>]  List all songs in the music dir
  mpc ls [<directory>]  List the contents of <directory>
  mpc lsplaylists  List currently available playlists
  mpc load <file>  Load <file> as a playlist
  mpc insert <file>  Insert a song to the current playlist after the current track
  mpc save <file>  Save a playlist as <file>
  mpc rm <file>  Remove a playlist
  mpc volume [+-]<num>  Set volume to <num> or adjusts by [+-]<num>
  mpc repeat <on|off>  Toggle repeat mode, or specify state
  mpc random <on|off>  Toggle random mode, or specify state
  mpc single <on|off>  Toggle single mode, or specify state
  mpc consume <on|off>  Toggle consume mode, or specify state
  mpc search <type> <query>  Search for a song
  mpc find <type> <query>  Find a song (exact match)
  mpc findadd <type> <query>  Find songs and add them to the current playlist
  mpc list <type> [<type> <query>]  Show all tags of <type>
  mpc crossfade [<seconds>]  Set and display crossfade settings
  mpc clearerror  Clear the current error
  mpc mixrampdb [<dB>]  Set and display mixrampdb settings
  mpc mixrampdelay [<seconds>]  Set and display mixrampdelay settings
  mpc update [<path>]  Scan music directory for updates
  mpc sticker <uri> <get|set|list|del> <args..> Sticker management
  mpc stats  Display statistics about MPD
  mpc version  Report version of MPD
  mpc idle [events]  Idle until an event occurs
  mpc idleloop [events]  Continuously idle until an event occurs
  mpc replaygain [off|track|album]  Set or display the replay gain mode
  mpc channels  List the channels that other clients have subscribed to.
  mpc sendmessage <channel> <message>  Send a message to the specified channel.
  mpc waitmessage <channel>  Wait for at least one message on the specified channel.
  mpc subscribe <channel>  Subscribe to the specified channel and continuously receive messages.

See man 1 mpc for more information about mpc commands and options

PS: Hiện tại paste link vào Cantata mất 2 click :D

youtube-opus-2.jpg
 
Chỉnh sửa lần cuối:

tml3nr

Moderator
Em mò tiếp việc play youtube opus sang mpd (Đã enable ffmpeg).

1. Download mpc for windows. Extract vào 1 folder. Thí dụ như c:/mpc

http://www.musicpd.org/download/mpc/0/mpc-0.22-win32.zip

2. Tạo 1 file c:/mpc.cmd có nội dung sau:

Mã:
mpc -h 192.168.1.12 clear
mpc -h 192.168.1.12 add %1
mpc -h 192.168.1.12 play
exit

3. Vào web genyt.com chọn video muốn play. Copy link webm 160abr (opus 160kbps)

4. Vào cmd c:/mpc. Chạy như sau (link video)

Mã:
c:/mpc.cmd "https://redirector.googlevideo.com/videoplayback?expire=1560282501&ei=JLH_XKKlO4PCD6vAsdgE&ip=107.178.194.210&id=o-AFwCqdPFOtl7W0LhGBT81NT1MnyF1OJ_u9mZcUGpha1d&itag=251&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-qxo7sney%2Csn-qxoedn7k&ms=au%2Crdu&mv=m&pl=28&initcwndbps=46528750&mime=audio%2Fwebm&gir=yes&clen=5848944&dur=366.861&lmt=1537990192574865&mt=1560260808&fvip=5&keepalive=yes&c=WEB&txp=5511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cpl%2Cinitcwndbps&lsig=AHylml4wRAIgMQlN08Ecch26KXsIiuuPBOJlLRqrcaBMU8nrbd_hSvUCIB4jUZNBu2RdE1vPrfpqXJtEMB5og2WBC3z1nfz75xbO&sig=ALgxI2wwRAIgKoUQ9y-_akrgepfIs8xVM6Irlbs1z5lFUaliZMMABMsCIBTys4nVdQEeLl0KF4Xy4a4A8uMJbmuSNwezAmAfBXMU&ratebypass=yes&utmg=ytap1&title=Adele_-_Hello.webm"

File opus sẽ được đẩy sang mpd và play.

Vậy nếu mình mod được cái extension browser dạng "Send link to" là có thể dùng cách này để play opus sang pi. Hơi thô thiển nhưng trước mắt play được opus chỉ bằng 1 click chuột o_O

More info. Tham số của mpc for Windows:

Mã:
Usage: mpc [options] <command> [<arguments>]
mpc version: 0.22

Options:
  -v, --verbose  Give verbose output
  -q, --quiet  Suppress status message
  -q, --no-status  synonym for --quiet
  -h, --host=<host>  Connect to server on <host>
  -P, --password=<password>  Connect to server using password <password>
  -p, --port=<port>  Connect to server port <port>
  -f, --format=<format>  Print status with format <format>
  -w, --wait  Wait for operation to finish (e.g. database update)

Commands:
  mpc  Display status
  mpc add <file>  Add a song to the current playlist
  mpc crop  Remove all but the currently playing song
  mpc current  Show the currently playing song
  mpc del <position>  Remove a song from the current playlist
  mpc play [<position>]  Start playing at <position> (default: 1)
  mpc next  Play the next song in the current playlist
  mpc prev  Play the previous song in the current playlist
  mpc pause  Pauses the currently playing song
  mpc toggle  Toggles Play/Pause, plays if stopped
  mpc stop  Stop the currently playing playlists
  mpc seek [+-][HH:MM:SS]|<0-100>%  Seeks to the specified position
  mpc clear  Clear the current playlist
  mpc outputs  Show the current outputs
  mpc enable <output #>  Enable a output
  mpc disable <output #>  Disable a output
  mpc shuffle  Shuffle the current playlist
  mpc move <from> <to>  Move song in playlist
  mpc playlist  Print the current playlist
  mpc listall [<file>]  List all songs in the music dir
  mpc ls [<directory>]  List the contents of <directory>
  mpc lsplaylists  List currently available playlists
  mpc load <file>  Load <file> as a playlist
  mpc insert <file>  Insert a song to the current playlist after the current track
  mpc save <file>  Save a playlist as <file>
  mpc rm <file>  Remove a playlist
  mpc volume [+-]<num>  Set volume to <num> or adjusts by [+-]<num>
  mpc repeat <on|off>  Toggle repeat mode, or specify state
  mpc random <on|off>  Toggle random mode, or specify state
  mpc single <on|off>  Toggle single mode, or specify state
  mpc consume <on|off>  Toggle consume mode, or specify state
  mpc search <type> <query>  Search for a song
  mpc find <type> <query>  Find a song (exact match)
  mpc findadd <type> <query>  Find songs and add them to the current playlist
  mpc list <type> [<type> <query>]  Show all tags of <type>
  mpc crossfade [<seconds>]  Set and display crossfade settings
  mpc clearerror  Clear the current error
  mpc mixrampdb [<dB>]  Set and display mixrampdb settings
  mpc mixrampdelay [<seconds>]  Set and display mixrampdelay settings
  mpc update [<path>]  Scan music directory for updates
  mpc sticker <uri> <get|set|list|del> <args..> Sticker management
  mpc stats  Display statistics about MPD
  mpc version  Report version of MPD
  mpc idle [events]  Idle until an event occurs
  mpc idleloop [events]  Continuously idle until an event occurs
  mpc replaygain [off|track|album]  Set or display the replay gain mode
  mpc channels  List the channels that other clients have subscribed to.
  mpc sendmessage <channel> <message>  Send a message to the specified channel.
  mpc waitmessage <channel>  Wait for at least one message on the specified channel.
  mpc subscribe <channel>  Subscribe to the specified channel and continuously receive messages.

See man 1 mpc for more information about mpc commands and options

PS: Hiện tại paste link vào Cantata mất 2 click :D

youtube-opus-2.jpg
Báo cáo với cả nhà là em thấy cái này tương đối dễ mod, vì nó có cho mình set program. Hiện đã xuất lệnh qua MPD từ PC được. Nhưng đang còn vướng chổ đẩy link http :confused:

https://add0n.com/download-with.html
 
Chỉnh sửa lần cuối:

tml3nr

Moderator
Em cập nhật tình hình play youtube opus sang mpd.

Dùng plugin "Download with Free Download Manager" setup như hình bên dưới đẩy được link opus cho mpd play trực tiếp:

youtube-mpd-02.jpg


youtube-mpd-01.jpg


youtube-mpd-03.png
 
Chỉnh sửa lần cuối:

quatmo

Well-Known Member

Mời bác xài thử cái Extensions: Volumio Youtube này.
Mở web youtube.com lên mở 1 bài hát bấm button góc trên trình duyệt send thẳng qua MDP playlist đang nghe của Volumio. Send Youtube playist cũng được, bấm phát send nguyên playlist đang nghe qua.

Bác thích thì mình send cái source extension để mod lại cho Rune
Mình mới publish xài thử rất ngon, tiện dụng. (khoảng 10 giây mới hiện ra)
 
Chỉnh sửa lần cuối:

tml3nr

Moderator
Mời bác xài thử cái Extensions: Volumio Youtube này.
Mở web youtube.com lên mở 1 bài hát bấm button góc trên trình duyệt send thẳng qua MDP playlist đang nghe của Volumio. Send Youtube playist cũng được, bấm phát send nguyên playlist đang nghe qua.

Bác thích thì mình send cái source extension để mod lại cho Rune
Mình mới publish xài thử rất ngon, tiện dụng. (khoảng 10 giây mới hiện ra)
Em chưa hiểu lắm? Nhờ anh giải thích thêm:

- Cái extension này do anh viết ạ? Sao anh không làm cho nó tương thích với MPD standard luôn để khỏi lệ thuộc OS?

- Cần phải làm gì để chạy được với rune ạ?

- Cách này có lấy được opus không ạ? Trước giờ em thử những kiểu parser đều không lấy được opus

- Em không biết cách mod extension. Sửa một chữ nó cũng bị lỗi. Nếu anh hướng dẫn em cách làm luôn thì hay quá.
 
Chỉnh sửa lần cuối:

tml3nr

Moderator
Vậy là tạm ổn một cách đẩy link opus qua mpd từ web browser trên PC. Em xin liệt kê lại các bước như sau:

MPD cần phải có support opus và enable ffmpeg.

1. Download mpc for Windows. Extract ra 1 folder trên PC. Thí dụ như C:\mpc:

http://www.musicpd.org/download/mpc/0/mpc-0.22-win32.zip

2. Install addon "External Application Button" vào Chrome:

https://chrome.google.com/webstore/...n-butt/bifmfjgpgndemajpeeoiopbeilbaifdo?hl=en

3. Download file windows.zip. Extract ra rồi chạy install.bat:

https://github.com/andy-portmen/native-client/releases/download/0.7.0/windows.zip

4. Vào settings của addon "External Application Button". Set như sau:

youtube-mpd-06.png

5. Vào trang web genyt.net. Chọn video muốn play. Click chuột phải vào WEBM 160abr, chọn "Send Link to MPD". Link audio của Youtube sẽ được add vào MPD.

youtube-mpd-07.jpg


Cách này mình sẽ lấy được audio cao nhất của Youtube là opus 160kbps, 48kHz. Khi play MPD lấy nhạc trực tiếp từ web:

youtube-mpd-03.png


6. Tùy chọn: Thêm menu MPD Play/Pause để khỏi chuyển sang tab khác:

youtube-mpd-08.png

youtube-mpd-09.jpg


Hiện tại em chỉ làm được nhiu đó. Mình sẽ tìm cách cải tiến thêm cho OK hơn o_O

Em rất thích codec opus của Youtube. Nó cắt tần rất khéo. Âm thanh quá hay với bitrate 160kbps.
 
Chỉnh sửa lần cuối:
Bên trên