How to sync scripts with streaming sites (Windows, MPC-HC, MFP)

:information_source: Introduction

Hi, I didn’t see any tutorials here on how to sync your scripts with streaming sites listed below, so let me share how I do it on Windows. I’m hoping this will open up scripting to more sites :grin:

Please note that I’m not an expert, and some functionality like scrubbing or fast forwarding is really janky, you will sometimes have to pause the video and scrub and even then sometimes it doesn’t do well, but regular playback to sync scripts currently work well for me. Oh, also you’ll need a decent internet connection for this to work well.

Important : This is just how I do it. I use Windows 10 (might work in 11) and I use MPC-HC x64 media player, which is connected to MultiFunPlayer which connects to Intiface Central to control devices.

:movie_camera: Sites I’ve tested this method to work with

  • PornHub
  • Rule34
  • XVideos
  • Sankaku Complex (only works with some media, depends on your luck)
  • XHamster

:file_folder: Files you will need

  • YT-DLP - This is an improved youtube downloader software module. You can download it from the official github repo here: Releases · yt-dlp/yt-dlp · GitHub - you will only need the yt-dlp.exe file.

  • Ffmpeg - This is the encoder software. You can download it from many places, but I use version 6.0 from here : Release ffmpeg 6.0 builds · GyanD/codexffmpeg · GitHub - you will need to download ffmpeg-6.0-full_build.zip and extract out 2 files - ffmpeg.exe and ffprobe.exe

:memo: Instructions

Once you’ve downloaded the requirements, you will have these 3 files:

  • yt-dlp.exe
  • ffmpeg.exe
  • ffprobe.exe

Copy these 3 files into the installation folder of MPC-HC. Your folder should look like this now:

Next, double check your MPC-HC Settings is listening for it to be controlled. Click on View → Options


Make sure under Web Interface, “Listen to port” is selected. Take note of the port number.

That’s all! Installation is done. You can test playing your videos in MPC-HC.
Here’s a test URL I will be using: Heavy Beat - PMV/HMV 03

Click on File → Open URL :

Give it 15 seconds or so… and it will start playing!

Next, you will need to sync it with MultiFunPlayer (MFP)because the script probably won’t match the URL filename, so in this case, his Pause on the video first and go to MFP.

First, check that MultiFunPlayer is connected to MPC-HC liek so:


Check that the port number here matches from before. If MPC-HC tab is missing, just add it by clicking on the + button.
Click on the Play button to connect it to MPC-HC

You will notice the heatmap will most probably be empty. This is because it can’t find the funscript by matching filenames, no worries, you can manually link to the funscript.

Click on the weird looking link icon with a + sign: “Map Media Path to File”


This will link your current video with a funscript.

Select your funscript from your hard drive.
If successful, you will see it loaded up and the heatmap will be loaded.

Now you just have to go back to MPC-HC and hit the play button and it will play in sync!

That’s ALL! You can play your videos from the sites and have it sync up with your funscript.
But Wait, there’s More:

:floppy_disk: Download the video to your hard drive

With the file playing in MPC-HC, you can click on File → Save a Copy
Then give it a folder and filename on your hard drive and it will stream download and encode the file for you.

:wrench: Troubleshooting

If MPC-HC cannot play the stream with this error - “Failed to Render” - Usually, it’s because you don’t have the right codec installed. You can download one of those codec packs - just make sure it’s from a trusted source!
This is the one I usually install: K-Lite - Download K-Lite Codec Pack

:memo: Final Thoughts

That’s it, I hope others will find this useful and I don’t expect this to work for everyone, but hopefully it will shine a light on this path.

I’ll update this post as I get more feedback, but please take note for the issues at the top of this post. It’s not a perfect solution, but works well.

Also, Shameless plug to my scripts, I’m new to scripting, please check out my free scripts and give me feedback or likes haha!

Cheers,
BJ

17 Likes

thanks for the clear write up. Always good to have things documented.

when I try to open a link it says in the down left corner “file failed to render” any advice how to fix that?

Hi @Donmon - it it says “Failed to Render” that means that the video you’re trying to play is encoded in a way that MPC-HC doesn’t understand. So that video won’t work. I have this on many videos in Sankaku Complex for example.

Yea but I used the same link to video as you

I see. yes it’s a codec issue cos it can’t render the file. I have quite a bunch of codecs installed.

Do you have any codecs installed? I recommend K-Lite Codec Pack if you haven’t installed it yet.

Let me know if this fixes it.
K-Lite - Download K-Lite Codec Pack

Search online for codec packs as well, when I get codec errors, i just install codec packs, but gotta be careful you are downloading from safe sources.

Thanks bro, now it works perfetcly. I installed the “Mega pack” cause it contains the most I guess. It was my first time using MPC-HC. It reinstalled my player and the folder layout changed a little bit so I was confused for a minute where excatly the yt-dlp ffmpeg and ffprobe files go but i figured it out. It is even better cause it changed to the dark version.

1 Like

Where is the script for the referenced video?

It’s this one here. My Second Script. Enjoy!

https://discuss.eroscripts.com/t/my-second-script-heavy-beat-pmv-hmv-03-by-ioedits/119400