ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.36k stars 10.04k forks source link

Funimation subtitles not parsed? #22027

Open jpm0nki opened 5 years ago

jpm0nki commented 5 years ago

Checklist

Verbose log


PASTE VERBOSE LOG HERE

youtube-dl --embed-subs --all-subs --cookies cookies.txt https://www.funimation.com/shows/arifureta-from-commonplace-to-worlds-strongest/the-monster-of-the-abyss/?qid=
[Funimation] the-monster-of-the-abyss: Downloading webpage
[Funimation] 917148: Downloading JSON metadata
[Funimation] 917148: Downloading m3u8 information
[download] Destination: Arifureta - From Commonplace to World's Strongest - The Monster of the Abyss-917148.mp4
ffmpeg version N-92906-g54109b1d14 Copyright (c) 2000-2019 the FFmpeg developers
...
Opening 'crypto+https://d132fumi6di1wa.cloudfront.net/FunimationStoreFront/2022003/Japanese/2022003_Japanese_47ee7a5a-d89d-e911-82a8-dd291e252010_Layer10_00000.ts' for reading
Input #0, hls,applehttp, from 'https://d132fumi6di1wa.cloudfront.net/FunimationStoreFront/2022003/Japanese/2022003_Japanese_47ee7a5a-d89d-e911-82a8-dd291e252010_Layer10.m3u8':
  Duration: 00:23:42.00, start: 1.440756, bitrate: 0 kb/s
  Program 0
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Metadata:
      variant_bitrate : 0
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 0
Output #0, mp4, to 'file:Arifureta - From Commonplace to World's Strongest - The Monster of the Abyss-917148.mp4.part':
  Metadata:
    encoder         : Lavf58.25.100
    Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 90k tbn, 90k tbc
    Metadata:
      variant_bitrate : 0
    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 0
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
...
[ffmpeg] Downloaded 1433645138 bytes
[download] 100% of 1.34GiB in 02:21
[ffmpeg] There aren't any subtitles to embed

## Description

<!--
Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

Using cookies mode of auth seems to work great and the resulting file is working great in players, but it doesn't seem to recognize or get any subtitles.  I'm not sure if this is expected or not as i couldn't find anything suggesting it wasn't supported on this site and the content exists when using the native funimation players.  Am I missing a required command line argument (similar works for other sites and gets subtitles)?
darkhelmet2016 commented 5 years ago

they use 3 different types of subs .dfxp, vtt and .srt. The url for the subs think has changed and they use different cloud front urls for simulcast and uncut versions of episodes. But you have to also specify if you want the Dub of Sub of each ep too for this show as it has a simulcast dub also. If your output is mp4 only srt subs will mux in to it or you will have to convert the vtt or dfxp to srt for the output. Dubs are hard subbed and do not contain soft subs unless they provide cc subs for a series,

https://www.funimation.com/shows/arifureta-from-commonplace-to-worlds-strongest/the-monster-of-the-abyss/?qid=undefined&lang=english

https://www.funimation.com/shows/arifureta-from-commonplace-to-worlds-strongest/the-monster-of-the-abyss/?qid=undefined&lang=japanese

michealespinola commented 4 years ago

This is still an issue in youtube-dl version 2020.03.24.

jpm0nki commented 4 years ago

yes, still get the same error. I think as stated in an earlier reply that the subs are vtt and not recognized. Not sure if it's just ffmpeg that doesn't recognize them or youtube-dl (or both). At the end of downloading I get: [ffmpeg] There aren't any subtitles to embed the manual workaround is to search for the vtt file in the page and download it, then convert it to srt, then embed it with the video file.

michealespinola commented 4 years ago

Yes, I see the same. As an example URL:

https://www.funimation.com/shows/flcl/fooly-cooly/?qid=6c667a279b481fe6

Subtitles (English subs for Japanese audio) for this video as I see it in the stream:

https://d132fumi6di1wa.cloudfront.net/FunimationStoreFront/1329365/Japanese/1329365_Japanese_4860e455-5f5b-e711-8175-020165574d09.vtt

That's the extent of what I can make out. I can't easily figure out where subtitles are scraped in the code.