Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Youtube Playlists with MPD?

Off-Topic discussions about science, technology, and non Debian specific topics.
Post Reply
Message
Author
User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

[Solved] Youtube Playlists with MPD?

#1 Post by bester69 »

Hi,

I would like to listen youtube sounds playlists (study, relaxing, etc) with MPD..is it possible?

I can do it with smplayer or VLC; for vlc :
vlc --no-video --one-instance YoutubePlaylist.txt


Thanks.
Last edited by bester69 on 2019-03-15 01:52, edited 2 times in total.
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
oswaldkelso
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1485
Joined: 2005-07-26 23:20
Location: UK
Has thanked: 1 time
Been thanked: 54 times

Re: Youtube Playlists with MPD?

#2 Post by oswaldkelso »

Yes.
Free Software Matters
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
My oldest used PC: 1999 imac 333Mhz 256MB PPC abandoned by Debian

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: Youtube Playlists with MPD?

#3 Post by bester69 »

I would like to be able to play in cantata youtube's playlists.. :cry:

Image
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: Youtube Playlists with MPD?

#4 Post by bester69 »

Ive got a Solution >>We will use following scripts.:

1- We get Playlist from youtube (http://forums.debian.net/viewtopic.php?f=16&t=137756)
Getting the playlist .txt from youtube; so we can download the whole playlist shortcuts.:

Code: Select all

$ git clone https://github.com/alexfalcucc/playlist-easy
youget.sh

Code: Select all

###Usar Comillas dobles al pasarle la Playlist
python2 /home/myuser/.local/share/youtube_playlist/youParse.py $1 > Playlist_youtube.txt
echo "Las URL's son.:"
cat ./Playlist_youtube.txt
2- Script to add youtube-URL converted in mpd playlist
youmpd.sh

Code: Select all

#!/bin/bash
#
MPDLIST=/home/user/.mpd/playlists
mpduri="$(youtube-dl -f best -g $1)#"
TAG=$(youtube-dl -i --get-filename $1) 
cadena="{\"title\":  \"$TAG\" }"
echo "$cadena"
mpduri=$mpduri$cadena
echo $mpduri >> $MPDLIST/Youtubes.m3u

echo $mpduri
3- Script to process all URL's in youtube txt playlist
youmpda.sh ./Playlist_youtube.txt

Code: Select all

#!/bin/bash
#
for i in `cat $1`;
do 
clear
echo $i
youmpd $i;

done
--------------------------------------
Example.:
youget.sh "https://www.youtube.com/watch?v=H36v9eS ... zwqnx9yO_I"
youmpda ./Playlist-H36v9eSbF3o.txt

AND HERE YOU HAVE!!! :D

Image

Image
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: [Solved] Youtube Playlists with MPD?

#5 Post by bester69 »

youtube doesnt seem to keep uri static for so long, so It only works for a few days :(

Anyways, Here another easy script for playing directly in MPD..

youmpdplay https://www.youtube.com/watch?v=zqXuBOWU1-8

youmpdplay.sh

Code: Select all

#!/bin/bash
#
MYHOST='192.168.1.128' # or your MPD host

mpduri="$(youtube-dl -f best -g $1)#"
TAG=$(youtube-dl -i --get-filename $1) 
cadena="{\"title\":\"$TAG\"}"
echo "$cadena"
mpduri="$mpduri$cadena"
echo "$mpduri"
mpc insert "$mpduri"
mpc next
mpc play
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: [Solved] Youtube Playlists with MPD?

#6 Post by bester69 »

Perhaps, A better alternative,
https://github.com/mps-youtube/mps-youtube
mps-youtube is able to toad and save playlist to disk, and great program to listen music in youtube.

Features

Search and play audio/video from YouTube
Search tracks of albums by album title
Search and import YouTube playlists
Create and save local playlists
Download audio/video
Convert to mp3 & other formats (requires ffmpeg or avconv)
View video comments
Requires mplayer or mpv
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
Bloom
df -h | grep > 90TiB
df -h | grep > 90TiB
Posts: 503
Joined: 2017-11-11 12:23
Been thanked: 26 times

Re: [Solved] Youtube Playlists with MPD?

#7 Post by Bloom »

mps-youtube is in de Debian repositories for Jessie, Stretch and Sid.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: [Solved] Youtube Playlists with MPD?

#8 Post by stevepusser »

Bloom wrote:mps-youtube is in de Debian repositories for Jessie, Stretch and Sid.
Per request, here's the latest 0.2.8 release (not in Debian) for testing: https://build.opensuse.org/package/show ... ps-youtube
MX Linux packager and developer

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: [Solved] Youtube Playlists with MPD?

#9 Post by bester69 »

stevepusser wrote:
Bloom wrote:mps-youtube is in de Debian repositories for Jessie, Stretch and Sid.
Per request, here's the latest 0.2.8 release (not in Debian) for testing: https://build.opensuse.org/package/show ... ps-youtube
hehe,You made for me, Thanks a lot Setve, :wink: , I removed request cos I saw it was able to execute it directlly from source package or using pip3 or python to install it.. so I didnt want to bother you if not neccesary..

dont know why, but 0.2.8 doesnt work well in my system.. most of songs are jumped in playlist..just a few ones are able to play.. the problem happend with any source installation.. with 0.2,7 there's no problem at all... I might be lacking some component in this newer version..dont know!
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: [Solved] Youtube Playlists with MPD?

#10 Post by bester69 »

I used mpsyt --debug and search it on internet, and seems to be some kind of youtube-dl bug with quotes.

cat /tmp/mpsyt.log

Code: Select all

mpv --no-ytdl https://r5---sn-h5q7dnel.googlevideo.com/videoplayback?ip=78.30.35.91&key=yt6&dur=3719.601&lmt=1544464348967684&id=o-AGwfK7X7ILERD-0W1mUmX11HyIh-ykMWA3YCXBhTolIy&itag=251&requiressl=yes&keepalive=yes&mn=sn-h5q7dnel%2Csn-hgn7rn7k&mm=31%2C26&ms=au%2Conr&ei=c8OOXKjJJIXsxwLli72gBQ&mv=m&mt=1552859881&expire=1552881619&gir=yes&initcwndbps=607500&pl=19&source=youtube&signature=6F308EC977DB1CC1BE188D1CD8C183196789F3C4.21F0651F49A35B642E2323B63FC6B19D01149A5E&c=WEB&txp=5511222&mime=audio%2Fwebm&fvip=2&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&clen=67157505&ipbits=0&ratebypass=yes
Using quates, mpv can open the stream url.. so I guess its neccesary to use an older and specific youtube-dl version to work with 0.2.8 version. Dont know what is the properly way to fix this problem.
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: [Solved] Youtube Playlists with MPD?

#11 Post by stevepusser »

What version of youtube-dl do you have installed?
MX Linux packager and developer

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: [Solved] Youtube Playlists with MPD?

#12 Post by bester69 »

stevepusser wrote:What version of youtube-dl do you have installed?
I tried last one and now have installed 2019.03.01.

I think It has to be with this report.:
https://github.com/mps-youtube/mps-youtube/issues/885

But I cant make it work..
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

Post Reply