griimnak
You're a slave to the money then you die
In this day and age, videos are scrubbed from the net so fast that it's becoming increasingly necessary to download/save them.
Unfortunately with most large scale sites, it's not as simple as just finding an mp4 link and hitting CTRL+S to save it.
In this thread, I'll share a few personal tricks and tools I use to download videos and music from various sources around the internet.
The big sites
Ever use youtube-dl before?
Well these days, there's a more efficient and active fork called YT-DLP which you can grab
This will cover most mainstream social media sites including but not limited to, youtube, twitter, tiktok, bitchute, vimeo.
Usage:
Firstly, I suggest reading through
Basic usage:
This will download a video in it's original format.
My preferred usage:
This will attempt to download the video in the best quality offered if available, and merge the final output into an mp4 file.
(Demonstrating with a random tiktok link)
.mp4 and m3u8/.ts
Moving on, what about sites that yt-dlp doesn't cover?
Most sites delivering content themselves today deliver them via raw mp4 or .m3u8/.ts stream.
All we need is browser devtools and ffmpeg which you can grab here:
In this example, I'll be using a random CNN video.
First step, find the m3u8 steam master url in devtools:
Once you have the url, just paste it into ffmpeg as shown below.
My preferred usage:
voila.
Wrapping up
I wrote a crappy lil wrapper that I personally use for mp3 and mp4 conversion with thumbnail embedding, so I'll leave it here if anyone finds use in it.
Hopefully this helps you in this digital age of information.
If you have anything to add to this post, feel free to leave a reply and I'll be sure to add edit it in, cheers!
Unfortunately with most large scale sites, it's not as simple as just finding an mp4 link and hitting CTRL+S to save it.
In this thread, I'll share a few personal tricks and tools I use to download videos and music from various sources around the internet.
The big sites
Ever use youtube-dl before?
Well these days, there's a more efficient and active fork called YT-DLP which you can grab
You must be registered for see links
.This will cover most mainstream social media sites including but not limited to, youtube, twitter, tiktok, bitchute, vimeo.
Usage:
Firstly, I suggest reading through
You must be registered for see links
for options that suit your preferences.Basic usage:
This will download a video in it's original format.
Bash:
$ yt-dlp 'videourl'
My preferred usage:
This will attempt to download the video in the best quality offered if available, and merge the final output into an mp4 file.
(Demonstrating with a random tiktok link)
Bash:
$ yt-dlp --format "bestvideo+bestaudio[ext=m4a]/bestvideo+bestaudio/best" --merge-output-format mp4 --output testvid.%(ext)s 'https://www.tiktok.com/@nastyatyman/video/7071925639011503361?is_copy_url=1&is_from_webapp=v1'
.mp4 and m3u8/.ts
Moving on, what about sites that yt-dlp doesn't cover?
Most sites delivering content themselves today deliver them via raw mp4 or .m3u8/.ts stream.
All we need is browser devtools and ffmpeg which you can grab here:
You must be registered for see links
In this example, I'll be using a random CNN video.
First step, find the m3u8 steam master url in devtools:
Once you have the url, just paste it into ffmpeg as shown below.
My preferred usage:
Bash:
$ ffmpeg -i 'https://clips-media-lln.warnermediacdn.com/cnn/clips/2022-03/714523-b746d3ba589a40489a9ecb011d1f3612/ts/media-1/stream.m3u8' -codec copy desiredfilename.mp4
voila.
Wrapping up
I wrote a crappy lil wrapper that I personally use for mp3 and mp4 conversion with thumbnail embedding, so I'll leave it here if anyone finds use in it.
Python:
import os
import time
print(''' __ __ ___
/'__`\ /\ \ /\_ \
___ ___ _____ /\_\_\ \ \_\ \\\//\ \
/' __` __`\/\ '__`\/_/_\_\_ /'_` \ \ \ \
/\ \/\ \/\ \ \ \_\ \/\ \_\ \/\ \_\ \ \_\ \_
\ \_\ \_\ \_\ \ ,__/\ \____/\ \___,_\/\____\
\/_/\/_/\/_/\ \ \/ \/___/ \/__,_ /\/____/
mp3dl \ \_\ youtube-dl wrapper script for
\/_/ mp3 conversion.
''')
mode = input('Choose mode: "music" or "video": ')
url = None
if mode == 'video':
while True:
url = input('[viddl] Paste YouTube, Twitter, Tiktok, Anime or Bitchute video url: ')
os.system('yt-dlp --retries infinite --format "bestvideo+bestaudio[ext=m4a]/bestvideo+bestaudio/best" --merge-output-format mp4 "{}" --embed-thumbnail --postprocessor-args "-id3v2_version 3" -o videos/{}.%(ext)s'.format(url, time.time()))
elif mode == 'music':
while True:
url = input('[mp3dl] Paste YouTube or Soundcloud url: ')
os.system('yt-dlp --sleep-interval 1 -ciw --retries infinite -f bestaudio "{}" --extract-audio --audio-format mp3 --embed-thumbnail --postprocessor-args "-id3v2_version 3" -o music/%(title)s.%(ext)s'.format(url))
else:
exit('{} is not a valid mode, type "music" or "video"'
Hopefully this helps you in this digital age of information.
If you have anything to add to this post, feel free to leave a reply and I'll be sure to add edit it in, cheers!