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

--dump-json missing information for .mp4s from twitch.tv #12383

Closed
jrogozen opened this issue Mar 6, 2017 · 6 comments
Closed

--dump-json missing information for .mp4s from twitch.tv #12383

jrogozen opened this issue Mar 6, 2017 · 6 comments
Labels

Comments

@jrogozen
Copy link

@jrogozen jrogozen commented Mar 6, 2017

Seems like running the --dump-json command doesn't return all information for twitch.tv clips

running

youtube-dl https://clips-media-assets.twitch.tv/24708907632-offset-5632-854x480.mp4 --dump-json

outputs

{"upload_date": "20170306", "protocol": "https", "extractor": "generic", "direct": true, "fulltitle": "24708907632-offset-5632-854x480", "id": "24708907632-offset-5632-854x480", "playlist": null, "title": "24708907632-offset-5632-854x480", "_filename": "24708907632-offset-5632-854x480-24708907632-offset-5632-854x480.mp4", "playlist_index": null, "webpage_url_basename": "24708907632-offset-5632-854x480.mp4", "display_id": "24708907632-offset-5632-854x480", "format": "mp4 - unknown", "requested_subtitles": null, "format_id": "mp4", "url": "https://clips-media-assets.twitch.tv/24708907632-offset-5632-854x480.mp4", "extractor_key": "Generic", "vcodec": null, "http_headers": {"Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept-Language": "en-us,en;q=0.5", "Accept-Encoding": "gzip, deflate", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)"}, "ext": "mp4", "webpage_url": "https://clips-media-assets.twitch.tv/24708907632-offset-5632-854x480.mp4", "formats": [{"protocol": "https", "format": "mp4 - unknown", "url": "https://clips-media-assets.twitch.tv/24708907632-offset-5632-854x480.mp4", "vcodec": null, "http_headers": {"Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept-Language": "en-us,en;q=0.5", "Accept-Encoding": "gzip, deflate", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)"}, "ext": "mp4", "format_id": "mp4"}]}

it is missing the duration info. is this an error in the encoding of twitch's mp4s, or something on the youtube-dl side?

thanks!

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 7, 2017

https://clips-media-assets.twitch.tv/24708907632-offset-5632-854x480.mp4 is a direct link, where is it supposed to get duration from?

@dstftw dstftw closed this Mar 7, 2017
@dstftw dstftw added the invalid label Mar 7, 2017
@jrogozen
Copy link
Author

@jrogozen jrogozen commented Mar 7, 2017

what about something like https://clips.twitch.tv/RoundLitigiousMangetoutKippa ?

{ "display_id": "RoundLitigiousMangetoutKippa", "extractor": "twitch:clips", "protocol": "https", "_filename": "Wow-RoundLitigiousMangetoutKippa.mp4", "creator": "Jobochan", "requested_subtitles": null, "format": "720 - 720p", "height": 720, "uploader": "jobochan", "id": "RoundLitigiousMangetoutKippa", "format_id": "720", "uploader_id": "Jobochan", "playlist": null, "thumbnails": [ { "url": "https://clips-media-assets.twitch.tv/24719028272-offset-18204-preview.jpg", "id": "0" } ], "title": "Wow", "url": "https://clips-media-assets.twitch.tv/24719028272-offset-18204.mp4", "extractor_key": "TwitchClips", "http_headers": { "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept-Language": "en-us,en;q=0.5", "Accept-Encoding": "gzip, deflate", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)" }, "playlist_index": null, "ext": "mp4", "webpage_url": "https://clips.twitch.tv/RoundLitigiousMangetoutKippa", "formats": [ { "protocol": "https", "format": "360 - 360p", "url": "https://clips-media-assets.twitch.tv/24719028272-offset-18204-640x360.mp4", "http_headers": { "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept-Language": "en-us,en;q=0.5", "Accept-Encoding": "gzip, deflate", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)" }, "height": 360, "ext": "mp4", "format_id": "360" }, { "protocol": "https", "format": "480 - 480p", "url": "https://clips-media-assets.twitch.tv/24719028272-offset-18204-854x480.mp4", "http_headers": { "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept-Language": "en-us,en;q=0.5", "Accept-Encoding": "gzip, deflate", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)" }, "height": 480, "ext": "mp4", "format_id": "480" }, { "protocol": "https", "format": "720 - 720p", "url": "https://clips-media-assets.twitch.tv/24719028272-offset-18204.mp4", "http_headers": { "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept-Language": "en-us,en;q=0.5", "Accept-Encoding": "gzip, deflate", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)" }, "height": 720, "ext": "mp4", "format_id": "720" } ], "fulltitle": "Wow", "thumbnail": "https://clips-media-assets.twitch.tv/24719028272-offset-18204-preview.jpg", "webpage_url_basename": "RoundLitigiousMangetoutKippa" }

doesn't include fps or duration information here. sorry if i'm missing something

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 7, 2017

There is no duration or fps information available.

@jrogozen
Copy link
Author

@jrogozen jrogozen commented Mar 7, 2017

Ah, so a limitation of the twitch api? I think I had the assumption that youtube-dl would download a stream of the video file extracted from the url and pass it into ffprobe or something to get info.

But it probably calls w/e 3rd party api to get information based on the url. Sorry!

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 7, 2017

There is no API. It parses a webpage.

@jrogozen
Copy link
Author

@jrogozen jrogozen commented Mar 7, 2017

Oh! Thanks for clearing that up

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
2 participants
You can’t perform that action at this time.