Funscript&Video merger / splitter

I wrote a small tool to automate splitting / merging videos AND also the corresponding funscripts.

So you can define your favorite scenes in a csv file and the tool will create a new video and a funscript for each of that parts.

This also works vice versa to combine your favorite scenes/videos into one video or to create a loop.

Splitting:
create a csv file with the same name of the funscript and video
define 4 colums: startms endms name speed
name is the name of the video, start&end is where the new video is created from
start and end can be milliseconds, minutes:milliseconds or minutes:seconds.
a good way to get the ms is openfunscripter.
a speed parameter for speed in percent is optional
example:
startms;endms;name;speed
33583;52483;vid1;
52483;75733;vid2;
75749;87399;vid3;
75749;87399;vid3_faster;200
75749;87399;vid3_slower;50
87416;116366;filler;
1:56.416;2:12.916;vid5;
02:12966;02:29699;anotherone;
02:29710;02:41933;lastvideo;

merging:
the csv file has to be in the same place as the videos/funscripts
it needs the colum mergefilename, a speed parameter for speed in percent is optional
example:
mergefilename speed
part1.mp4;
part2.mp4;
part3.mp4;
part2.mp4;150
part2.mp4;50
part3.mp4;

there are three merge modes:

just merge the files → only works when the videos have the same size and format. For example if you want to glue a video together again you just split.

resize and merge → a bit more forgiving. Videos are all scaled to the same size (aspect ratio is preserved and the video will be filled with a black border if required).

resize and render a new video → should be the safest way but rendering a video takes some time.

the merge output is in /merge/output.mp4 and merge/output.funscript

a basic example for splitting/merging, the sourcecode and a bigger splitting example for
https://discuss.eroscripts.com/t/the-evilbanana-endurance-challenge/83994 is included.

[update 1.4] - 12.7.24

  • added ouput video fps input field for full/“slow” video Creation

[update 1.3] - 30.4.24

  • added fix for corrupted videos when speed increases
  • some functionalities for better sync with script
  • optional removal of actions that are/got too fast

[update 1.1] - 9.1.23
Moved logic to separate thread
improved logging
funscript existence check is optional now if you just want to scale the video
added speed functionality for split and merge

33 Likes

I am eager to check this out. I’m assuming that I can omit unwanted sections when merging videos? For example, Klixen releases her videos in 2 parts and there is usually a text intro on a black screen. I want to cut that part out. How smooth is the toy movement at the cuts? Does it analyze and adjust the end point of file A and/or the beginning point of file B?

You can split the video into the sections you want and the rest is left out. So when you merge them again they are gone.
Or just split it into one section that starts when the intro ends for example.

The funscripts contents are unchanged.
I just take all actions that are still in there and move them to the position they belong.
I am not adding anything/adjusting anything.
(But since only key positions are saved in the funscript, they should adjust by themselves unless there is a keyposition in the very first AND last milliseconds of the glued part)

1 Like

This is a nice piece of work, thanks for that!

Thank you, I’ll be using with this to put together some compilations or myself. It’ll be handy to remove video sections that I’m not into as well so I can enjoy videos and scripts the way I’d like to.

Love this app, I was really looking for something to cut up FH. Thank You! One thing I notice: there is no indication of what is happening when you split a video. Like the textbox on the right just stays empty. I usually open windows task manager and see whether an ffmpeg process is still running or not. Otherwise there is no indication if the splitting is finished or how far along we are. That would be great if you could add some indication within your app whether splitting is finished.

1 Like

Hi and thanks for your application. Unfortunately I can’t open it… When I run the program nothing happens. Any idea why?

You most likely need to install the .net 6 framework.
Also check if you have write permissions in the folder you extracted the app into.

And yes, i’ll add some logging and status bars when I have some time ;).

That was it! Thank you for your help and for making this very useful program! :+1:

you’re welcome :wink:

just uploaded a new version with better logging and a speed scale functionality.
So if you chain loops together, you can vary the speed of them. Or just speed scripts up.

I tried today but I still have a problem. The trimmed video files are 0 kb while the program informs me that the trimming is finished… Do you have any idea what I am doing wrong?

Sounds like a ffmpeg problem. Do you have a new version of ffmpeg installed? Could also be that the video type is not supported.
If a new ffmpeg version does not do the trick, try executing the ffmpeg.exe command as shown in the log manually. This should give you some more infos about the problem. Or test with a different video to ensure that this is the problem.

thsi just made a project I’m working on alot easier!

I think it’s because I tried it with a VR video (I thought it worked), but apparently the software can’t handle the size of the processing. Is there another way to remove unnecessary parts of some scenes and paste the rest to reduce the length of the videos? I’ve tried using OFS but it’s really hard to get a good result…

This might be a stretch, but it’d be really cool if this program could read the .llc files that Lossless Cut generates: GitHub - mifi/lossless-cut: The swiss army knife of lossless video/audio editing

Thanks once more for this program and your continued improvements to it. If I could ask for one more thing, it would be great if you could queue multiple jobs. I’m using the tool only for splitting funscripts and sometimes I have multiple jobs that can take a while so it would be nice if I could select multiple csv files in the dialog so that all of them are split one after the other.

Thank you for this!

Having an issue with naming the CSV file. The original is KR bj3.csv. Target start time for the split is 458000ms, end 496000ms.

How do I edit the csv file columns? Rename the file?

Sorry if this is a silly question, I’ve tried renaming the file multiple times but it keeps saying “Error reading split csv file: csv needs startms endms and name”.

Hi,

the name should always be the same as the video with a csv extension.

The content of the file from a texteditor like notepad should look like

startms;endms;name;speed
458000;496000;part1;

Or you create a excel file with this 4 rows and 2 columns and save it as csv.


About the other requests: I will look into it, as soon as the weather is less… good.
And thanks for the positive feedback.

That did it! Awesome! Thank you so much!

For anyone interested, I created a step by step guide on how to do merging and splitting using this tool. It has screenshots and stuff that explain the process.

3 Likes