Closed SomeGuyWhoLovesCoding closed 7 months ago
well idk, HRK. EXEX made it and he has a good pc, this feature isnt exactly made for lower-end pcs
What is your question?
At least there could be another way to record lagless game footage that won't destroy a computer processor.
well until we actually FIND that way (if there is one,) then this is the only way we can go.
@JordanSantiagoYT there’s this, it’s old and discontinued but it should still work, in theory https://github.com/EliteMasterEric/extension-ffmpeg
@JordanSantiagoYT there’s this, it’s old and discontinued but it should still work, in theory https://github.com/EliteMasterEric/extension-ffmpeg
That's perfect. It works on windows, macos, linux, and android
@JordanSantiagoYT there’s this, it’s old and discontinued but it should still work, in theory https://github.com/EliteMasterEric/extension-ffmpeg
I've looked. I don't think that has an encoder, only a decoder
@JordanSantiagoYT there’s this, it’s old and discontinued but it should still work, in theory https://github.com/EliteMasterEric/extension-ffmpeg
I've looked. I don't think that has an encoder, only a decoder
pretty sure it has encoding support, haven’t tested it but it might
well idk, HRK. EXEX made it and he has a good pc, this feature isnt exactly made for lower-end pcs
Keyword: "memory leaks", I don't think you should be ignoring that kind of stuff either, even if it's not meant for lower-end computers. Memory leaks shouldn't even happen to begin with.
hello, that memory leak happened on my build too. but there is only one solution, just edit "original" library code. i edited that on my build but idk how to fix this serious problem. i'm also trying on pipe real ffmpeg on fnf (ofc native c++ code), but i'll be busy now cuz job hunting.
hello, that memory leak happened on my build too. but there is only one solution, just edit "original" library code. i edited that on my build but idk how to fix this serious problem. i'm also trying on pipe real ffmpeg on fnf (ofc native c++ code), but i'll be busy now cuz job hunting.
Oh wow, that's great
well idk, HRK. EXEX made it and he has a good pc, this feature isnt exactly made for lower-end pcs
Keyword: "memory leaks", I don't think you should be ignoring that kind of stuff either, even if it's not meant for lower-end computers. Memory leaks shouldn't even happen to begin with.
That's true
@JordanSantiagoYT there’s this, it’s old and discontinued but it should still work, in theory https://github.com/EliteMasterEric/extension-ffmpeg
I've looked. I don't think that has an encoder, only a decoder
Will you please add an option for asynchronous chart parsing and implement that feature itself onto your engine? Also make it manage memory
@JordanSantiagoYT there’s this, it’s old and discontinued but it should still work, in theory https://github.com/EliteMasterEric/extension-ffmpeg
I've looked. I don't think that has an encoder, only a decoder
Will you please add an option for asynchronous chart parsing and implement that feature itself onto your engine? Also make it manage memory
Okay
@JordanSantiagoYT there’s this, it’s old and discontinued but it should still work, in theory https://github.com/EliteMasterEric/extension-ffmpeg
I've looked. I don't think that has an encoder, only a decoder
Will you please add an option for asynchronous chart parsing and implement that feature itself onto your engine? Also make it manage memory
Asynchronous chart loading and memory management are both impossible to implement in a HaxeFlixel game.
But moxie said ok so we might be able to figure smth out.
i.. don't know if this should close the commit
now that the new rendering mode was implemented i think its safe to close this
now that the new rendering mode was implemented i think its safe to close this
Wait, we have to switch from obtaining the pixels to creating a pixel buffer object using gl context.
Well I tried and there's minimal lag from my end, so I'm gonna mark this as "Technically Complete*" until that's implemented
Well I tried and there's minimal lag from my end, so I'm gonna mark this as "Technically Complete*" until that's implemented
Show me code for it. Also, on my end, it lags.
Well I tried and there's minimal lag from my end, so I'm gonna mark this as "Technically Complete*" until that's implemented
Show me code for it. Also, on my end, it lags.
// Render mode stuff.. If SGWLC/cabfile isn't ok with this I will remove it :thumbsup:
private var process:sys.io.Process;
var ffmpegExists:Bool = false;
private function initRender():Void
{
if (!ffmpegMode)
return;
if (!sys.FileSystem.exists('ffmpeg.exe'))
{
trace("\"ffmpeg.exe\" not found! (Is it in the same folder as the JS Engine exe?");
return;
}
ffmpegExists = true;
process = new sys.io.Process('ffmpeg', ['-v', 'quiet', '-y', '-f', 'rawvideo', '-pix_fmt', 'rgba', '-s', lime.app.Application.current.window.width + 'x' + lime.app.Application.current.window.height, '-r', Std.string(targetFPS), '-i', '-', '-b', Std.string(ClientPrefs.renderBitrate * 1000000), 'assets/gameRenders/' + Paths.formatToSongPath(SONG.song) + '.mp4']);
FlxG.autoPause = false;
}
private function pipeFrame():Void
{
if (!ffmpegExists)
return;
var img = lime.app.Application.current.window.readPixels(new lime.math.Rectangle(FlxG.scaleMode.offset.x, FlxG.scaleMode.offset.y, FlxG.scaleMode.gameSize.x, FlxG.scaleMode.gameSize.y));
var bytes = img.getPixels(new lime.math.Rectangle(0, 0, img.width, img.height));
process.stdin.writeBytes(bytes, 0, bytes.length);
}
public function stopRender():Void
{
if (!ClientPrefs.ffmpegMode)
return;
process.stdin.close();
process.close();
process.kill();
FlxG.autoPause = true;
}
Well I tried and there's minimal lag from my end, so I'm gonna mark this as "Technically Complete*" until that's implemented
Show me code for it. Also, on my end, it lags.
// Render mode stuff.. If SGWLC/cabfile isn't ok with this I will remove it :thumbsup: private var process:sys.io.Process; var ffmpegExists:Bool = false; private function initRender():Void { if (!ffmpegMode) return; if (!sys.FileSystem.exists('ffmpeg.exe')) { trace("\"ffmpeg.exe\" not found! (Is it in the same folder as the JS Engine exe?"); return; } ffmpegExists = true; process = new sys.io.Process('ffmpeg', ['-v', 'quiet', '-y', '-f', 'rawvideo', '-pix_fmt', 'rgba', '-s', lime.app.Application.current.window.width + 'x' + lime.app.Application.current.window.height, '-r', Std.string(targetFPS), '-i', '-', '-b', Std.string(ClientPrefs.renderBitrate * 1000000), 'assets/gameRenders/' + Paths.formatToSongPath(SONG.song) + '.mp4']); FlxG.autoPause = false; } private function pipeFrame():Void { if (!ffmpegExists) return; var img = lime.app.Application.current.window.readPixels(new lime.math.Rectangle(FlxG.scaleMode.offset.x, FlxG.scaleMode.offset.y, FlxG.scaleMode.gameSize.x, FlxG.scaleMode.gameSize.y)); var bytes = img.getPixels(new lime.math.Rectangle(0, 0, img.width, img.height)); process.stdin.writeBytes(bytes, 0, bytes.length); } public function stopRender():Void { if (!ClientPrefs.ffmpegMode) return; process.stdin.close(); process.close(); process.kill(); FlxG.autoPause = true; }
Okay that isn't using the new method of getting the screen pixels
closing due to inactivity and it’s been a long while since this was last made
What is your question?
It literally destroys lower end PCs' processors because of memory leaks that happen by reading the applications game's pixels (which is super expensive because of blitting) and settings the lime.graphics.Image variable in the class to it. At least there could be another way to record lagless game footage that won't destroy a computer processor.
I'm not exaggerating btw, this is important.