Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_mpv - Video Player component based on mpv (Read 36255 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: foo_mpv - Video Player component based on mpv

Reply #100
v0.6.5

Fixed: popup title.
Not fixed: AV1 thumbnails won't work yet. The technical reason is that the ffmpeg bulid I am using doesn't support AV1 yet (vcpkg) and I don't want to change to build it myself at the moment.

This release has experimental and bad support for non-local files.
- Live streams will still not synchronise properly, fixing this is still not simple.
- You can enable it for foo_youtube items or any non-local item in Advanced Preferences->Playback->mpv. You can use the option 'Ignore filter query' so that it will try to play every non-local file, ignoring the "Only play files matching" option.
- You must place youtube-dl.exe into <foobar profile>/mpv. I don't think there is any way to tell mpv where to look for youtube-dl so I don't think I can point it at a global youtube-dl install. You could try symlinking it to another place maybe. I expect it works if youtube-dl is in your %PATH%
- You don't really get any visual feedback yet about what mpv is doing when loading youtube-dl, and nothing much in the Console, so it might be confusing why it isn't working. You should be able to tell from mpv.log afterwards.
- At least for me, it doesn't work in Linux/Wine. The libmpv thread loading youtube-dl just freezes and the player will stop working and need to be killed. It also doesn't work in standalone mpv so might not be easily fixable. If it does work for you please let me know!
- It will still use the same aggressive logic to synchronise audio/video, with no clever handling of slow network conditions. This works very well on Youtube for example, with fast enough internet, but if the video won't download fast enough you could get messed up playback as the component constantly tries to fix video sync but the network can't catch up. By default it will start loading the video 4 seconds after the current playback time to give some time for the file to start downloading. You can change this in advanced preferences.
- If you have foo_youtube video player also visible, or foo_youtube is somehow set to download the video, you will be downloading the video stream twice. For some sites, where the website only streams audio+video together, you might always be downloading the audio and video twice, which is pretty bad, it's just a limitation of the simple way this is implemented.

Re: foo_mpv - Video Player component based on mpv

Reply #101
v0.6.5
@sammoth,
Thanks for your responsiveness to users and trying to implement streaming video playback.
Playing YouTube clips works pretty well.
Currently, the highest quality YouTube video is selected for playback by default. This has a limitation on slow computers.
It might be sufficient to add a youtube-dl configuration window, similar to the mpv.conf and input.conf windows. In which the user can set the video resolution and codec.
HLS streams in my playlist are played but not synchronized.

Re: foo_mpv - Video Player component based on mpv

Reply #102
mpv is handling launching youtube-dl, so its options for quality should work, see here and here (yes it's kind of complicated). Note that you probably want to use strings that just match video streams.

For example for playing 720p only put in mpv.conf

Code: [Select]
ytdl-format="bestvideo[height=720]"

Re: foo_mpv - Video Player component based on mpv

Reply #103
mpv is handling launching youtube-dl, so its options for quality should work, see here and here (yes it's kind of complicated). Note that you probably want to use strings that just match video streams.

For example for playing 720p only put in mpv.conf

Code: [Select]
ytdl-format="bestvideo[height=720]"
Thanks, this tip helped.
Is it possible to set only a specific codec to play YouTube videos, for example, only H264?
since my computer does not play vp9 video codec properly.

Re: foo_mpv - Video Player component based on mpv

Reply #104
Maybe try
Code: [Select]
bestvideo[height<=720][vcodec*=avc]


Re: foo_mpv - Video Player component based on mpv

Reply #106
Hi.  Would it be feasible to have MPV automatically pop up when a video is played?  I suspect this would take more effort than it is worth, but decided to ask anyway just in case you thought it might be worthwhile.  Thank you again for this great component.

Re: foo_mpv - Video Player component based on mpv

Reply #107
Seems possible. Pop up automatically when there is video to play and disappear when there isn't? It would make most sense to have a menu entry to toggle it as I guess you would only want it on sometimes.

Re: foo_mpv - Video Player component based on mpv

Reply #108
What you described is exactly how the youtube video player works and the only feature I miss since switching over to MPV.  It would be a nice to have if you can find the time and hopefully something others would find useful.

Re: foo_mpv - Video Player component based on mpv

Reply #109
I can't play videos in wmv format, I get audio but the video doesn't play ... please help ... thank you very much for this fantastic plugin

Re: foo_mpv - Video Player component based on mpv

Reply #110
I can't play videos in wmv format, I get audio but the video doesn't play ... please help ... thank you very much for this fantastic plugin

Does it play if you disable the preference 'Only play files matching pattern'?

If not could you enable mpv's log (Advanced Preferences->Playback->mpv->Enable mpv log file), then restart foobar and try playing the file again. Then close foobar (which should make sure the log is saved) and message me the log file which should be in <foobar profile folder>/mpv/mpv.log

Re: foo_mpv - Video Player component based on mpv

Reply #111
I can't play videos in wmv format, I get audio but the video doesn't play ... please help ... thank you very much for this fantastic plugin

Does it play if you disable the preference 'Only play files matching pattern'?

If not could you enable mpv's log (Advanced Preferences->Playback->mpv->Enable mpv log file), then restart foobar and try playing the file again. Then close foobar (which should make sure the log is saved) and message me the log file which should be in <foobar profile folder>/mpv/mpv.log

I solved the problem by applying your suggestion ... thank you very much

Re: foo_mpv - Video Player component based on mpv

Reply #112
OK, it's probably better to re-enable "only play files matching pattern" but change the pattern to include wmv files, like:

Code: [Select]
"$info(video_codec)" PRESENT OR "$ext(%filename_ext%)" IS wmv

 

Re: foo_mpv - Video Player component based on mpv

Reply #113
yes, wmv won't open by default, I wonder why. Enabling verbose console logging, I got "mpv: Not loading path file://<file_path>". Where this video codec value come from?

I just tested again, I guess based from v1.4.1 changelog
- Added %video_codec% info for Matroska and MP4 files.
for wmv, I had to disable internal wma decoder, use ffmpeg decoder instead, reload info from file(s), then I get video codec, video available.
 



Re: foo_mpv - Video Player component based on mpv

Reply #114
I guess it's provided to foobar by whichever decoder/input component is responsible for opening the file on its side. Maybe some input components don't implement it.

Re: foo_mpv - Video Player component based on mpv

Reply #115
yes, just edit my comment above about my found. thanks
btw I will use your solution instead

Re: foo_mpv - Video Player component based on mpv

Reply #116
Hello.I can't understand why the mpv Video component doesn't work on my D: drive?(no image,no covers)On disk C: everything works fine on external media!What could be the reason?
YouTube Music

Re: foo_mpv - Video Player component based on mpv

Reply #117
Hello everyone, I would like to know how I do to hide the edges of the window and that only the video remains in the window mode ... thank you very much

Re: foo_mpv - Video Player component based on mpv

Reply #118
Hi there.

What means that:

Code: [Select]
mpv: libav error for open input: Invalid argument

How can I fixe it? Thanks in advance.

Re: foo_mpv - Video Player component based on mpv

Reply #119
Why is the video not loading?
YouTube Music

Re: foo_mpv - Video Player component based on mpv

Reply #120
Hi there.

What means that:

Code: [Select]
mpv: libav error for open input: Invalid argument

How can I fixe it? Thanks in advance.

I'm also getting this error spam in console, it seems to occur whenever a track is selected in any playlist view. What's strange is that I removed the panel from my config, but it's still spamming.

Re: foo_mpv - Video Player component based on mpv

Reply #121
Unfortunately, it seems that this topic is somewhat abandoned ... I hope it is for a certain time, I really like this component.

Re: foo_mpv - Video Player component based on mpv

Reply #122
Hi, thanks for all your work on this component. Is there a way to simply display something like:

<Artist>
<Title>

from a currently playing MP3 song, where the <artist> and <title> are read from the ID3 tags?

Right now, I can only seem to display "File: artwork://" as the name of the video, using the mpv-stats OSC.

Any help would be greatly appreciated.

Re: foo_mpv - Video Player component based on mpv

Reply #123
Hi, thanks for all your work on this component. Is there a way to simply display something like:

<Artist>
<Title>

from a currently playing MP3 song, where the <artist> and <title> are read from the ID3 tags?

Right now, I can only seem to display "File: artwork://" as the name of the video, using the mpv-stats OSC.

Any help would be greatly appreciated.

You can do it using a lua script. Create a script in the mpv scripts folder, eg. <foobar profile>/mpv/scripts/my_osd.lua containing something like:

Code: [Select]
mp.register_script_message("foobar", function(cmd, arg1, arg2, ...)
    if (cmd == "titleformat" and (not(arg1 == nil))) then
        if (arg1 == "myosd" and (not(arg2 == nil))) then
            mp.osd_message(arg2,999999)
        end
    end
end)

mp.commandv("script-message", "foobar", "register-titleformat", "myosd", "%artist% - %title%")

And reload mpv (hold shift + View->mpv Commands->Restart mpv) or restart foobar. The above is just a minimal example, you could handle the display in mpv more nicely depending on how you want it to work.

Re: foo_mpv - Video Player component based on mpv

Reply #124
Any chance that you can change the functionality so that if there's an MP3 playing, the art stays up rather than switching to whatever song is selected? Or have this function be an option in preferences? I like clicking around my playlists and want the art to stay up rather than what I've clicked.

Thank you for your hard work on this plugin, it's fantastic!