TUBE.copy.sh
This commit is contained in:
parent
b58ab40a23
commit
59272a3409
|
@ -34,17 +34,20 @@ for yurl in $(cat ~/.zen/tmp/tiddlers.json | jq -r '.[].text' | grep 'http'); do
|
|||
|
||||
mkdir -p ~/.zen/tmp/tube
|
||||
|
||||
|
||||
TITLE=$(yt-dlp --print title ${yurl})
|
||||
TITLE=$(echo "$TITLE" | tr -cd '[:alnum:]._-')
|
||||
|
||||
# https://github.com/yt-dlp/yt-dlp#format-selection-examples
|
||||
# SUBS ? --write-subs --write-auto-subs --sub-langs "en, en-orig" --embed-subs
|
||||
# TODO : DELAY COPY OPERATION... Astro can download quicker at 03:00 AM
|
||||
echo "yt-dlp -f \"bv*[ext=mp4][height<=480]+ba/b[height<=480] / bv*[ext=mp4][height<=720]+ba/b[height<=720]\" --no-mtime --embed-thumbnail --add-metadata -o \"$HOME/.zen/tmp/tube/%(title)s.%(ext)s\" ${yurl}"
|
||||
yt-dlp -f "bv*[ext=mp4][height<=480]+ba/b[height<=480] / bv*[ext=mp4][height<=720]+ba/b[height<=720]" -S "filesize:500M" --no-mtime --embed-thumbnail --add-metadata -o "$HOME/.zen/tmp/tube/%(title)s.%(ext)s" ${yurl}
|
||||
yt-dlp -f "bv*[ext=mp4][height<=480]+ba/b[height<=480] / bv*[ext=mp4][height<=720]+ba/b[height<=720]" -S "filesize:500M" --no-mtime --embed-thumbnail --add-metadata -o "$HOME/.zen/tmp/tube/$TITLE.%(ext)s" ${yurl}
|
||||
|
||||
echo
|
||||
# Get last writen file... TODO: Could we do better ?
|
||||
# ZFILE=$(ls -t ~/.zen/tmp/tube/*.mp4 | head -n 1)
|
||||
TITLE=$(yt-dlp --print title ${yurl})
|
||||
echo "$TITLE"
|
||||
|
||||
ZFILE="$TITLE.mp4"
|
||||
echo "$ZFILE"
|
||||
|
||||
|
|
Loading…
Reference in New Issue