Code Monkey home page Code Monkey logo

Comments (11)

SwineBurglar avatar SwineBurglar commented on August 30, 2024

Bumping for #14! I just found this GUI for youtube-dl. It's wonderful for getting the job done more easily but I am still using youtube-dl in the command line for anything that I want to keep the automatic subtitles for, if it doesn't have English subs I can grab via MacYTDL.

from macytdl.

section83 avatar section83 commented on August 30, 2024

OK, I'll look at #14 for v1.16. After spending so much time bug hunting, it will be good to add something new. Many thanks.

from macytdl.

SwineBurglar avatar SwineBurglar commented on August 30, 2024

Wow! Thank you. That would be great.

from macytdl.

section83 avatar section83 commented on August 30, 2024

Starting my research on #14. I know very little about YouTube's auto generated subtitles. Do you think it should be a separate option ? Does it apply only to Youtube ?

from macytdl.

SwineBurglar avatar SwineBurglar commented on August 30, 2024

I'm not super knowledgeable about the auto-generated subtitles, either, but I do think it should be a separate option in MacYTDL. My reasoning is that it is possible for a given YouTube video to have both author-generated subtitles and auto-generated subtitles, so you might as well make the auto-generated subtitle download a separate option that is not affected by the presence of author-generated subtitles. A lot of times, when I'm grabbing some random video with youtube-dl, I don't actually check if it has author-generated subtitles. I just have my flags set in my config file to --write-sub --sub-lang en --write-auto-sub so it will grab the auto-generated subs in English and if there are author-generated subs, it will also grab those. Since subtitle files are so relatively small, it doesn't hurt anything to grab both.

I haven't ever seen auto-generated subtitles on any other similar sites to YouTube, so I'm not sure if it's exclusive to YouTube, but I would venture to guess YouTube's implementation of that feature is not something standard, so even if other websites have auto-generated subs available, youtube-dl might not be able to interact with them properly. I've run into that issue with the output template options on other websites where youtube-dl couldn't grab the upload date or author name. It seems that youtube-dl is mainly intended for use on YouTube and the support for other sites is more bare-bones.

from macytdl.

section83 avatar section83 commented on August 30, 2024

Yes, I think it'll be best to keep --write-auto-sub a separate option. By the way, when I've tested requesting both kinds of subtitles, YTDL has failed to report the auto-generated subs are available. I've asked the question: ytdl-org/youtube-dl#27306. No answers as yet.

Some people have found --write-auto-sub works on Vimeo even though the YTDL readme says "YouTube only". Anyway, If I have time, I'll put in a warning if the user requests auto generated subs from other than YouTube. That way, they will know it might not work.

Thanks.

from macytdl.

section83 avatar section83 commented on August 30, 2024

It's a bug which has been reported: ytdl-org/youtube-dl#27315. I've added the option to Settings but that's all. I can't test any code until the YTDL developers fix the bug.

from macytdl.

WinkelCode avatar WinkelCode commented on August 30, 2024

MacYTDL really needs re-encoding options, applications with limited playback support (i.e. not VLC or ffmpeg based apps) can't work with certain videos downloaded from YouTube, even if they are remuxed.

Fortunately youtube-dl comes with the options --extract-audio & --audio-format FORMAT (for audio) and --recode-video FORMAT (for video) which, though taking a bit (progress indicator?) do the job and ensure video can be played in QuickTime and embedded in, for instance, PowerPoint.

Edit: Looking at the code, the remux option seems to already do --recode-video? However I had issues with a downloaded video resulting in QuickTime showing an error and playing without audio, manually running the included youtube-dl with bestvideo+bestaudio and --recode-video mp4 resulted in a working file. Interesting... I wonder if the issue lies somewhere else? I also noticed that the reencoding process by running youtube-dl manually took a lot longer. I'll investigate further.

Edit 2: VLC was able to play the "broken" video with sound so it doesn't seem it was corrupted.

from macytdl.

section83 avatar section83 commented on August 30, 2024

Hmmm. Yes, the "remux" setting in MacYTDL does do a --recode-video. Remuxing is done by FFmpeg controlled by youtube-dl. The result can depend on the source file and the format is requested. MacYTDL allows all formats provided by youtube-dl [mp4, mkv, webm, ogg, avi, flv, aac, flac, mp3, m4a, opus, vorbis, wav]. There is also an "audio only" setting.

Now that I look at them, it's odd having the audio formats in the "remux" settings. It does work but needs more thought to make it understandable. The Help file is a tad obtuse on this. If you specify download format as mp4 and then remux to mp3, MacYTDL will automatically add the options needed to convert audio to the desired format. The YTDL command will be like this:

youtube-dl --ignore-errors --newline -f 'bestvideo[ext=mp4]+bestaudio/best[ext=mp4]/best' --extract-audio --audio-format 'mp3' --audio-quality 0 --no-overwrites --verbose -o '%(title)s.%(ext)s' [URL]

But, currently, MacYTDL can't recode both the audio to, e.g., mp3 and the video to e.g., mp4. In fact it will delete the original download if "keep original" is not set. So, I need to rethink how those settings work.

In your testing make sure you have the "verbose" setting on. The resulting output is crucial for diagnosing issues. Can you send me details of the video you had problems with ? At least the URL so I can go through what might have happened.

from macytdl.

section83 avatar section83 commented on August 30, 2024

In v1.16, I have worked on the audio-only and remuxing options. It should be better now. Can now choose the audio format directly and can remux the container of an audio-only download (although, I doubt it will be very useful).

from macytdl.

section83 avatar section83 commented on August 30, 2024

Closing this to clean up. Better list of proposed changes in a new issue.

from macytdl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.