woodruffw / ff2mpv

A Firefox/Chrome add-on for playing URLs in mpv.
https://addons.mozilla.org/en-US/firefox/addon/ff2mpv/
Other
492 stars 51 forks source link

[Windows] Pressing Button Only Pauses Video #78

Closed Chibicon closed 2 years ago

Chibicon commented 2 years ago

Describe the bug

Not sure if bug or user error. The addon does not open the currently playing video in MPV. It merely pauses the video in the browser or does nothing at all.

Reproduction steps

Browse to video url. Click button to open the video into MPV.

Expected behavior

The video to start playing in MPV.

Screenshots (optional)

Troubleshoot

Platform information

Additional context (optional)

I don't know what I did wrong. I'm pretty sure I followed all the steps correctly in the Windows installation guide but it just will not open MPV for me.

woodruffw commented 2 years ago

@Chibicon Could you please fill out the "Bug report" template? It contains a collection of questions that make reports much easier to triage.

Chibicon commented 2 years ago

@Chibicon Could you please fill out the "Bug report" template? It contains a collection of questions that make reports much easier to triage.

Updated first post.

woodruffw commented 2 years ago

Thanks, much appreciated.

cc @DanSM-5 for thoughts -- I know virtually nothing about the installation process on Windows.

DanSM-5 commented 2 years ago

Looks like it may be a python issue. I see that the script found the python launcher aka "py" command but on the screenshot it shows "python" called directly from the location in python. These are my suggestions:

If none of those options work. It would be helpful to know how python was installed in the machine.

Everything else looks correct.

DanSM-5 commented 2 years ago

Attaching image as reference for the py command. image

Chibicon commented 2 years ago

I tried changing the bat file but it didn't change the outcome.

python

mamaquinho commented 2 years ago

Having the same issue here.

DanSM-5 commented 2 years ago

@Chibicon Are you trying to play a youtube video or a different website?

I just noticed that you have both youtube-dl and yt-dlp. You only need one of them. By default mpv will use youtube-dl. You can try configure mpv to use yt-dlp by adding script-opts=ytdl_hook-ytdl_path=yt-dlp into your mpv.conf file. You can try with and without that line and see if that helps.

And finally just to make sure, did you use an admin powershell? That may cause issues due to the permissions in the ff2mpv.bat. Could you try installing from normal powershell (no admin)?

DanSM-5 commented 2 years ago

So, I found that if I run the script under a different process that is not my normal user it ends up messing with the encoding of the ff2mpv.bat.

Could you try to run the ff2mpv.bat? When the encoding is wrong it will output something like this image

That may be the actual issue. In that case, try creating manually a ff2mpv.bat.

woodruffw commented 2 years ago

79 is a potential fix for this, if I understood right.

DanSM-5 commented 2 years ago

Yes, it is a potential fix for this.

Chibicon commented 2 years ago

Creating my own ff2mpv.bat actually fixed the issue.

DanSM-5 commented 2 years ago

I think that pretty much confirms the encoding issue. It shouldn't occur again after the fix #79.

woodruffw commented 2 years ago

Cool. Closing as fixed.