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

[livestream] Native hls downloader fails on last fragment #10165

Closed
FiloSottile opened this issue Jul 25, 2016 · 0 comments
Closed

[livestream] Native hls downloader fails on last fragment #10165

FiloSottile opened this issue Jul 25, 2016 · 0 comments

Comments

@FiloSottile
Copy link
Collaborator

@FiloSottile FiloSottile commented Jul 25, 2016

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.07.24. 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 2016.07.24

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

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 ```):

$ python3 ~/code/youtube-dl/youtube_dl/__main__.py -v http://livestream.com/internetsociety2/hopeconf/videos/130824603
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://livestream.com/internetsociety2/hopeconf/videos/130824603']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.07.24
[debug] Git HEAD: 0a14778
[debug] Python version 3.5.2 - Darwin-15.6.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg git-2016-03-22-65cff81, ffprobe git-2016-03-22-65cff81, rtmpdump 2.4
[debug] Proxy map: {}
[livestream] 130824603: Downloading JSON metadata
[livestream] 130824603: Downloading SMIL file
[livestream] 130824603: Downloading m3u8 information
[livestream] 130824603: Downloading f4m manifest
[debug] Invoking downloader on 'http://vod.livestream.com/events/00000000005904ab/7a648f9f-0c52-4580-9f24-790fae670bbc_4000.m3u8?token=0_57e65107_f6ab5beb37ca66e336f6f79c27b91cfd03387249&start=27240&end=32475'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 871
[download] Destination: Hackers Got Talent-130824603.mp4
[download]  99.9% of ~2.53GiB at Unknown speed ETA Unknown ETAERROR: giving up after 10 retries
  File "/Users/filippo/code/youtube-dl/youtube_dl/__main__.py", line 19, in <module>
    youtube_dl.main()
  File "/Users/filippo/code/youtube-dl/youtube_dl/__init__.py", line 422, in main
    _real_main(argv)
  File "/Users/filippo/code/youtube-dl/youtube_dl/__init__.py", line 412, in _real_main
    retcode = ydl.download(all_urls)
  File "/Users/filippo/code/youtube-dl/youtube_dl/YoutubeDL.py", line 1775, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/Users/filippo/code/youtube-dl/youtube_dl/YoutubeDL.py", line 693, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/Users/filippo/code/youtube-dl/youtube_dl/YoutubeDL.py", line 739, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/Users/filippo/code/youtube-dl/youtube_dl/YoutubeDL.py", line 1421, in process_video_result
    self.process_info(new_info)
  File "/Users/filippo/code/youtube-dl/youtube_dl/YoutubeDL.py", line 1683, in process_info
    success = dl(filename, info_dict)
  File "/Users/filippo/code/youtube-dl/youtube_dl/YoutubeDL.py", line 1625, in dl
    return fd.download(name, info)
  File "/Users/filippo/code/youtube-dl/youtube_dl/downloader/common.py", line 350, in download
    return self.real_download(filename, info_dict)
  File "/Users/filippo/code/youtube-dl/youtube_dl/downloader/hls.py", line 98, in real_download
    success = ctx['dl'].download(frag_filename, {'url': frag_url})
  File "/Users/filippo/code/youtube-dl/youtube_dl/downloader/common.py", line 350, in download
    return self.real_download(filename, info_dict)
  File "/Users/filippo/code/youtube-dl/youtube_dl/downloader/http.py", line 128, in real_download
    self.report_error('giving up after %s retries' % retries)
  File "/Users/filippo/code/youtube-dl/youtube_dl/downloader/common.py", line 161, in report_error
    self.ydl.report_error(*args, **kargs)
  File "/Users/filippo/code/youtube-dl/youtube_dl/YoutubeDL.py", line 556, in report_error
    self.trouble(error_message, tb)
  File "/Users/filippo/code/youtube-dl/youtube_dl/YoutubeDL.py", line 518, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())

Description of your issue, suggested solution and other information

More than one livestream video seems to fail on the last fragment.

Patching hlsnative to always use ffmpeg results in a successful download instead, although with this log lines

[http @ 0x7f84abf00640] HTTP error 500 Internal Server Error bitrate=4020.1kbits/s speed=31.5x
[hls,applehttp @ 0x7f84ac008000] Failed to open segment of playlist 0

Also reported at #8794 (comment).

@dstftw dstftw mentioned this issue Aug 26, 2016
2 of 2 tasks complete
@dstftw dstftw closed this in 25afc2a Sep 3, 2016
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
1 participant
You can’t perform that action at this time.