Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Add "does not contain" comparison filter to exclude hard-subtitled formats #18600
Comments
|
Here is a verbose log from running youtube-dl -F on an example URL. youtube-dl -v -F https://vrv.co/watch/GRQW9GW7R/That-Time-I-Got-Reincarnated-as-a-Slime:The-Storm-Dragon-Veldora |
|
In the meantime, I wrote a small bash script as a workaround. When called with a VRV URL as its argument, it will query VRV for all available formats, remove all formats including the string "hardsub", then pipe the best remaining format to youtube_dl. Hopefully someone with the same issue finds this useful.
|
|
Why? |
|
That does not work. 'youtube-dl --sub-lang enUS --write-sub --embed-subs $URL' still pulls the same format as simply 'youtube-dl $URL', which has hardsubs. Please try it yourself with the example URL. |
|
Oh sorry, VRV is not available in my country. But I think it works just like Crunchyroll. In fact |
|
I just told you that it does not work. youtube-dl by default selects whichever format has the best quality. The hardsubbed formats on VRV usually have a slightly higher bitrate than the original version, so they are picked first. |
|
Please try for yourself. This is the Crunchyroll URL: https://
It will download the file RAW. No hardsub. I don't know about VRV because it's not available in my country. Just try the command and you'll see. |
|
Ok, I tried for myself with a VPN and you're completely right! maybe something as |
|
Please read the original post; I explained why that will not work. |
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like this:[x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2018.12.17. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue
Description of your issue, suggested solution and other information
I'm using youtube-dl to download videos from the Crunchyroll channel of vrv.co. I'm trying to download the best available quality that does not include hardsubs, but I can't see a way to do that using the format_id field comparison filters. VRV has many formats available for each resolution of each video: there are several for the original video, then several for each of 10 or so languages (with hardcoded subtitles). The naming scheme for their format_ids is like this:
Original video with no hardsubs: hls-audio-ja-JP-6095-0
Video with US English hardsubs: hls-audio-ja-JP-hardsub-en-US-2906-0
Every format includes hls-audio-ja-JP, so I can't use -f [format_id*=hls-audio-ja-JP] because it will operate the same way as using no -f switch at all. The digits after the string are unpredictable as they're based on the format's bitrate, so they can't be used for filtering either.
Is there any way to use a "does not contain" comparison, e.g. "format_id!*=hardsub"? If not, I request that this feature be added.
Alternatively, I believe a regular expression would work. ^((?!hardsub).)*$ matches only the desired formats. I can't figure out how to actually pass it in as an argument to format_id though.