Chocobozzz / PeerTube

ActivityPub-federated video streaming platform using P2P directly in your web browser
https://joinpeertube.org/
GNU Affero General Public License v3.0
13.1k stars 1.51k forks source link

Add a subtitles API #1727

Closed roipoussiere closed 5 years ago

roipoussiere commented 5 years ago

A subtitles API, allowing users to import a subtitle for a given video via the PeerTube API, could have a significant impact in the PeerTube network accessibility, and some interesting projects could emerge.

For instance, with a such API we could imagine a web service dedicated to video captioning, on which PeerTube users subscribe, that:

  1. listens for new videos via RSS feed;
  2. automatically downloads any video posted by authenticated users;
  3. generates draft subtitles with Mozilla's DeepSpeech among its CommonVoice datasets;
  4. publishes them on the web platform;
  5. lets the community peer-reviews new subtitles;
  6. eventually deal with a Weblate server API to allow the community to translate subtitles in other languages;
  7. send peer-reviewed subtitles to the PeerTube instance via the subtitles API, with the user token.

Here is a suggestion for a subtitles API specification:

Booteille commented 5 years ago

This could become a must-have once the plugin engine is done.

I guess a lot of developpers could rely on this API to offer different tools around this feature.

Chocobozzz commented 5 years ago

We have a subtitle API: https://github.com/Chocobozzz/PeerTube/blob/develop/server/controllers/api/videos/captions.ts#L22

But it's not documented yet.

Chocobozzz commented 5 years ago

Doc added in https://github.com/Chocobozzz/PeerTube/commit/67ae04a5e7e20554a30b22a02792045505ee2d35