User Tools


client:ytfzf

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
client:ytfzf [2025/09/01 08:08] – created marlonivoclient:ytfzf [2025/09/02 09:02] (current) – [Invidous Instance] marlonivo
Line 1: Line 1:
-==== yt-fzf ====+====== yt-fzf ======
 yt-fzf is a posix script to find and watch youtube videos from the terminal. Unfortenetly public instances wont work so we have to run our own locally. yt-fzf is a posix script to find and watch youtube videos from the terminal. Unfortenetly public instances wont work so we have to run our own locally.
  
Line 21: Line 21:
 ytdl_pref='bestvideo[height<=?1080]+bestaudio/best' ytdl_pref='bestvideo[height<=?1080]+bestaudio/best'
 sub_link_count=8 sub_link_count=8
 +log_level=0
 show_thumbnails=1 show_thumbnails=1
 pages_start=1 pages_start=1
 +is_loop=1
 search_again=1 search_again=1
 multi_search=1 multi_search=1
 invidious_instance="http://localhost:3000" invidious_instance="http://localhost:3000"
 +search_again_shortcut="ctrl-g"
  
-Thumbnail +Thumb 
-thumbnail_viewer="ueberzug+load_thumbnail_viewer="chafa
-thumbnail_quality="maxres"+thumbnail_quality="default"
 fzf_preview_side="right" fzf_preview_side="right"
 sort_by="upload_date" sort_by="upload_date"
 +export FZF_DEFAULT_OPTS="--height=100%"
  
 on_opt_parse_c () { on_opt_parse_c () {
     arg="$1"     arg="$1"
     case "$arg" in     case "$arg" in
- #when scraping subscriptions enable -l 
- #-cSI or -cS 
  SI|S) is_loop=1 ;;  SI|S) is_loop=1 ;;
     esac     esac
 } }
-</code> 
  
-==== Invidous Instance ====+download_thumbnails() { 
 +    for thumb in "$@"; do 
 +        url="${thumb%;*}" 
 +        id="${thumb#*;}" 
 +        curl -s -L "$url" -o "$thumb_dir/$id.jpg" >/dev/null 2>&1 & 
 +    done 
 +    wait 
 +
 +</code> 
 +===== Invidous Instance =====
 Install Dependencys Install Dependencys
 <code> <code>
Line 77: Line 87:
   port: 5432   port: 5432
  
-hmac_key: "8f3d342cfb8a11d93e9f..."+hmac_key: "8f3d342cfb8a11d93e9f"
 </code> </code>
  
 +
 +===== Postgres =====
 +Login into postgres
 +<code>
 +sudo -u postgres psql
 +</code>
 +
 +Within the psql-Prompt:
 +<code>
 +CREATE USER invidious WITH PASSWORD 'invidious';
 +CREATE DATABASE invidious OWNER invidious;
 +\q
 +</code>
 +
 +
 +Import DB-Scheme:
 +<code>
 +psql -U invidious -h localhost -d invidious < config/sql/channels.sql
 +psql -U invidious -h localhost -d invidious < config/sql/videos.sql
 +psql -U invidious -h localhost -d invidious < config/sql/users.sql
 +psql -U invidious -h localhost -d invidious < config/sql/session_ids.sql
 +psql -U invidious -h localhost -d invidious < config/sql/nonces.sql
 +psql -U invidious -h localhost -d invidious < config/sql/channel_videos.sql
 +</code>
  
 Now you can start invidious Now you can start invidious
 <code> <code>
 ./invidious ./invidious
 +</code>
 +
 +
 +===== MPV Config =====
 +
 +Add this to ''%%~/.config/mpv/mpv.conf%%'' to surpress unecessary clutter while playing videos.
 +<code>
 +audio-device=pulse 
 +vo=x11
 +profile=sw-fast minimal)
 +hwdec=no 
 +
 +no-terminal 
 +really-quiet
 +msg-level=all=no  Fehler, AV/VO Logs etc.
 +</code>
 +
 +Add both postgres and invidous to your boot runlevel. 
 +<code>
 +sudo rc-update add postgres default
 +sudo rc-update add invidous default
 +</code>
 +
 +Now you can search anything with yt-fzf.
 +<code>
 +ytfzf Anything
 </code> </code>
  
 Done! Have fun with ytfzf Done! Have fun with ytfzf