ubuntu record video change time

C++
# for Ubuntu
gsettings set org.gnome.settings-daemon.plugins.media-keys max-screencast-length 0
# or use dconf-editor to change from a gui
Source

Also in C++: