[FFMPEG/Libav] Game capture in Linux

Your above comment where you say to remove -acodec, it just defaults to vorbis and it's still choppy.

Ubuntu removed ffmpeg and replaced it with libav which is a fork of ffmpeg. The syntax for using it seems to be the same though.

instead of "-error" does "-loglevel debug" show those logs?

Ah ok, mine defaults to aac

Terminal ran out of lines so it didn't get all of it

https://dl-web.dropbox.com/get/Public/devel?_subject_uid=74532228&w=AABr48IXMY-4u5uoVex-2t96NzSvRbNuPS0feueQFzlzNA

 

Also would be better to get a log file instead of one in the terminal

https://dl.dropboxusercontent.com/u/74532228/debug

By a quick glance the log looks OK. Im in the woods this weekend so I wont have access to a PC until sunday. Try recording with lower settings, maybe its nvidia driver related, update your kernel or try with another distro.

The video is fine it's the audio I can't get working right.

Just realized that the sound is fine in mplayer, it's a vlc issue.

I just tried mplayer but the audio is still messed up.

That's weird. Well at least we know that data is lost during the playback process rather than the recording process; link to demo.


Canonical:

“If an application is not submitting data to PulseAudio in time, the PulseAudio has no audio to play back, so therefore playback breaks up. Once some more data has reached PulseAudio, it starts playback again, and so playback is started and stopped repeatedly.

The other problem could be with bad position reports from the hardware. PulseAudio depends on being able to ask the hardware for its current position at all times, and this should be sample accurate. You can test this by trying to run PulseAudio with timer scheduling disabled, in this case PulseAudio will rely more on DMA interrupts and less on position reports. However, this will also make PulseAudio draw more power than necessary from the machine, so please avoid this if you can.”


Try the options under “Glitches, skips or crackling” in the Arch wiki.

I'll try that in the Arch wiki then I'll try just using Alsa. I think you have to set up a virtual sound card or something.

So I set the configuration to 7.1 in Ubuntu sound settings and 7.1 + stereo input in pavucontrol and everything seems to work now. Took me forever to figure this out lol.

Ok I take that back. The audio is fine in the beginning of the video then just ends.

Double check if you get the same error when you're sound settings are set to stereo (after all you're recording with "-ac 2" aka. stereo (2 channels)).

Link a demo, might be that Ubuntu is just being a b*tch.

Here's a demo: https://dl.dropboxusercontent.com/u/74532228/test.mkv

When I play with mplayer the audio is fine for a few seconds then spazzes out and goes silent.

Ok I just tried the exact same script using ffmpeg on my laptop running Arch. It worked perfectly. I'm guessing now the problem is with avconv. I'll try compiling ffmpeg I guess.

EDIT: I just found the ppa for Ubuntu. It's working perfectly.

Try and install simplescreenrecorder http://www.omgubuntu.co.uk/2013/12/simple-screen-recorder-linux . It tells  you how to install it towards the bottom of the page, but above the comments.  Good Luck!