Replies: 2 comments 1 reply
-
|
This is already possible, just run something like |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Centuries ago, Nostradamus predicted that Guido Cella would write on Mon May 5 01:13:05 2025:
This is already possible, just run something like `mkfifo /tmp/foo;
your_program > /tmp/foo` in the `on_load` hook and set
`stream-open-filename` to `/tmp/foo/`, similar to what
`ytdl_hook.lua` does.
Please forgive me for troubling this community with a followup
question, because I have read the fabulous manual, and I do not think
that a person of average intelligence can figure out from it how to
use the on_load hook (although I think it would be better to use the
on_load_fail hook, which I also cannot figure out how to use). Or
maybe a person of average intelligance can figure it out, but I don't
think I can.
Please walk me thru this and tell me exactly what I must put into
/home/jay/.config/mpv/mpv.conf so that, when mpv is given the name of
an archive or the name of a directory as an argument, mpv will play
every component of the archive or every member of the directory or
every component of every archive member of the directory that it knows
how to play, and every component or member that it does not know how
to play, if its name ends in .mid, will be passed as an argument to
"timidity -A1 -im". I am surely not the only person who has wanted to
do this. Thank you in advance, and please forgive me for my inability
to figure out on my own how to do this, it was not for lack of trying.
Jay F. Shachter
6424 North Whipple Street
Chicago IL 60645-4111
+1 773 7613784 landline
+1 410 9964737 GoogleVoice
***@***.***
http://m5.chicago.il.us
"Quidquid latine dictum sit, altum videtur"
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Esteemed Colleagues:
I understand that the proper way to request a new feature is to implement it, and then to request that the contributed code be incorporated. I have not done that; but I write this in the hope that someone reading this will think that this feature is desirable, and will be moved to implement it, for which I thank him or her in advance.
I think it would be a desirable feature, to be able to designate helper programs that mpv will invoke, when mpv is unable to play a file itself, but there is another program that can. The specific case that led me to think of this, is that of a directory, or an archive, than contains conventional audio files (eg, *.mp3, *.ogg, *.opus, *.flac, et cetera) and also MIDI files (which are typically named *.mid or *.midi). I then discovered to my astonishment that mpv can play those files, even though I saw nothing in meson.options that led me to expect it. But it does not play them well, in fact it plays them really badly. I would like to be able to tell mpv to play all the contents of such a directory or archive, and to hear both the conventional audio files and the MIDI files in it. And if you think this is a bad example, you can surely think of better examples, cases where there are files or archive members that mpv cannot play, but some other program can. Thus it would be both far out and groovy (and those are not words that I use lightly) if one could tell mpv that any file or archive member whose name matches the pattern "*.mid" (or the regular expression ".*\.midi?$") should be passed as an argument to "/usr/bin/timidity -ik -A1". Or, since archive members would have to be copied to some temporary file which would later have to be removed, which is a responsibility that mpv should not be burdened with, perhaps a superior implementation would be that all such files or archive members would be passed as standard input to "/home/jay/bin/my_timidity_wrapper -ik -A1", making it the user's responsibility to provide a program and program arguments that do something desirable with the input that mpv presents to it.
Beta Was this translation helpful? Give feedback.
All reactions