John-Mark Gurney on Nostr: For reasons, here's a script I wrote: ``` yturl="$1" vid="$(youtube-dl --get-filename ...
For reasons, here's a script I wrote:
```
yturl="$1"
vid="$(youtube-dl --get-filename -o 'video.%(ext)s' -f bestvideo "$yturl")"
aud="$(youtube-dl --get-filename -o 'audio.%(ext)s' -f bestaudio "$yturl")"
vidname="$(youtube-dl --get-filename -f bestvideo "$yturl")"
vidname="${vidname%.*}"
rm -f "$vid" "$aud"
youtube-dl -o 'video.%(ext)s' -f bestvideo "$yturl"
youtube-dl -o 'audio.%(ext)s' -f bestaudio "$yturl"
ffmpeg -i "$vid" -i "$aud" -codec copy "$vidname".mp4
```
#AdBlock #Google #YouTube
```
yturl="$1"
vid="$(youtube-dl --get-filename -o 'video.%(ext)s' -f bestvideo "$yturl")"
aud="$(youtube-dl --get-filename -o 'audio.%(ext)s' -f bestaudio "$yturl")"
vidname="$(youtube-dl --get-filename -f bestvideo "$yturl")"
vidname="${vidname%.*}"
rm -f "$vid" "$aud"
youtube-dl -o 'video.%(ext)s' -f bestvideo "$yturl"
youtube-dl -o 'audio.%(ext)s' -f bestaudio "$yturl"
ffmpeg -i "$vid" -i "$aud" -codec copy "$vidname".mp4
```
#AdBlock #Google #YouTube