[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A way to watch (some) videos about Emacs with wget and mpv
From: |
Emanuel Berg |
Subject: |
Re: A way to watch (some) videos about Emacs with wget and mpv |
Date: |
Sat, 31 Dec 2022 21:49:13 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eduardo Ochs wrote:
> dl-video () {
> local urls=${1:-$(<$DL_FILE)}
> yt-dlp $dlp_opts -f 'bestvideo' ${=urls}
> }
> dl-720 () {
> local urls=${1:-$(<$DL_FILE)}
> yt-dlp $dlp_opts -f 'bestvideo[height=720]+bestaudio' ${=urls}
> }
>
> rm -Rv /tmp/dl-test/
> mkdir /tmp/dl-test/
> cd /tmp/dl-test/
> dl-video 'http://www.youtube.com/watch?v=vs3-HGB6iEw'
> # dl-720 'http://www.youtube.com/watch?v=vs3-HGB6iEw'
>
> I commented out the one with "dl-720" because it produces
> a file with the same name as the one with "dl-video" - this
> one:
>
> How to Read a Greek Play [vs3-HGB6iEw].webm
Yes, because it's the same file. dl-video, with the
'bestvideo' setting without the additional qualifier, could in
theory have retrieved say a 1080p file, which I take it is
considered better, but apparently the best it could find was
the 720p one (and in practice, the 720p files are often just
as good), and that's also the one you get with dl-720 since
then it is even specified explicitely.
> Emanuel, do you have tricks to convert a youtube URL to the
> filename of the saved file
The URL?
The filename is, by default, the title of the YouTube page as
well as a video ID, this is probably used, among other things,
to separate the same material - but in different formats, i.e.
files - from each other.
> or to make yt-dlp save the name in a place that is easy
> to retrieve?
I'm not following? Name, place - what do you mean?
But you can configure the filename of a downloaded file, see
youtube-dl(1) line 679, "OUTPUT TEMPLATE".
The current default template is %(title)s-%(id)s.%(ext)s.
So you use that with -o. The 's' is for string, probably.
https://dataswamp.org/~incal/data/MM
--
underground experts united
https://dataswamp.org/~incal
- Re: A way to watch (some) videos about Emacs with wget and mpv, (continued)
- Re: A way to watch (some) videos about Emacs with wget and mpv, Emanuel Berg, 2022/12/27
- Re: A way to watch (some) videos about Emacs with wget and mpv, Eduardo Ochs, 2022/12/27
- Re: A way to watch (some) videos about Emacs with wget and mpv, Emanuel Berg, 2022/12/29
- Re: A way to watch (some) videos about Emacs with wget and mpv, Eduardo Ochs, 2022/12/29
- Re: A way to watch (some) videos about Emacs with wget and mpv,
Emanuel Berg <=