To disable Webm video download in yt-dlp via script

This can be done by hand, but via scrip also. Displayr flickering when the script is running.

The script:

yad --center --width=500 --height=50 --text-align=center --text="This script install config file for YouTube videos for avoinding webm videos"
if [ $? = 0 ];
x-terminal-emulator -e mv $HOME/.config/yt-dlp/config $HOME/.config/yt-dlp/config.orig && \
x-terminal-emulator -e mkdir -p $HOME/.config/yt-dlp && \
x-terminal-emulator -e touch $HOME/.config/yt-dlp/config &&
echo '--ignore-errors '
echo '# --no-playlist '
echo '# Save in $HOME '
echo '-o ~/%(title)s.%(ext)s '
echo '# Prefer 1080p or lower resolutions '
echo '-f bestvideo[ext=mp4][width<1280][height<=720]+bestaudio[ext=m4a]/bestvideo[width<1280][height<=720]+bestaudio/best[width<1280][height<=720]/best ' } > $HOME/.config/yt-dlp/config
yad --center --width=900 --height=30 --text-align=center --text="This script installed config file to $HOME/.config/yt-dlp/config file. \
Downloaded videos are coming into your home directory \
You can find backup from $HOME/.config/yt-dlp/config.orig ... if there was file before"
else exit 0

Read also: