Pour riper une vidéo et l'uploader sur bebou - retour accueil
git clone git://bebou.netlib.re/ripvid
Log | Files | Refs | README |
commit 1204b7989cac309cc6313f6fc163d47d7971eec8 parent 2f6c17aae333f4777ef2ed739b428537aa7208c9 Auteurice: Arthur Pons <arthur.pons@unistra.fr> Date: Wed, 2 Jul 2025 20:35:15 +0200 On peut combiner les formats et on sort si rien Diffstat:
M | ripvid | | | 14 | ++++++++------ |
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/ripvid b/ripvid @@ -3,13 +3,15 @@ [ "$#" != 1 ] && { echo "Seulement le lien en arg svp"; exit 1; } vid="$1" - choice="$(yt-dlp -F "$vid" | sed -n '/^ID/,$ p' | fzy -m | - cut -d ' ' -f1)" + cut -d ' ' -f1 | + paste -s -d'+')" -yt-dlp -f "$choice" --force-overwrites "$vid" -o /tmp/video.mp4 -rsync /tmp/video.mp4 mbb:/home/meso/arthur.bebou.netlib.re/video.mp4 -echo "http://arthur.bebou.netlib.re/video.mp4" -mpv http://arthur.bebou.netlib.re/video.mp4 +if [ "$choice" ] && [ "$vid" ];then + yt-dlp -f "$choice" --force-overwrites "$vid" -o /tmp/video.mp4 + rsync /tmp/video.mp4 mbb:/home/meso/arthur.bebou.netlib.re/video.mp4 + echo "http://arthur.bebou.netlib.re/video.mp4" + mpv http://arthur.bebou.netlib.re/video.mp4 +fi