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
Published at
2023-11-01 22:25:10Event JSON
{
"id": "1d3dc3d50706583f3c79a975290094ce1136a89a1f618a00af7edc064e1acf33",
"pubkey": "e675b9ee45632dbdeddf3704bf513a17e49389bbf180ff1c32af9ded83d4ca0b",
"created_at": 1698877510,
"kind": 1,
"tags": [
[
"t",
"adblock"
],
[
"t",
"google"
],
[
"t",
"youtube"
],
[
"proxy",
"https://flyovercountry.social/users/encthenet/statuses/111337636514185012",
"activitypub"
]
],
"content": "For reasons, here's a script I wrote:\n```\nyturl=\"$1\"\nvid=\"$(youtube-dl --get-filename -o 'video.%(ext)s' -f bestvideo \"$yturl\")\"\naud=\"$(youtube-dl --get-filename -o 'audio.%(ext)s' -f bestaudio \"$yturl\")\"\nvidname=\"$(youtube-dl --get-filename -f bestvideo \"$yturl\")\"\nvidname=\"${vidname%.*}\"\nrm -f \"$vid\" \"$aud\"\nyoutube-dl -o 'video.%(ext)s' -f bestvideo \"$yturl\"\nyoutube-dl -o 'audio.%(ext)s' -f bestaudio \"$yturl\"\nffmpeg -i \"$vid\" -i \"$aud\" -codec copy \"$vidname\".mp4\n```\n\n#AdBlock #Google #YouTube",
"sig": "8aee8a2043d18d6e4f7154c9326495f84af386754a585703edb9603017f32a5537c1a5cda704bfe7c31aee40f8e3ae4a47dbcb6a34ea2e3b995a0d134b6fd0ff"
}