vorbisenc and stuttering
ChristophHaag opened this issue · 2 comments
Way back when I proposed c3c6559 it seemed like a good idea. But since then the recording always was a bit off and I never really could put my finger on it.
Now I have written my own (simpler) script based on gstreamer-screenrecording (https://github.com/ChristophHaag/scripts/blob/master/vorecord.sh if you are interested) and experimented a bit.
Turns out that vorbisenc is not really fit for real time recording, at least not with default settings.
This gets most obvious when you try to record with higher framerates. Set FPS="60/1" and record something and the video will be super jerky and stutters.
Turns out this is caused by vorbisenc. Without sound it works fine and in fact other encoders also work fine. As you can see in my version of the script, I switched to gstreamer's faac
instead of vorbisenc
and now I can flawlessly record 60 fps.
I just looked into your gsttwich.sh and noticed you're using voaacenc bitrate=128000 ! aacparse
. This doesn't exist on my archlinux install.
I suggest using faac, but I don't know if it is available everywhere. It's in gst-plugins-bad by the way.
I just looked through the list of encoders in gst-inspect and on second thought I would actually like to switch to opusenc
. vlc chokes on these files, but mplayer plays them fine and youtube has no trouble with them either: https://www.youtube.com/watch?v=e3DbJJ4bF5Q
@ChristophHaag look like twich expects only acc for sound