wanted_modules icon indicating copy to clipboard operation
wanted_modules copied to clipboard

MPV (idea: python-mpv)

Open silvioprog opened this issue 3 years ago • 1 comments

It would be nice a module like this in Deno: https://github.com/jaseg/python-mpv

Playing video in:

import mpv
player = mpv.MPV(ytdl=True)
player.play('https://youtu.be/DOmdB7D-pUU')
player.wait_for_playback()

and an audio (online radio):

import mpv
player = mpv.MPV()
player.play('http://s1.myradiostream.com:12508/listen.mp3')
player.wait_for_playback()

silvioprog avatar Dec 09 '22 02:12 silvioprog

Well, considering the python module already exists you could do the following using my deno_python module:

Playing video in:

import { python } from "https://deno.land/x/python/mod.ts";

const mpv = python.import("mpv");
const player = new mpv.MPV(ytdl=True);
player.play('https://youtu.be/dQw4w9WgXcQ');
player.wait_for_playback();

and an audio (online radio):

import { python } from "https://deno.land/x/python/mod.ts";

const mpv = python.import("mpv");

player = mpv.MPV();
player.play('http://s1.myradiostream.com:12508/listen.mp3')
player.wait_for_playback();

eliassjogreen avatar Aug 09 '23 13:08 eliassjogreen