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

15 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…