this post was submitted on 09 Nov 2023
44 points (94.0% liked)
Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ
54476 readers
478 users here now
⚓ Dedicated to the discussion of digital piracy, including ethical problems and legal advancements.
Rules • Full Version
1. Posts must be related to the discussion of digital piracy
2. Don't request invites, trade, sell, or self-promote
3. Don't request or link to specific pirated titles, including DMs
4. Don't submit low-quality posts, be entitled, or harass others
Loot, Pillage, & Plunder
📜 c/Piracy Wiki (Community Edition):
💰 Please help cover server costs.
Ko-fi | Liberapay |
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Okay, Tartube can definitely handle what you want with a few additional flags! Here's the mediainfo for the output file after doing a test run on this MrBeast video (note that the audio track is incorrectly marked as English but is indeed Japanese, and that S_TEXT is how SRT appears in an MKV file):
mediainfo
I did this all on Windows 10 in Windows Sandbox with a fresh Tartube install to make sure I didn't have some lurking non-default setting causing unexplained behavior. Here's what to do to get the same results, along with a screen recording of the same process with some rough edits (don't be scared off by the long instructions--it's mostly me just explaining what the options do, and it should only take about five to ten minutes!):
Grab the 64-bit Windows installer here
Go through the install process leaving everything as default and installing
yt-dlp
and FFmpeg when promptedGo through the tutorial just to get a sense of how things are laid out (it's a lot to take in so don't expect to remember everything, and I'm going to guide you through the exact steps do don't worry)
Add your channel by first copying the /videos URL (e.g. https://youtube.com/@MrBeast/videos), clicking the Add channel icon (second from the left in the toolbar), and entering the channel name (this will be the name of the folder that videos are stored in). If the URL isn't automatically grabbed, paste it into the second box.
Right-click the channel in the left-hand menu and select Downloads -> Apply download options
Make sure Create new download options is selected and click OK
(Optional) Give the options a sensible name, e.g. "Japanese Audio with embedded English SRT"
Paste these options into the Additional download options box:
Explanation of the options:
--convert-subs
is pretty self explanatory--it will convert the YouTube VTT subs to SRT.--format
: the format selection is a hierarchy delineated by the/
. First, it tries to download the best video with the best audio in Japanese (bv*+ba[language=ja]
). If Japanese audio isn't present, it tries English audio (bv*+ba[language=en]
). If neither are present (which can also happen if the uploader failed to mark the language correctly), it grabs whatever the default audio track is. If all else fails, it grabs the best combined format (this should realistically never happen on YouTube). If you dislike any of those fallback options and/or would prefer that the download simply fail, feel free to delete any/all of them along with the preceding/
, although I recommend at least leavingbv*+ba
. For your use case,--format bv*+ba[language=ja]
is the bare minimum which will fail if there isn't an audio track explicitly labeled as Japanese.)--compat-options no-keep-subs
is necessary to make sure the subtitles are deleted after merging them into the MKV, since the options we will be setting through the GUI include both--write-subs
and--embed-subs
, and the default behavior in this scenario is to both embed the subs and write them to an external file. If you prefer to keep the external SRT file, simply remove this line.(Optional) Click the Files tab at the top and customize the filename format. Personally, I'm partial to
%(upload_date)s %(title)s-%(id)s.%(ext)s
so that I can naturally sort things by upload date and easily go between URLs and videos (since YouTube URLs are just
https://youtube.com/watch?v=[id]
), but if you're happy with the default title-only you can leave this be.Click the Formats tab at the top. Set the drop-down for If merge is required after post-processing, output this format: to mkv. It will give you a warning that you need to also add it above, but as far as I can tell this is neither true (works fine without it) nor possible (mkv isn't even listed there). If you do prefer specific video/audio formats or want a specific/maximum resolution, let me know and I can change the
format
option to accommodate that preference, since unfortunately this tab doesn't account for multiple audio tracks.Click the Subtitles tab at the top. Ensure that Download subtitle file for these languages: is selected and that English [en] is listed (if your default Windows language is English I think it'll already be there, but if not, add it from the list on the left). Note that this will not grab the automatically-generated subtitles from YouTube, but it sounds like you don't need these for your specific situation.
Click the More options sub-tab. Under Preferred subtitle formats write
srt/best
(I honestly don't think this will affect YouTube since all subs seem to be VTT, but it can't hurt). More importantly, check the box for During post-processing, merge subtitles file with video.Click OK in the lower-right to save the download options. You're done with the setup!
If you want to download the entire channel in this way, right-click the channel in the left-hand menu and click Download channel. You can monitor the download progress in the Progress tab and see the raw
yt-dlp
command line output in the Output tab. If you only want certain videos, instead choose Check channel. This will grab all the metadata for the channel's videos, displaying them as a grid of thumbnails, and then you can select them through the GUI and download the specific ones you want. It also might be a good idea to do this if you want to test the options on one video to make sure you're getting the result you want before going all-in on downloading the channel.Looking over the
yt-dlp
output as a sanity-check, I can confirm it does the following things:Writes
en.vtt
subtitles (English subtitles in the default YouTube format)Selects the best video format (1080p VP9)
Selects the audio format
251-1
(which is the best Japanese audio on this particular video)Converts subtitles to SRT
Merges all three tracks into MKV
Deletes external SRT
which I think is all the functionality you requested! Let me know if you have any further questions and I'll do my best to answer them.
I've tested the process in a single & multi-language channel and a single video & it worked for perfectly for all.
Several questions I have:
1 - When I installed Tartube, my Antivirus told me the
gslangValidator.exe
file was infected byWin64: Evo-gen [Trj]
and quarantined it. Any idea why?2 - How do I get rid of all the other files like jpeg, txt, json etc. files or are they supposed to be there.
3 - Supposing I wanted a 360p resolution downloaded, what would have to be changed in the format options?
I'm really amazed at this and hope to learn more about Tartube. Thank you very much for your time in putting all this together & I look forward to further correspondence!
Great, I'm so glad to hear that! Tartube can be a little intimidating with it's sprawling menus and sub-menus, but when it comes down to it most of the core functionality is pretty accessible once you know where to look and can ignore all the hyper-specific options for power users.
1. No idea, to be honest. In the environment I tested this in (Windows 10 Sandbox) Windows Defender didn't complain, and I've never had an issue with my actual install either. In fact, I just checked my installation folders on my PC and didn't even find that executable (maybe it's only used during installation?) although I do have it on my system for a different program. I only found one Google hit from 5 years ago on the
glslang
Github itself, and the user seemed to think it was a false positive for what it's worth.2. They are supposed to be there by default (they store metadata) but you can set up Tartube to put them in separate folders if you want to just have a nice clean folder with only videos or just not write them in the first place if you don't want them. I believe the metadata is copied into Tartube's database, so deleting them shouldn't change anything (they're mostly useful for archival purposes or if you want to do some processing with external tools), but Tartube references the thumbnail image files for display in the GUI so removing them will remove the thumbnail from the GUI like so:
This is pretty straightforward to configure, thankfully:
3. (hosted externally due to Lemmy sanitization bug causing less-than symbols to be HTML escaped)
edit: accidentally left out a line in the externally hosted markdown
I agree that file is probably just a false positive. I deleted it from quarantine and it didn't affect the program at all.
You are absolutely THE BEST!!! I appreciate all your hard work so much. This saves me sooo much time and is so helpful! I cannot thank you enough.
Here is an alternative Piped link(s):
this MrBeast video
https://piped.video/@MrBeast/videos
Piped is a privacy-respecting open-source alternative frontend to YouTube.
I'm open-source; check me out at GitHub.