Page 1 of 1

MPV modification using a (carpenter's file :-] ) excellent lua scripts

Posted: Tue Dec 26, 2023 11:35 am
by Grey

Of course, I would like to write a long opus on this topic with funny jokes and long digressions from the topic :) :roll: But... I'm being rushed. Therefore, a short boring option.

So, we need to add three components to the mpv for enhanced functionality and convenience. Why exactly three? No, I can add 333 :) But I am aware that not all users have a more or less powerful computer. Therefore 3.

First, about playlists for IPTV/Radio. It says here where you can get them. Put them in any folder and launch them using mpv with one click or from the context menu with the right mouse button - as you like.
----------|
So the interface, playlist manager and visualizer. For mpv. Let's try to stuff it all into Fossapup :) All this stuff should be in ~/.config/mpv/
There are gifs at the bottom of this post where everything is clear.
1. We are "installing" the first lua script from the author from Slovakia. This is the menu and the user interface. You can get it here. Making edits to mpf.conf
:!: :idea: Please note that in the conf file you can set the volume at which the mpv will start (volume=). This is important for headphones. And you can set the number of the song or radio station that will be the default at startup (playlist-start=).

Code: Select all

geometry=50%:50%
slang=$LANG
screenshot-directory=/root/my-documents/images/
hwdec=auto-safe
save-position-on-quit
playlist-start=4
volume=50
# required so that the 2 UIs don't fight each other
osc=no
# uosc provides its own seeking/volume indicators, so you also don't need this
osd-bar=no
# uosc will draw its own window controls if you disable window border
border=no

2. The second script is rushing to us from Finland. This is a great playlist manager. By default, it is called in mpv using the SHIFT+ENTER keys.

3. Finally, the third script that was born in Indonesia. This is a sound stream visualizer. It has several visualization modes. My favorite is showwaves ;) Most importantly, there is a mode in which effects appear only when mpv plays ONLY sound. That is, when listening to the radio over the Internet (well, or mp3 locally).
The author still has an equalizer there, maybe someone needs it.

:!: Since all these are lua scripts, they are easy to read and even understand what is where. For example, in the playlist manager, you can change the keyboard shortcuts yourself. And in the visualizer, select the mode, effect and quality (it is important if the computer is weak).
----------|
In general, we can make our own "branded" visualizer with a Robopup in the main role. Well, he can move his tail in time with the music or blink his eyes or something :)

IPTVnator? This is a good but cumbersome program (Electron and Angular).
mpv is lightweight, fast and orthodox :)
if you ask my opinion, I advocate that the above components should be included with mpv in Puppy Linux out of the box :|

mpv_folder.gif
mpv_folder.gif (76.13 KiB) Viewed 1079 times
playlists_folder.gif
playlists_folder.gif (60.65 KiB) Viewed 1079 times

Image


Re: MPV modification using a (carpenter's file :-] ) excellent lua scripts

Posted: Tue Dec 26, 2023 1:04 pm
by wiak

Well that's an interesting post. I look forward to trying the lua scripts next time I do anything active on computers.


Re: MPV modification using a (carpenter's file :-] ) excellent lua scripts

Posted: Tue Dec 26, 2023 5:30 pm
by Jasper

I have had an attempt at this and was unsuccessful unfortunately.

I realised the *.conf files for the scripts should go into the script-opts directory.

I could not locate the usoc.lua file, was unsure as if this needed compiling (requires GO?)

I will have another attempt, when I have more time to read the instructions :D

Can you confirm which build of mpv you are testing this on? I am using 0.32.0

.........still scratching my head atm trying to figure this all out :lol: :oops:

With the default settings I can drag & drop a radio playlist (m3u8) directly into mpv and once it starts playing I can simply use the next track button to go down the list of entries in the playlist eg

Image

Image

Image

Image

Also, tried this with a TV playlist and it work as described above.

Image

Image


Re: MPV modification using a (carpenter's file :-] ) excellent lua scripts

Posted: Tue Dec 26, 2023 10:12 pm
by Grey
Jasper wrote: โ†‘Tue Dec 26, 2023 5:30 pm

I have had an attempt at this and was unsuccessful unfortunately.
I could not locate the usoc.lua file, was unsure as if this needed compiling (requires GO?)

Apparently I have a uosc version released before October. See what happened in version 5.0.0 ;)
And you probably rushed to the latest version 5.1.1, like a real cavalryman bravely rushes at a tank๐Ÿคจ


Re: MPV modification using a (carpenter's file :-] ) excellent lua scripts

Posted: Wed Dec 27, 2023 3:59 am
by Grey

@Jasper This version (4.7.0) definitely works in Fossapup. For more recent ones, it now looks like you need newer Linux or newer mpv. 5.1.1 works in Arch Linux, I checked. Progress is marching across the planet :)


Re: MPV modification using a (carpenter's file :-] ) excellent lua scripts

Posted: Wed Dec 27, 2023 6:40 am
by Jasper

@Grey

like a real cavalryman bravely rushes at a tank

I take this as a backhanded compliment ........... everyone knows the Infantry are Bad Asses :lol: :thumbup2:

Thanks for revisiting the topic and will give this another attempt :thumbup:

.............. Got it working now :thumbup2: (.....needs a little more attention to be paid to the readme files provided)

Image


Re: MPV modification using a (carpenter's file :-] ) excellent lua scripts

Posted: Thu Dec 28, 2023 12:59 am
by Clarity

:thumbup:

Grey wrote: โ†‘Tue Dec 26, 2023 11:35 am

... if you ask my opinion, I advocate that the above components should be included with mpv in Puppy Linux out of the box ...

:idea:


Posted: Thu Dec 28, 2023 8:24 am
by Dry Falls

Thanks @Grey. Works well in lighthouse with Slackbuild mpv-037 which includes the gui features so didn't include/need the uosc script.

edit: Oh, I see! uosc goes way beyond mpv's gui features. May not need it but it's a nice inclusion. Thanks again.

df