in built screen recording in ubuntu code example
Example: ubuntu record video change time
# for Ubuntu
gsettings set org.gnome.settings-daemon.plugins.media-keys max-screencast-length 0
# or use dconf-editor to change from a gui
# for Ubuntu
gsettings set org.gnome.settings-daemon.plugins.media-keys max-screencast-length 0
# or use dconf-editor to change from a gui