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.19k stars 10.02k forks source link

twitch.tv support only downloads first 30 minutes #614

Closed rmunn closed 9 years ago

rmunn commented 11 years ago

The twitch.tv support (https://github.com/rg3/youtube-dl/pull/592) ends up only downloading the first 30 minutes of the video, because that's all that the twitch.tv server provides through that API. One video where you can see this in action is http://www.twitch.tv/avidyazen/b/352351813 -- note that the twitch.tv player shows a length of 5 hours, 34 minutes and 30 seconds, but downloading via youtube-dl currently downloads only the first 30 minutes of the video.

If you experiment with the twitch.tv player by pausing it and letting it download as much of the video as it can, you'll find that it downloads 30 minutes of the video and then stops downloading; if you then jump to the 29-minute mark, you'll see the video stutter a bit at the 30-minute mark, then resume as the player starts downloading the segment from about 0:30:00 to about 1:00:00.

I don't know how to find the URLs for the other segments of the video, but maybe someone else who sees this issue will have in idea of how to find them.

rmunn commented 11 years ago

The video link I posted in the original issue report has been deleted, but by downloading http://www.twitch.tv/avidyazen/b/354807424 I can confirm that #621 does fix this issue. Each video segment downloaded will only be 30 minutes long, but with #621 applied youtube-dl will download all the segments of the video.

kiowas commented 11 years ago

This was working fine some weeks ago. I tried downloading a video today and only got the first 30 min file. Seems like it broke again.

Earnestly commented 10 years ago

This issue is still present

bisqwit commented 10 years ago

I just upgraded to youtube-dl version 2014.04.13, but I am running into this same problem. I am trying to download this Twitch.tv broacast, about 3 hours long -- http://www.twitch.tv/dabigbooi/c/4067025 -- but despite claims by Youtube-dl of contrary, it only downloads a 30-minute sample from somewhere in the middle. Log & proof below:

$ youtube-dl -t http://www.twitch.tv/dabigbooi/c/4067025 [justin.tv] 4067025: Downloading webpage [justin.tv] 4067025: Downloading chapter information [justin.tv] c4067025: Downloading chapter metadata WARNING: Chapter detected, but we can just download the whole file. Chapter starts at 3:23 and ends at 3:01:29 [download] Destination: Half-Life 20 -41 commentary & explanation stream with quadrazid!-c4067025.flv [download] 100% of 189.20MiB in 03:05

$ mplayer -frames 0 -identify Half-Life\ 20\ -41\ commentary\ &\ explanation\ stream\ with\ quadrazid!-c4067025.flv ID_LENGTH=1801.37

magpie514 commented 10 years ago

I can confirm it fails as well in version 2014.04.21.6 $:~/.local/bin/youtube-dl -cti --no-mtime "http://www.twitch.tv/johnsuitepee/c/2306429" [justin.tv] 2306429: Downloading webpage [justin.tv] 2306429: Downloading chapter information [justin.tv] c2306429: Downloading chapter metadata WARNING: Chapter detected, but we can just download the whole file. Chapter starts at 0 and ends at 2:12:37 [download] Destination: Playing Fava Beans for the DWMegawad club!-c2306429.flv [download] 100% of 96.73MiB in 04:03

Resulting file is only 30 minutes long.

bricewge commented 10 years ago

I have the same issue here also.

tomassedovic commented 10 years ago

@phihag can you reopen this, please? I'm seeing the same issue as well.

As you can see in the chapter warning, the video is way over 30 minutes, but that's all that gets downloaded:

$ youtube-dl http://www.twitch.tv/pibonacci/c/4043233
[justin.tv] 4043233: Downloading webpage
[justin.tv] 4043233: Downloading chapter information
[justin.tv] c4043233: Downloading chapter metadata
WARNING: Chapter detected, but we can just download the whole file. Chapter starts at 2:40:06 and ends at 2:45:22
[download] Destination: Spelunky low% PB 3 -00.519-c4043233.flv
[download] 100% of 281.44MiB in 01:23
HalosGhost commented 10 years ago

Also, streaming from a channel fails immediately::

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['http://www.twitch.tv/captainsparklez', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.07.25.1
[debug] Python version 3.4.1 - Linux-3.15.6-1-ARCH-x86_64-with-arch
[debug] Proxy map: {'https': 'localhost:8118', 'http': 'localhost:8118'}
[justin.tv] captainsparklez: Downloading video info JSON on page 1
ERROR: Unable to download video info JSON 1: HTTP Error 404: NOT FOUND; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
  File "/usr/lib/python3.4/site-packages/youtube_dl/extractor/common.py", line 202, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 1231, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.4/urllib/request.py", line 461, in open
    response = meth(req, response)
  File "/usr/lib/python3.4/urllib/request.py", line 571, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.4/urllib/request.py", line 499, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 433, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 579, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
FoxBJK commented 10 years ago

I'm seeing this issue as well, and here's the example I'm trying to download: http://www.twitch.tv/fatbosstv/c/3851202

Hopefully this can be fixed before Twitch's changes...

texke commented 10 years ago

A a (temp) workaround you can use the '%(id)s' var in the filename (-o option), it won't try to overwrite anything but will make multiple files of the same stream.

jaimeMF commented 9 years ago

In the latest versions it should work fine. For example for http://www.twitch.tv/pibonacci/c/4043233 it downloads the stream in 7 parts. If you still have problems, feel free to open a new issue. Thanks for the report!