Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Community
Technology
[Tutorial] Downloading Music/Videos from the net
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="griimnak" data-source="post: 473746" data-attributes="member: 35695"><p>In this day and age, videos are scrubbed from the net so fast that it's becoming increasingly necessary to download/save them.</p><p>Unfortunately with most large scale sites, it's not as simple as just finding an mp4 link and hitting CTRL+S to save it.</p><p></p><p>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.</p><p></p><p></p><p><strong><span style="font-size: 26px">The big sites</span></strong></p><p>Ever use youtube-dl before?</p><p>Well these days, there's a more efficient and active fork called <strong>YT-DLP</strong> which you can grab <a href="https://github.com/yt-dlp/yt-dlp" target="_blank">here</a>.</p><p>This will cover most mainstream social media sites including <em>but not limited to</em>, <strong>youtube</strong>,<strong> twitter</strong>, <strong>tiktok</strong>, <strong>bitchute</strong>, <strong>vimeo</strong>.</p><p></p><p><strong><span style="font-size: 18px">Usage:</span></strong></p><p>Firstly, I suggest reading through <a href="https://www.mankier.com/1/yt-dlp" target="_blank">YT-DLP's documentation</a> for options that suit your preferences.</p><p></p><p><strong><span style="font-size: 15px">Basic usage:</span></strong></p><p>This will download a video in it's original format.</p><p>[CODE=Bash]</p><p>$ yt-dlp 'videourl'</p><p>[/CODE]</p><p></p><p><strong><span style="font-size: 15px">My preferred usage:</span></strong></p><p>This will attempt to download the video in the best quality offered if available, and merge the final output into an mp4 file.</p><p>(Demonstrating with a random tiktok link)</p><p>[CODE=Bash]</p><p>$ 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'</p><p>[/CODE]</p><p></p><p></p><p></p><p><strong><span style="font-size: 26px">.mp4 and m3u8/.ts</span></strong></p><p>Moving on, what about sites that yt-dlp <em>doesn't</em> cover?</p><p></p><p>Most sites delivering content themselves today deliver them via raw mp4 or .m3u8/.ts stream.</p><p>All we need is browser <strong>devtools</strong> and <strong>ffmpeg</strong> which you can grab here: <a href="https://www.ffmpeg.org/download.html" target="_blank">https://www.ffmpeg.org/download.html</a></p><p></p><p>In this example, I'll be using a random CNN video.</p><p>First step, find the m3u8 steam master url in devtools:</p><p>[SPOILER=Screenshot]</p><p><img src="https://i.imgur.com/7HGCeuD.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p>[/SPOILER]</p><p></p><p>Once you have the url, just paste it into ffmpeg as shown below.</p><p></p><p><strong><span style="font-size: 18px">My preferred usage:</span></strong></p><p>[CODE=Bash]</p><p>$ ffmpeg -i 'https://clips-media-lln.warnermediacdn.com/cnn/clips/2022-03/714523-b746d3ba589a40489a9ecb011d1f3612/ts/media-1/stream.m3u8' -codec copy desiredfilename.mp4</p><p>[/CODE]</p><p></p><p>voila.</p><p></p><p><strong><span style="font-size: 22px">Wrapping up</span></strong></p><p>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.</p><p>[SPOILER=Python]</p><p>[CODE=Python]</p><p>import os</p><p>import time</p><p></p><p>print(''' __ __ ___ </p><p> /'__`\ /\ \ /\_ \</p><p> ___ ___ _____ /\_\_\ \ \_\ \\\//\ \ </p><p> /' __` __`\/\ '__`\/_/_\_\_ /'_` \ \ \ \</p><p> /\ \/\ \/\ \ \ \_\ \/\ \_\ \/\ \_\ \ \_\ \_</p><p> \ \_\ \_\ \_\ \ ,__/\ \____/\ \___,_\/\____\</p><p> \/_/\/_/\/_/\ \ \/ \/___/ \/__,_ /\/____/</p><p> mp3dl \ \_\ youtube-dl wrapper script for</p><p> \/_/ mp3 conversion.</p><p>''')</p><p></p><p>mode = input('Choose mode: "music" or "video": ')</p><p>url = None</p><p></p><p>if mode == 'video':</p><p> while True:</p><p> url = input('[viddl] Paste YouTube, Twitter, Tiktok, Anime or Bitchute video url: ')</p><p> 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()))</p><p></p><p>elif mode == 'music':</p><p> while True:</p><p> url = input('[mp3dl] Paste YouTube or Soundcloud url: ')</p><p> 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))</p><p></p><p>else:</p><p> exit('{} is not a valid mode, type "music" or "video"'</p><p></p><p>[/CODE]</p><p>[/SPOILER]</p><p></p><p>Hopefully this helps you in this digital age of information.</p><p>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!</p></blockquote><p></p>
[QUOTE="griimnak, post: 473746, member: 35695"] 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. [B][SIZE=7]The big sites[/SIZE][/B] Ever use youtube-dl before? Well these days, there's a more efficient and active fork called [B]YT-DLP[/B] which you can grab [URL='https://github.com/yt-dlp/yt-dlp']here[/URL]. This will cover most mainstream social media sites including [I]but not limited to[/I], [B]youtube[/B],[B] twitter[/B], [B]tiktok[/B], [B]bitchute[/B], [B]vimeo[/B]. [B][SIZE=5]Usage:[/SIZE][/B] Firstly, I suggest reading through [URL='https://www.mankier.com/1/yt-dlp']YT-DLP's documentation[/URL] for options that suit your preferences. [B][SIZE=4]Basic usage:[/SIZE][/B] This will download a video in it's original format. [CODE=Bash] $ yt-dlp 'videourl' [/CODE] [B][SIZE=4]My preferred usage:[/SIZE][/B] 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) [CODE=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' [/CODE] [B][SIZE=7].mp4 and m3u8/.ts[/SIZE][/B] Moving on, what about sites that yt-dlp [I]doesn't[/I] cover? Most sites delivering content themselves today deliver them via raw mp4 or .m3u8/.ts stream. All we need is browser [B]devtools[/B] and [B]ffmpeg[/B] which you can grab here: [URL]https://www.ffmpeg.org/download.html[/URL] In this example, I'll be using a random CNN video. First step, find the m3u8 steam master url in devtools: [SPOILER=Screenshot] [IMG]https://i.imgur.com/7HGCeuD.png[/IMG] [/SPOILER] Once you have the url, just paste it into ffmpeg as shown below. [B][SIZE=5]My preferred usage:[/SIZE][/B] [CODE=Bash] $ ffmpeg -i 'https://clips-media-lln.warnermediacdn.com/cnn/clips/2022-03/714523-b746d3ba589a40489a9ecb011d1f3612/ts/media-1/stream.m3u8' -codec copy desiredfilename.mp4 [/CODE] voila. [B][SIZE=6]Wrapping up[/SIZE][/B] 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. [SPOILER=Python] [CODE=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"' [/CODE] [/SPOILER] 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! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Community
Technology
[Tutorial] Downloading Music/Videos from the net
Top