DaemonForums  

Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 14th October 2017
Sehnsucht94's Avatar
Sehnsucht94 Sehnsucht94 is offline
Real Name: Paolo Vincenzo Olivo
Package Pilot
 
Join Date: Oct 2017
Location: Rome
Posts: 169
Default MPS-Youtube on OpenBSD

I've been loving mps-youtube since it first came out, and I always have it run in background as soon as I Iogin.

It's true there are other nice music/video streaming solutions in OpenBSD's ports tree (livestreamer, mplayer, youtube-dl+mpg123 etc..), and that pyradio, builds on OpenBSD, but to me, mps-youtube looks the lightest and cleanest.

Mps-youtube, exploits mps, pafy library, and youtube-dl in order to query songs, artist and playlist directly from youtube. It can also use whether Mpv or Mplayer2, depending on which one you like best, so as to display video. You can do this by turning video option to true before streaming, or, with:
Code:
mpsyt playurl https://youtube_video_url
.

MPS-youtube relies on python 3.6, and can be installed through pip. python27 version of pip (py-pip) won't be able to build mpsyt. If you have it installed, it will be necessary to exchange it with py3-pip, as shown below

So, first the dependencies:

- lang/python/3.6,-main
- devel/py-pip,python3
- devel/py-setuptools,python3
- mpv or mplayer
- youtube-dl. Please, don't build youtube-dl from ports, you'll have to install it through py3-pip inorder for mps-youtube to work.

Now install youtube-dl:

Code:
doas pip3.6 install -U youtube-dl
Currently only the developer branch of mps-youtube works, as it has fixed runtime issues related to latest pafy API, so you'll have to clone it directly:

Code:
doas pip3.6 install -U git+https://github.com/mps-youtube/mps-youtube.git
Simple nad clean, enjoy it!
Reply With Quote
  #2   (View Single Post)  
Old 14th October 2017
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Is mps-youtube for youtube only? I ask because some of the other software you mention (like livestreamer, which by the way is now called streamlink) can stream a huge variety of sites. And in fact I made a port of it to watch Twitch. So just wondering if mps-youtube can be a replacement for things like that.
Reply With Quote
  #3   (View Single Post)  
Old 14th October 2017
ripe's Avatar
ripe ripe is offline
Package Pilot
 
Join Date: Feb 2013
Location: France
Posts: 180
Default

Hi! I am trying to install mpsyt:

- I can not have pip3.6 but i got pip2.7 even when i did this:
Code:
$ su                                                                           
Password:
# cd /usr/ports/lang/python/3.6/ 
# make install
#
- But i installed python by pkg_add:
Code:
# pkg_info python
Information for inst:python-2.7.14

Comment:
interpreted object-oriented programming language

Required by:
gimp-2.8.22
glib2-2.52.3
gobject-introspection-1.52.1p0
libglade2-2.6.4p13v0
libgpod-0.8.0p7
libplist-1.12p0
obmenu-1.0p6
py-MarkupSafe-1.0
py-alabaster-0.7.10
py-babel-2.4.0
py-beaker-1.6.2p5
py-cairo-1.15.3
py-chardet-3.0.4
py-crypto-2.6.1p4
py-docutils-0.12p1
py-gobject-2.28.6p6v0
py-gtk2-2.24.0p4
py-imagesize-0.7.1p0
py-jinja2-2.8.1
py-mako-0.9.1p3
py-numpy-1.9.2p0
py-pip-9.0.1p0
py-pygments-2.1.3p0
py-setuptools-28.6.1p0v0
py-six-1.10.0p0
py-snowballstemmer-1.2.1p0
py-sphinx-1.4.8p0
py-sphinx_rtd_theme-0.2.4
py-stemmer-1.3.0p1
py-tz-2017.2
py-xdg-0.25p3
ranger-1.7.2p0

Description:
Python is an interpreted, interactive, object-oriented
programming language that combines remarkable power with
very clear syntax. For an introduction to programming in
Python you are referred to the Python Tutorial. The Python
Library Reference documents built-in and standard types,
constants, functions and modules. Finally, the Python
Reference Manual describes the syntax and semantics of the
core language in (perhaps too) much detail.

Python's basic power can be extended with your own modules
written in C or C++.  On most systems such modules may be
dynamically loaded. Python is also adaptable as an
extension language for existing applications. See the
internal documentation for hints.

Maintainer: Remi Pointel <rpointel@openbsd.org>

WWW: http://www.python.org/

Install notice:
If you want to use this package as your default system python, as root
create symbolic links like so (overwriting any previous default):
 ln -sf /usr/local/bin/python2.7 /usr/local/bin/python
 ln -sf /usr/local/bin/python2.7-2to3 /usr/local/bin/2to3
 ln -sf /usr/local/bin/python2.7-config /usr/local/bin/python-config
 ln -sf /usr/local/bin/pydoc2.7  /usr/local/bin/pydoc


Information for inst:python-3.6.2

Comment:
interpreted object-oriented programming language

Required by:
libproxy-0.4.15p0
libreoffice-5.2.7.2p6v0
py3-cairo-1.15.3
py3-dbus-1.2.4p0
py3-mpd2-0.5.5p0
py3-setuptools-28.6.1p0v0
py3-tagpy-2013.1p7
sonata-1.7b1v0

Description:
Python is an interpreted, interactive, object-oriented
programming language that combines remarkable power with
very clear syntax. For an introduction to programming in
Python you are referred to the Python Tutorial. The Python
Library Reference documents built-in and standard types,
constants, functions and modules. Finally, the Python
Reference Manual describes the syntax and semantics of the
core language in (perhaps too) much detail.

Python's basic power can be extended with your own modules
written in C or C++.  On most systems such modules may be
dynamically loaded. Python is also adaptable as an
extension language for existing applications. See the
internal documentation for hints.

Maintainer: Remi Pointel <rpointel@openbsd.org>

WWW: http://www.python.org/
What i have to do to get pip3.7 and install mpsyt?

Peace,

ripe
Reply With Quote
  #4   (View Single Post)  
Old 14th October 2017
Sehnsucht94's Avatar
Sehnsucht94 Sehnsucht94 is offline
Real Name: Paolo Vincenzo Olivo
Package Pilot
 
Join Date: Oct 2017
Location: Rome
Posts: 169
Default

Quote:
Originally Posted by ibara View Post
Is mps-youtube for youtube only? I ask because some of the other software you mention (like livestreamer, which by the way is now called streamlink) can stream a huge variety of sites. And in fact I made a port of it to watch Twitch. So just wondering if mps-youtube can be a replacement for things like that.

Well, mpsyt queries YouTube songs/videos only. However it is built on mps (no need for python3, it builds with standard python27 pip), which uses prostopleer.com, as primary resource/database for streaming. Now the site is down, as I think it migrated to another server and acquired the name of musicpleer.audio.Consequently, mps is currently broken, unable to stream any song.
I have never tried to do so, but I think that changing its main reference site is something trivial. Hence, perhaps you may make better use of mps,, instead of mps-youtube, and switch it's main database url to your likes (mp3skull would be my suggestion).

EDIT: thanks very much for streamlink. It's some time I don't have it installed on my system, but I used to spend whole afternoons with livestreamer. Now I'm curious to see what's new about the latest version.

To RIPE

Quote:
Originally Posted by ripe
What i have to do to get pip3.7 and install mpsyt?
Hi,

Short answer: you can just install the pip3.6 binary package, which is named:

py3-pip

It will bring all dependencies along with it.

Longer answer:
Seems you had both python2.7 and python3.6 already installed as dependencies for other packages . Doesn't matter.
If you look below in your pkg_info output, even python3 is listed after: Information for inst: python-3.6.2

In OpenBSD (unlike FreeBSD for example) different versions of python do not conflict and can coexist together, as long as you do not
create the symbolic links it suggests). You can now go on installing pip3 whether from ports or packages

Hope this helps

Last edited by Sehnsucht94; 15th October 2017 at 07:07 AM.
Reply With Quote
  #5   (View Single Post)  
Old 15th October 2017
ripe's Avatar
ripe ripe is offline
Package Pilot
 
Join Date: Feb 2013
Location: France
Posts: 180
Default

It works! Thank you!
Reply With Quote
  #6   (View Single Post)  
Old 26th October 2023
ripe's Avatar
ripe ripe is offline
Package Pilot
 
Join Date: Feb 2013
Location: France
Posts: 180
Default

Hi Sehnsucht94, please can you upgrade this guide for OpenBSD? I think there is changes in the way to install it.
Reply With Quote
  #7   (View Single Post)  
Old 24th November 2023
ripe's Avatar
ripe ripe is offline
Package Pilot
 
Join Date: Feb 2013
Location: France
Posts: 180
Default

There is a fork from mpsyt:
"yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required."
It is easy to install with pip https://github.com/mps-youtube/yewtube
I am using it.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox in OpenBSD 6.0 supports YouTube videos bsd-keith OpenBSD Packages and Ports 1 3rd September 2016 03:01 PM
youtube-dl kerasi OpenBSD Packages and Ports 13 17th November 2015 10:38 PM
Gangnam Style BREAKS YouTube J65nko Off-Topic 0 3rd December 2014 02:01 PM
how to watch youtube videos on OpenBSD? lucas34 OpenBSD Packages and Ports 28 11th March 2014 06:34 PM
Conference on Youtube infrastructure 18Googol2 Off-Topic 0 13th July 2008 05:20 PM


All times are GMT. The time now is 10:58 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick