woodruffw / ff2mpv

A Firefox/Chrome add-on for playing URLs in mpv.

Home Page:https://addons.mozilla.org/en-US/firefox/addon/ff2mpv/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Windows] Pressing Button Only Pauses Video

Chibicon opened this issue · comments

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

  • OS information: Windows 10
  • Firefox version: 98.0 (64-bit)
  • MPV version - 0.34
  • youtube-dl version - 2021.12.17
  • yt-dlp version - 2022.03.08.1

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.

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

@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.

Thanks, much appreciated.

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

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:

  • Option 1. Check the python launcher command. Try py -V to check the output and verify that the python launcher finds python. Also the command py -0p should show all python versions installed in the machine (it should show -3.10.2 D:\Python if it finds python correctly).
  • Option 2. Manually modify ff2mpv.bat and change py -3 to python. For this you need to make sure that python is accessible in your path, not only from the installation directory (D:\Python). Which means, try running python from another location. If it is not found, try adding it to your path yourself. Here a link for that https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/

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

Everything else looks correct.

Attaching image as reference for the py command.
image

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

python

Having the same issue here.

@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)?

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.

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

Yes, it is a potential fix for this.

Creating my own ff2mpv.bat actually fixed the issue.

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

Cool. Closing as fixed.