Skretzo / runelite-plugins

BSD 2-Clause "Simplified" License
5 stars 10 forks source link

Suggestion - Record last X minutes #17

Open MarcJtk opened 1 year ago

MarcJtk commented 1 year ago

Similar to Nvidia Shadowplay and AMD Radeon ReLive, add the ability to use a shortcut to save the last X minutes of gameplay.

Skretzo commented 1 year ago

Good idea. I will look into this, but I cannot promise to get this added too soon

Skretzo commented 1 year ago

Nvidia Shadowplay replay is supposedly able to save up to 20 minutes, but I will probably have to limit it to 5 minutes or so to not cause problems for the rest of the RuneLite client.

Skretzo commented 1 year ago

Because this video recorder is based on Video for Windows a replay feature will most likely have the following limitation: Instead of a continuous last X minutes replay, the only(?) option is to store X minutes of replay at a fixed schedule. This means that instead of a perfectly trimmed replay starting exactly X minutes before you pressed the Save replay button/hotkey, you will most likely end up with 2 replay video files of X minutes length that you will have to combine and trim yourself in a video editing software. In addition, a tiny bit of replay (maybe 1 second at most, not sure) will most likely be lost in-between the two output replay video files.

MarcJtk commented 1 year ago

Is the limitation due to the large file sizes of .AVI files?

Not sure if it is of any help, but have you looked into FFMPEG? I have little knowledge of coding and especially adding something onto Runelite, but perhaps it could be worth looking into? If it needs a complete rewrite you can ignore what I've said.

Glad you're looking into this, as I have found Nvidia Shadowplay and AMD Radeon ReLive to be useless with capturing highlights of OSRS as it doesn't recognize it as a game, and thus only option is to enable desktop recording. Which will break once you have a Netflix tab or the likes open.

Skretzo commented 1 year ago

Is the limitation due to the large file sizes of .AVI files?

Sort of, AVI and Video for Windows was made before video streaming became a thing, and is thus probably not too well equipped for that kind of task, but it is probably still doable. My biggest concern is that people will enable the replay, forget about the plugin, and then eventually wonder why their client is slower than usual.

have you looked into FFMPEG?

FFmpeg is a powerful video tool, but I will definitely not be able to package it with RuneLite because of its big file size and the server cost it would result in for RuneLite. If I instead ask people to download and setup FFmpeg themselves to be able to use it in the plugin then I might as well make a stand-alone program or ask you to use already existing programs out there like OBS (which by the way should have replay video buffer functionality and window/game targeting options that you can look into in the meantime?).

I will not be able to give you an ETA for a video replay feature in the plugin. Maybe in a week or a year? Who knows? 😄 But please do comment on this issue if I forget it 😆

Septem151 commented 8 months ago

@Skretzo Holding you to your word, commenting on this issue because you may have forgotten :P

Skretzo commented 8 months ago

@Septem151 Haha, thank you.

Before I can implement this I probably need to solve #12 which is an issue related to using the GPU plugin together with the Video plugin. With the GPU plugin enabled the RuneLite client reimplements, improves and does the rendering itself that the Jagex client otherwise would have done. I believe the image callback from the draw manager can get in conflict with the GPU plugin, mainly because the RuneLite client is (understandably) not implemented in a way to cater to video recording. I have no experience with the GPU plugin implementation so I don't really know how to approach this. I guess a workaround is to suggest to users that they do not use the GPU plugin, but that is a really bad workaround as that plugin is very useful to many people.

TL;DR: I don't feel comfortable with adding a shadowplay/replay video buffer feature before I have fixed client crashes caused by the Video plugin.