All Projects → Hemisphere-Project → HPlayer2

Hemisphere-Project / HPlayer2

Licence: GPL-3.0 license
Modular Media Player for Raspberry Pi and more...

Programming Languages

python
139335 projects - #7 most used programming language
C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to HPlayer2

Mpv thumbnail script
A Lua script to show preview thumbnails in mpv's OSC seekbar, sans external dependencies
Stars: ✭ 350 (+1150%)
Mutual labels:  osc, mpv
Mpv Easy Player
MPV-EASY Player - A movie player based on mpv
Stars: ✭ 324 (+1057.14%)
Mutual labels:  osc, mpv
nfc-manager
Flutter app for accessing the NFC features on Android and iOS.
Stars: ✭ 57 (+103.57%)
Mutual labels:  nfc
dotfiles
My life's work 🔥🔥
Stars: ✭ 28 (+0%)
Mutual labels:  mpv
ChatVoicePlayer
An Android library to make the implementation of voice/audio messages' playing easier
Stars: ✭ 157 (+460.71%)
Mutual labels:  mediaplayer
tangem-sdk-ios
The native Swift library for iOS platforms
Stars: ✭ 35 (+25%)
Mutual labels:  nfc
gpioctl
Control the ALSA mixer or generate JACK MIDI or OSC messages from rotary encoders and switches connected to GPIOs.
Stars: ✭ 18 (-35.71%)
Mutual labels:  gpio
mpv-progressbar
A simple progress bar for mpv.
Stars: ✭ 106 (+278.57%)
Mutual labels:  mpv
termv
A terminal iptv player written in bash
Stars: ✭ 119 (+325%)
Mutual labels:  mpv
summertunes
A web-based music player for Beets
Stars: ✭ 15 (-46.43%)
Mutual labels:  mpv
feeluown-core
提供音乐播放器的一些常见组成模块(已经合并到 feeluown 项目中)
Stars: ✭ 30 (+7.14%)
Mutual labels:  mpv
Maple
Maple is a windows desktop application designed to support semi and non professional streamers in playing back local audio files and streaming content from the internet to their favorite playback device
Stars: ✭ 37 (+32.14%)
Mutual labels:  mediaplayer
StreamLinkerino
Twitch.tv client using only StreamLink, MPV, and Chatterino
Stars: ✭ 26 (-7.14%)
Mutual labels:  mpv
osc-simulator
A utility to test Open Sound Control sending and receiving from the browser
Stars: ✭ 23 (-17.86%)
Mutual labels:  osc
tidal-looper
Different looper variants for SuperDirt to provide live sampling in TidalCycles.
Stars: ✭ 55 (+96.43%)
Mutual labels:  osc
react-native-status-keycard
React Native library to interact with Status Keycard using NFC connection
Stars: ✭ 20 (-28.57%)
Mutual labels:  nfc
w1-gpio-cl
Command line configured kernel mode 1-wire bus master driver. w1-gpio standard Linux module enhancement/substitution.
Stars: ✭ 17 (-39.29%)
Mutual labels:  gpio
VR-reversal
VR-Reversal - Player for conversion of 3D video to 2D with optional saving of head tracking data and rendering out of 2D copies.
Stars: ✭ 128 (+357.14%)
Mutual labels:  mpv
SketchSynth
A drawable OSC control panel
Stars: ✭ 46 (+64.29%)
Mutual labels:  osc
musicplayer
musicplayer 音乐播放器框架 简单易懂易扩展 已写了播放器demo和列表播放的demo兼容七牛等第三方Mediaplayer
Stars: ✭ 14 (-50%)
Mutual labels:  mediaplayer

HPlayer2

HPlayer2 is a modular media player designed to allow multiple ways of control, over multiple platform.

It is build in a modular way: you can choose the player engine (mpv, vlc, omxplayer, ...),
i/o interfaces (osc, http, rfid, ble, gpio, ...) and patch everything up.

HPlayer2 is focused on Raspberry Pi, but is based on python code wrapping 3rd parties engines and libraries, so as long as those 3rd parties components are supported on other platform, HPlayer2 should run on it !

HPlayer2 is under development, some features might not be fully available or sometimes broken, feel free to ask for help and open issues, i'll do my best to cover it. Pull requests are also welcomed !

Media engine

Hplayer2 abstracts the concept of player (media list, play, pause, stop, volume, position, ...), and then bind to an existing player engine.

On Raspberry Pi, i only managed to use 3 engines with Hardware acceleration on H.264 decoding:

  • omxplayer: the original HPlayer was based on via ofxOMXPlayer, but using OF on Pi was a bit tricky at the time
  • vlc: works great, but was tricky to compile on RPi when i tried it couple years ago
  • mpv: used to have a great build script, works very well and offers ipc interface to communicate with

The goal of HPlayer2 is to offer the choice between those 3 engines, but for now only mpv is fully supported.

Install

HPlayer2 is a python program, with several "modular" dependencies, depending on which component you will be using.
The core component you need to install is of course the media engine. For now, only mpv is supported, so you should install it, but the mpv package in your distro repository might not be compiled with HW video decoding, so it might be necessary to build it yourself with this specific options enabled.

There is two scripts to help you install everything needed:

scripts/install_dependencies.sh that should cover most of the dependencies installation. This script supports arch and xbian (raspbian/debian/ubuntu)
On Raspberry Pi, i recommand using arch since boot up is faster, but it's up to you ! The script might miss some recent dependencies (i sometime forget to update this script for brand new features).

scripts/install_mpv.sh tries to detect if a pre-compiled version of MPV is available for your platform. If not, it tries to re-compile MPV with HW acceleration for RaspberryPi.

Feel free to dive into both scripts and tweak it for your needs. If you want help make install script more universal, please submit PR !

On your freshly configured Raspberry Pi:

cd ~
git clone https://github.com/Hemisphere-Project/HPlayer2.git
cd HPlayer2/scripts
sudo ./install_dependencies.sh
sudo ./install_mpv.sh
cd ..

You should examine those scripts to understand what they do. You could run each part on your own instead of running the whole script blindly,
it will help in case it is broken (it can be !).

Run

Since HPlayer2 is modular, the concept is to run HPlayer2 against a specific profile. This profile links i/o interfaces to the media engine.
There is a default profile provided, and several example based on projects where i use HPlayer2.

To start, go to HPlayer2 directory, and run ./hplayer2 profile
where profile is the name of a file in the profiles subdirectory (without the .py)

for exemple you can run ./hplayer2 bloffique
which will start HPlayer with the profile located in profiles/bloffique.py

if you omit the profile and simply run ./hplayer2
it will use the default profile located in profiles/default.py

To create a custom profile for your project, you can create a new file like profiles/your-project.py To run it: ./hplayer2 your-project

Patch a profile

The idea here is for you to program you own profile !
(or to use an existing one if it feats your needs..)

Start reading the files in profiles/ to see examples on how profiles are made.
It's very simplified and patching oriented: an interface event can be plugged to a player action and vice-versa.

The best starting point is to read the default profile in profiles/default.py

The idea in a profile is:

  • create a player
  • attach interfaces modules (OSC, HTTP, RFID, GPIO, ...)
  • patch events from interfaces to action on the player (NB: some events are already patched automatically)
  • run

Interfaces

A more complete documentation regarding the capabilities and the use of the different interface modules will be provided in the future (PR and help are welcome!).
Interfaces are available without the need of explicit inclusion, from directory core/interfaces/

Please check the profiles examples to see how to use those interfaces.

Available interfaces:

  • GPIO: allows patching RPi gpio event to player action
  • OSC: patching OSC message to player actions to control it from TouchOSC / MaxMSP / etc...
  • HTTP: bootstrap a basic HTTP server to enable network basic API
  • HTTP2: a nice web interface (responsive & websocket enabled) to setup an control HPlayer2
  • Keyboard: usb keyboard, numpad or infrared remotes like this one
  • Keypad: interface LCD+Keypad RPi shield like this one
  • NFC: interface RFID/NFC tag reader based on PN532 like this one

CREDITS

HPlayer2 is developed by Thomas BOHL for Hemisphere and KXKM

HPlayer2 is build on top of MPV player, liblo, Adafruit libs, ZeroMQ and more.. thanks to all those open developers !

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].