Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YouTube annotations support #6531

Closed
paulguy opened this issue Aug 11, 2015 · 14 comments
Closed

YouTube annotations support #6531

paulguy opened this issue Aug 11, 2015 · 14 comments

Comments

@paulguy
Copy link

paulguy commented Aug 11, 2015

I was wondering how possible it'd be to integrate youtube annotations support in to youtube-dl. I know it would be a big undertaking but I have done a good bit of the work. I don't really know how to integrate it with youtube-dl myself and it has some problems that maybe someone more experienced at python or programming or youtube or whatever else might be able to get stuff going and get it in to youtube-dl.

Here's my code: https://github.com/paulguy/minitools/blob/master/ytanno2ass.py

The README in that repository gives a bit more information on the limitations and problems with it.

@yan12125
Copy link
Collaborator

I've tried ytanno2ass.py against https://www.youtube.com/watch?v=C5zzVemi3m4, and it gives the following error:

$ python2 ytanno2ass.py 
Traceback (most recent call last):
  File "ytanno2ass.py", line 337, in <module>
    annos = XMLElementToAnnotationsList(root, 1920, 1080)
  File "ytanno2ass.py", line 268, in XMLElementToAnnotationsList
    raise Exception("Unsupported type")
Exception: Unsupported type

The developer instructions may be helpful if you're going to work on this feature. Note that we require all codes compatible with python 2.6, 2.7, 3.2, 3.4.

@paulguy
Copy link
Author

paulguy commented Aug 12, 2015

I worked on it a bit more and fixed that and a few other unrelated bugs, though text wrapping is still totally broken. I didn't add support for those missing annotation types since they involve images and the ASS renderer has no way of inserting raster graphics that I know of. I don't plan to work on maintaining this full-time, sorry. It was just a fun little project for me and figured maybe someone more experienced could integrate it once the implementation was more or less done..
EDIT: On the other hand, I don't imagine it could ever be integrated with its reliance on Tkinter.

@yan12125
Copy link
Collaborator

Would you like to release ytanno2ass.py into public domain? This allows others to work on your codes and integrate into youtube-dl without legal issues. Note you should be the original author of those codes to claim public domain release.

Tkinter is not a big issue as it's a python builtin module.

@paulguy
Copy link
Author

paulguy commented Aug 13, 2015

Well, I'd need to rewrite the word wrapping function, I guess. How would one go about releasing code public domain?
Also the issue with Tkinter is not so much that it's built in or not but the fact that it needs to be able to create a window before it can query anything font related.

@yan12125
Copy link
Collaborator

How would one go about releasing code public domain?

A common approach is to add some comments in the file. Here's an example: pyelftools

@paulguy
Copy link
Author

paulguy commented Aug 13, 2015

Rewrote the word wrap function so all the code is written by me and made it public domain.

@TRox1972
Copy link
Contributor

TRox1972 commented Jun 1, 2016

As of now, isn't annotations supported? Should this be closed?

@paulguy
Copy link
Author

paulguy commented Jun 1, 2016

It supports converting subtitles to SRT and can write out the annotations XML, but it as far as I can tell, looking over the command line options, it can't output annotations in a way a media player can use them.

@brandongalbraith
Copy link

brandongalbraith commented Nov 27, 2018

YouTube will delete existing video annotations on January 15, 2019. This would imply Youtube annotation support can be deprecated after that date.

@ealgase
Copy link
Contributor

ealgase commented Jan 24, 2019

YouTube will delete existing video annotations on January 15, 2019. This would imply Youtube annotation support can be deprecated after that date.

Invidious may decide to implement annotations and serve backed up annotations themselves.

@omarroth
Copy link

omarroth commented Feb 11, 2019

See iv-org/invidious#303 and the announcement here. There's currently a temporary API for serving up what's been archived until everything has been uploaded to archive.org.

This endpoint now returns an empty response for videos that used to have legacy annotations.

@omarroth
Copy link

See also #19069. Pulling annotations from a different source is considered (understandably) out-of-scope for this project.

@glmdgrielson
Copy link

Oh hey, my PR!

@upintheairsheep
Copy link

Close this. It’s a removed feature.

@dirkf dirkf closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants