MaartenBaert / ssr

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

[BUG] No Recording of Source Engine Games! #162

Open fusionlightcat opened 10 years ago

fusionlightcat commented 10 years ago

Hi!

I wanted to take a screencast of Portal 2 (Linux Beta on Steam), and ive done following:

  1. Start SSE and done Settings etc... (Record entire Screen)
  2. Start Portal 2
  3. Press Strg-R and recorded.
  4. Press Strg-R again.

And now there is a small file with 262 Bytes, named like my file i wanted to have my video in.

Here are my settings:

ssr1

ssr2

I compiled the version from GitHub.

The Output after the Recording:

[PageRecord::StartPage] Starting page ...
[PageRecord::StartPage] Started page.
[PageRecord::StartOutput] Starting output ...
[Muxer::Init] Using format mp4 (MP4 (MPEG-4 Part 14)).
[Muxer::AddStream] Using codec libx264 (libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10).
[BaseEncoder::EncoderThread] Encoder thread started.
[Muxer::AddStream] Using codec libmp3lame (libmp3lame MP3 (MPEG audio layer 3)).
[BaseEncoder::EncoderThread] Encoder thread started.
[DetectCPUFeatures] CPU features: mmx sse sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 bmi1 bmi2
[Muxer::MuxerThread] Muxer thread started.
[DetectCPUFeatures] CPU features: mmx sse sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 bmi1 bmi2
[PageRecord::StartOutput] Started output.
[PageRecord::StartInput] Starting input ...
[Synchronizer::SynchronizerThread] Synchronizer thread started.
[X11Input::Init] Using X11 shared memory.
[X11Input::InputThread] Input thread started.
[PageRecord::StartInput] Started input.
[PulseAudioInput::InputThread] Input thread started.
[PageRecord::StopOutput] Stopping output ...
[Synchronizer::~Synchronizer] Stopping synchronizer thread ...
[Synchronizer::SynchronizerThread] Synchronizer thread stopped.
[Muxer::Finish] Finishing encoders ...
[Muxer::~Muxer] Stopping encoders ...
[Muxer::~Muxer] Waiting for muxer thread to stop ...
[BaseEncoder::EncoderThread] Encoder thread stopped.
[BaseEncoder::EncoderThread] Encoder thread stopped.
[Muxer::MuxerThread] Muxer thread stopped.
[BaseEncoder::~BaseEncoder] Stopping encoder thread ...
[BaseEncoder::~BaseEncoder] Stopping encoder thread ...
[PageRecord::StopOutput] Stopped output.
[PageRecord::StopInput] Stopping input ...
[X11Input::~X11Input] Stopping input thread ...
[X11Input::InputThread] Input thread stopped.
[PulseAudioInput::~PulseAudioInput] Stopping input thread ...
[PulseAudioInput::InputThread] Input thread stopped.
[PageRecord::StopInput] Stopped input.

It isnt working, when:

It is working, when:

Would be great if you could help me!

Thankyou, fusionlightcat

PS: system specs:

Linux Mint Debian (Based on Debian Jessie) i5-4570 Geforce GTX 650 Ti Boost (Driver 319.72) 8 GB GeIL RAM 64bit

ubuntuaddicted commented 10 years ago

you're doing a screen grab therefore it shouldn't matter what's on your screen, are you running portal in fullscreen or windowed mode? if ssr isn't recording it when it's fullscreen i would suggest running portal in windowed mode and use ssr and record its window. i run a compiled from git and I have no issues livestreaming portal 2 but that is when portal 2 is running in windowed mode. good luck

MaartenBaert commented 10 years ago

Can you try to disable audio on the input page, and see if that makes any difference? I want to know whether this is a video or audio issue. Both can cause an empty file (because SSR won't start unless it receives both video and audio).

Some fullscreen games interact badly with the rest of the system, and usually this is fixed by running in windowed mode as ubuntuaddicted suggested. If that still doesn't fix it, consider using OpenGL recording instead (which will also improve the quality). I have verified that GLInject works with Portal 2 (if it doesn't, then you should disable the Steam overlay and possibly the Steam runtime).

fusionlightcat commented 10 years ago

hmmm i dont know, what ive done. Now Portal 2 istnt making any window or so. I never started P2 since i wrote here. And now there is only a progress named "portal2_linux" and that was ist.

I will inform you, when i runs again, and i can check this with the sound. Sorry :(

ubuntuaddicted commented 10 years ago

Verify the games files through steam and first just get P2 working again. You can try to launch it in windowed mode by right clicking on it and go to properties and then Launch Options, and enter "-windowed" without the quotes and try that.

fusionlightcat commented 10 years ago

Okay i verified it, and now it works.

SSR isnt recording, when P2 runs in background or in windowed mode or in fullscreen.

I diabled Audio recording, and now it works perfectly.

So its maybe an audio-problem...

MaartenBaert commented 10 years ago

That probably means that the game is trying to use a microphone directly through ALSA instead of going through dsnoop ('sysdefault' in ALSA) or PulseAudio. Try putting this in ~/.profile:

export SDL_AUDIODRIVER="pulse"

Then log out and log in again. SDL (the library used by Portal 2 for audio) should now use PulseAudio.

fusionlightcat commented 10 years ago

If there is no .profile, should i create it?

MaartenBaert commented 10 years ago

Yes. Note that any file that starts with a dot is normally a hidden file and may not show up in your file manager by default, so it may already be there even if you don't see it.

fusionlightcat commented 10 years ago

Okay, done it. Sadly i cant hear any sound now from P2.

I reactivated Audio Recording on SSR, but also no sound in the video (Capturing works now)

Every other application gives out sound. (VLC, Google Chrome)

MaartenBaert commented 10 years ago

Have you looked at the sound settings in Portal 2? Maybe you can change something there to make it work.

I've found that it sometimes helps to disable the Steam runtime to get sound working (this is not related to SSR). You can do this by starting Steam with:

STEAM_RUNTIME=0 steam

You may have to install some missing libraries to make this work though.

fusionlightcat commented 10 years ago

Portal 2 gives Sound, when i remove the .profile and re login.

When i start steam without the steam runtime, it crashes, and says missing libraries and failed to load steamuui.so and more...

I will lookin the sound settings of P2... So wait a moment...

fusionlightcat commented 10 years ago

There is no option in the Sound Settings for P2 to change something neccessary...

MaartenBaert commented 10 years ago

It sounds more like a problem with Portal 2 or PulseAudio than a problem with SSR. I can't really help you with that other than telling you to disable the steam runtime. As I said, this requires that you install various missing libraries first. You can get a list of missing libraries by running these commands:

cd ~/.local/share/Steam/ubuntu12_32
LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}" ldd $(file *|sed '/ELF/!d;s/:.*//g')|grep 'not found'|sort|uniq

Some games require additional libraries on top of that, you can find some of them here (package names are for Arch Linux, but Debian has similar names).

fusionlightcat commented 10 years ago

Okay, but thankyou! I will try this with the libraries! :)