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

[googledrive] Add support for subtitles #13619

Closed
nyuszika7h opened this issue Jul 9, 2017 · 8 comments
Closed

[googledrive] Add support for subtitles #13619

nyuszika7h opened this issue Jul 9, 2017 · 8 comments

Comments

@nyuszika7h
Copy link
Contributor

@nyuszika7h nyuszika7h commented Jul 9, 2017

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.07.09. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2017.07.09

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--ignore-config', '--write-sub', 'https://drive.google.com/file/d/0B0Pcx5-LUToEblNxcXRPWmtmS00/view', '-o', 'Ha felhő lehetnék E20.%(ext)s']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.07.09
[debug] Python version 3.6.1+ - Linux-4.4.0-43-Microsoft-x86_64-with-Ubuntu-17.04-zesty
[debug] exe versions: ffmpeg 3.3.2-1, ffprobe 3.3.2-1, rtmpdump 2.4
[debug] Proxy map: {}
[GoogleDrive] 0B0Pcx5-LUToEblNxcXRPWmtmS00: Downloading webpage
[debug] Invoking downloader on 'https://r4---sn-c0q7lne6.c.docs.google.com/videoplayback?id=851eb6773c9a6ff5&itag=18&source=webdrive&requiressl=yes&mm=30&mn=sn-c0q7lne6&ms=nxu&mv=u&pl=21&sc=yes&ttl=transient&ei=nXZiWbLkKonFqgWjz4boDw&driveid=0B0Pcx5-LUToEblNxcXRPWmtmS00&mime=video/mp4&lmt=1499099742696479&mt=1499625042&ip=84.2.121.30&ipbits=0&expire=1499639517&cp=QVJOQUdfWFVPSFhNOkxoNkR2Tk5NTUhw&sparams=ip%2Cipbits%2Cexpire%2Cid%2Citag%2Csource%2Crequiressl%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Csc%2Cttl%2Cei%2Cdriveid%2Cmime%2Clmt%2Ccp&signature=70F7ADDD5EF99714F7B845E73866DAEF28648FAB.13576CE76EE0231268989BFFEFB65B82469414A2&key=ck2&app=texmex'
[download] Ha felhő lehetnék E20.mp4 has already been downloaded
[download] 100% of 330.39MiB

Description of your issue, suggested solution and other information

This video has Hungarian subtitles, but youtube-dl doesn't recognize them.

Subtitle URL: https://drive.google.com/timedtext?authuser=0&id=0B0Pcx5-LUToEblNxcXRPWmtmS00&vid=851eb6773c9a6ff5&hl=en-US&v=0B0Pcx5-LUToEblNxcXRPWmtmS00&type=track&lang=hu&name&kind&fmt=1

@dstftw dstftw changed the title Google Drive subtitles not recognized [googledrive] Add support for subtitles Jul 9, 2017
@parmjitv
Copy link
Contributor

@parmjitv parmjitv commented Jul 10, 2017

Hi @nyuszika7h,

As @dstftw has noted, the extractor for Google Drive videos should be updated to include any available captions. I will give this one a shot if no one has any objections.

How did you deduce the URL for the Hungarian subtitles? I was not able to find a reference for this anywhere in the page source for this video.

Cheers,

Parmjit V.

@nyuszika7h
Copy link
Contributor Author

@nyuszika7h nyuszika7h commented Jul 10, 2017

I just loaded the page in Firefox and used the network request logger. There's a request to some captions.js before that, which may be helpful. I'll also take a closer look at it.

@parmjitv
Copy link
Contributor

@parmjitv parmjitv commented Jul 10, 2017

@nyuszika7h - Cool. I will look into that further as well. Basically I am looking for a generic URL that can be used to extract the caption data for a given video, Hungarian or otherwise. If such a URL exists we should be able to use it in the extractor to fetch the subtitle info.

@siddht1 - Thank you! Did you have to convert the XML file manually?

I believe youtube-dl supports both SRT and VTT file formats for captions - please correct me if I am mistaken?

@parmjitv
Copy link
Contributor

@parmjitv parmjitv commented Jul 12, 2017

@siddht1 - OK. I have figured out the URL schema for the captions and should have a new PR ready in the next day or so.

I am going to compose the subtitles as SRT files, using the example file you have provided as a template. There are some utilities already available in the codebase to help us out - if this does not work we can look at using the VTT format as you suggest instead.

@nyuszika7h
Copy link
Contributor Author

@nyuszika7h nyuszika7h commented Jul 12, 2017

youtube-dl already supports TTML (XML) subtitles, there is no need for additional conversion. Perhaps xml could be added to the file extension list, though.

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Jul 12, 2017

google already serve vtt and ttml subtitles, there is no need for any kind of conversion(for now).
automatic generated subtitles are also available.

@parmjitv
Copy link
Contributor

@parmjitv parmjitv commented Jul 12, 2017

Thanks for the info everyone! I will use the caption URLs already made available to us and see what happens.

What happened to @siddht1 - I no longer see his contributions in this thread?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.