MaartenBaert / ssr

SimpleScreenRecorder, a screen recorder for Linux
http://www.maartenbaert.be/simplescreenrecorder/
GNU General Public License v3.0
2.56k stars 288 forks source link

OpenGL recording for Tibia #127

Open Javieracost opened 10 years ago

Javieracost commented 10 years ago

Hi there! i have been trying to record the game Tibia through OGL injection, without success because when i click on start recording i get the following:

[PageRecord::RecordStart] Error: Could not get the size of the OpenGL application. Either the application wasn't started correctly, or the application hasn't created an OpenGL window yet. If you want to start recording before starting the application, you have to enable scaling and enter the video size manually. [PageRecord::RecordStart] Error: Something went wrong during initialization.

On both the terminal and the in-application log. Noticed that with the auto-start option checked, it doesnt even start the program (tried putting the command in different ways, even made a bash alias for it)

Running Kubuntu 12.10

Any advice would be appreciated. Thanks in advance, and congratulations for creating the best (by far!) recording tool i have found.

MaartenBaert commented 10 years ago

How are you starting the game? If the game doesn't even start, then obviously SSR won't be able to record it ...

Javieracost commented 10 years ago

Tried starting it from both the terminal and through KDE's kickstart menu, (which does a cd [game executable folder]; ./[executable]) with the same result: The game starts normally but ssr keeps showing the aforementioned error message All this when i leave the autostart option unchecked, that is.

I think the game not starting automatically might be a symptom, not the cause of the problem

Brottweiler commented 10 years ago

Tried starting it from both the terminal and through KDE's kickstart menu

Have you tried starting it from within SSR? Because that's what you have to do, as far as I know, if you want to record an OpenGL window.

Javieracost commented 10 years ago

Have you tried starting it from within SSR? Because that's what you have to do, as far as I know, if you want to record an OpenGL window.

Yes, but it does not work, which is why i end up starting it separately. Though i understood that it wasnt mandatory to start it from within ssr, maybe the right question to ask is: am i setting a wrong command to execute? tried the following: /path/to/execfile/Tibia ./Tibia (should work, since i started ssr working on the executable's directory) tibia (bash alias for moving to the directory then running the game)

thanks for the quick replies by the way!

Brottweiler commented 10 years ago

You should be able to use the same command as you would use in a terminal. Don't assume SSR works in a specific directory (i don't know which it is, but I am sure it's not in the dir you are in when you start SSR). You're saying that you run /path/to/exec/Tibia which should work. It works in a normal terminal, right? ./Tibia should not work if SSR does not work in the same directory.

Javieracost commented 10 years ago

I see.. there might be the problem! in order for the game to start, it requires some files (sprites, config, etc) to be present in the working directory. If they arent, it outputs an error message to stdout and exits, so if ssr doesnt work on the same directory where i started it from, i assume the game wont be either, and therefore wont start. I dont see the mentioned error text, but i imagine that program stdout messages might not be showing up in terminal. If so, isnt there a way to manually pass the program some environment variables?

Brottweiler commented 10 years ago

Could a google search for linux change working directory be helpful? Seems to be ways to launch an application with a specific working directory.

Javieracost commented 10 years ago

Uhm.. i dont think im the kind of newb one would suggest a google search :( Anyways, i realized that when i first tried with cd ~/Tibia; ./Tibia as command input and it didnt work i didnt have the auto-start box checked, now tried again with it, and now the game starts as it should... but sadly, when i click on start recording, i get the same error message i mentioned on my first post!

Offtopic: by using pwd as command to be executed i figured out that stdout is still shown in terminal and also that regardless of where you start ssr from, its working dir will always be ~/

MaartenBaert commented 10 years ago

Newer versions of SSR have a 'working directory' textbox in the OpenGL recording dialog. If you are using an older version, you can still make it work by running a bash script that first changes the directory and then runs the game (you can then auto-start that script from SSR). Alternatively you can start the game from a terminal, but then you have to copy the 'full command' from the output from SSR (i.e. you have to start it with LD_PRELOAD and SSR_GLINJECT_SHM set to the right values).

Javieracost commented 10 years ago

Newer versions of SSR have a 'working directory' textbox in the OpenGL recording dialog. If you are using an older version, you can still make it work by running a bash script that first changes the directory and then runs the game (you can then auto-start that script from SSR). Alternatively you can start the game from a terminal, but then you have to copy the 'full command' from the output from SSR (i.e. you have to start it with LD_PRELOAD and SSR_GLINJECT_SHM set to the right values).

Hmm yes forgot to mention that im using version 0.1.2 which doesnt offer that option, but anyways, since i managed to start the game without trouble, that part is solved. Now about the [PageRecord::RecordStart] Error: Could not get the size of the OpenGL application. After uninstalling and trying to reinstall from source, i got this during the configuring process: checking for XFixesGetCursorImage in -lXfixes... no configure: error: required library missing $

Now, according to the README file, i should be able to successfully compile and install ssr without a problem since i got all the packages on the " For Ubuntu 12.04 - 13.04 " part installed, but after a LOT of searching and looking around, i noticed that the 32bit version of libXfixes and libGL ( i.e. libxfixes-dev:i386 and libgl1-mesa-dev:i386) cannot be installed along with their 64-bit counterpart, this is the only thing i can think may be causing trouble and i feel totally stuck at this point... Hope there is a solution :/

MaartenBaert commented 10 years ago

@Javieracost If you scroll down a bit in the README file, you will find workarounds for the 32-bit lib issues on ubuntu. Basically you have to create some symlinks and run ldconfig.

Javieracost commented 10 years ago

Hi! im back, after another lot of searching, testing etc i managed to get every library in place, and the compiling/installing process completed flawlessly.. and when i thought i was ready to go.. surprise! the exact same error message appeared upon trying to start recording, just like before! Trying not to get too annoying, but i hope you guys can find out whats wrong here :\