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

Exception at 100% downloaded. #12593

Closed
wilx opened this issue Mar 28, 2017 · 1 comment
Closed

Exception at 100% downloaded. #12593

wilx opened this issue Mar 28, 2017 · 1 comment
Labels

Comments

@wilx
Copy link

@wilx wilx commented Mar 28, 2017

  • I've verified and I assure that I'm running youtube-dl 2017.03.26
  • 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
$ youtube-dl -f dash-main-1002-1502       -v  --user-agent 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0' --add-header 'Origin:http://www.ceskatelevize.cz/' --referer 'http://www.ceskatelevize.cz/ivysilani/11042149014-spravedlnost/415233100011003' 'http://www.ceskatelevize.cz/ivysilani/11042149014-spravedlnost/415233100011003'              
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-f', u'dash-main-1002-1502', u'-v', u'--user-agent', u'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0', u'--add-header', u'Origin:http://www.ceskatelevize.cz/', u'--referer', u'http://www.ceskatelevize.cz/ivysilani/11042149014-spravedlnost/415233100011003', u'http://www.ceskatelevize.cz/ivysilani/11042149014-spravedlnost/415233100011003']
[debug] Adding header from command line option Origin:http://www.ceskatelevize.cz/
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.03.26
[debug] Python version 2.7.12+ - Linux-4.8.0-41-lowlatency-x86_64-with-Ubuntu-16.10-yakkety
[debug] exe versions: avconv 3.0.7-0ubuntu0.16.10.1, avprobe 3.0.7-0ubuntu0.16.10.1, ffmpeg 3.0.7-0ubuntu0.16.10.1, ffprobe 3.0.7-0ubuntu0.16.10.1, rtmpdump 2.4
[debug] Proxy map: {}
[CeskaTelevize] 415233100011003: Downloading webpage
[CeskaTelevize] 415233100011003: Downloading JSON metadata
[CeskaTelevize] 415233100011003: Downloading JSON metadata
[CeskaTelevize] 415233100011003: Downloading MPD manifest
[CeskaTelevize] 415233100011003: Downloading MPD manifest
[CeskaTelevize] 415233100011003: Downloading JSON metadata
[CeskaTelevize] 415233100011003: Downloading JSON metadata
[CeskaTelevize] 415233100011003: Downloading m3u8 information
[CeskaTelevize] 415233100011003: Downloading m3u8 information
[download] Downloading playlist: Spravedlnost
[CeskaTelevize] playlist Spravedlnost: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[debug] Invoking downloader on u'http://80.188.78.200:80/aa/0a0909ef8a0570e6bdf2a17306953c4a/1490732951120/c93794363db2664f8ef6748d79f804c5/dna-61924494877270492-pc/'
[dashsegments] Total fragments: 2332
[download] Destination: Spravedlnost-61924494877270492.m4a
[download] 100.0% of ~73.26MiB at  1.27MiB/s ETA 00:00ERROR: giving up after 10 retries
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 61, in real_download
    data = self.ydl.urlopen(request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2094, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 500: Internal server error

Here is the DASH manifest file that it is usuing:

<MPD type="static" xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" minBufferTime="PT2.000S" mediaPresentationDuration="PT4662.000S">
<BaseURL>http://80.188.78.212:80/aa/b4d0d43d0e96df156d8e6a0308a3f63f/1490730055044/085f38c78eae7b2f44fb6583612ae159/dna-61924494877270492-pc/</BaseURL>
<Location>http://80.188.78.212:80/aa/b4d0d43d0e96df156d8e6a0308a3f63f/1490730055044/085f38c78eae7b2f44fb6583612ae159/dna-61924494877270492-pc/mpd</Location>
<Period start="PT0S" id="1" duration="PT4662.000S">
<AdaptationSet startWithSAP="1" segmentAlignment="true" id="1001" mimeType="video/mp4" >
<SegmentTemplate timescale="90000" media="$RepresentationID$/$Number%06d$.m4s" initialization="$RepresentationID$/IS.mp4" startNumber="0">
<SegmentTimeline>
<S t="0" d="180000" r="2330"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation id="1001-1502" codecs="avc1.4d4015" width="512" height="288" sar="1:1" bandwidth="372000"/>
<Representation id="1001-1503" codecs="avc1.4d401e" width="720" height="410" sar="1:1" bandwidth="904000"/>
<Representation id="1001-1504" codecs="avc1.4d401f" width="1024" height="576" sar="1:1" bandwidth="1920000"/>
<Representation id="1001-1505" codecs="avc1.4d401f" width="1280" height="720" sar="1:1" bandwidth="3456000"/>
<Representation id="1001-1506" codecs="avc1.4d4028" width="1920" height="1084" sar="1:1" bandwidth="6016000"/>
</AdaptationSet>
<AdaptationSet startWithSAP="1" segmentAlignment="true" id="1002" mimeType="audio/mp4" >
<SegmentTemplate timescale="90000" media="$RepresentationID$/$Number%06d$.m4s" initialization="$RepresentationID$/IS.mp4" startNumber="0">
<SegmentTimeline>
<S t="0" d="180000" r="2330"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation id="1002-1502" codecs="mp4a.40.5" audioSamplingRate="48000" bandwidth="128000"/>
</AdaptationSet>
</Period>
<UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-iso:2014" value="http://80.188.78.212:80/get-utc-timestamp"/>
</MPD>

Seeing the r="2330" in the MPD, I wonder why is the tool also saying [dashsegments] Total fragments: 2332? Is it crashing because it is somehow miscounting the segments and trying to download more files than there are?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 28, 2017

Seeing the r="2330" in the MPD, I wonder why is the tool also saying [dashsegments] Total fragments: 2332?

Because r is zero based repeat count thus 2330 repeats means segment + 2330 repeats = 2331 segments. Plus one initialization segment. Read the spec.

Is it crashing because it is somehow miscounting the segments and trying to download more files than there are?

Wrong. It crashes because CeskaTelevize either serves invalid DASH manifest or does not serve all declared fragments.

Use --skip-unavailable-fragments.

@dstftw dstftw closed this Mar 28, 2017
@dstftw dstftw added the invalid label Mar 28, 2017
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.