News for hackers. Stuff that matters.
Re:mpv a free, open-source, and cross-platform media player by sweeter on Saturday August 17, 2024 @04:19PM (#41277633)
it also has a robust Lua scripting interface. I made a tool in Golang and Lua that allows Mpv to treat torrent files and magnet links as if they were http links. You can then stream a torrent directly.

People also don't realize that mpv not only has the ability to stream youtube videos but you can also search youtube on the CLI using mpv `mpv ytdl://ytsearch:query`

it can also play videos directly in the terminal using ascii, sixel or kitty image protocol (which is by far the highest quality)

Re:mpv a free, open-source, and cross-platform media player by Bluestein on Saturday August 17, 2024 @04:24PM (#41277666)
> I made a tool in Golang and Lua that allows Mpv to treat torrent files and magnet links as if they were http links. You can then stream a torrent directly.

Increíble. Consider putting this up somewhere folks can find it.-

> it can also play videos directly in the terminal using ascii

Beats Star Wars over telnet :)

Re:mpv a free, open-source, and cross-platform media player by 369548684892826 on Saturday August 17, 2024 @06:09PM (#41278396)
There are lua hooks for play/pause/stop which is great for dimming room lights when the video starts.
Re:mpv a free, open-source, and cross-platform media player by abhishekjha on Saturday August 17, 2024 @04:22PM (#41277651)
Do you have an example?
Re:mpv a free, open-source, and cross-platform media player by ftk_ on Saturday August 17, 2024 @04:38PM (#41277770)
Not OP but also wrote a similar thing for mpv.

https://github.com/ftk/mpv-confluence/tree/torrserver

Re:mpv a free, open-source, and cross-platform media player by tvshtr on Sunday August 18, 2024 @02:22AM (#41280517)
it's crazy what you can do with its plugin scripts. MPV Android also supports them. I wrote one which turns off keyboard backlight and maxes brightness for HDR.

Also I'm using it to stream from Gerbera and to sync progress seamlessly between phone and PC.