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

[request] Add option to prefer HTTP over RTMP (and vice versa) for supported sites. #2262

Closed
PinkPandaKatie opened this issue Jan 28, 2014 · 3 comments
Labels

Comments

@PinkPandaKatie
Copy link

@PinkPandaKatie PinkPandaKatie commented Jan 28, 2014

Some sites, like LiveLeak, support both HTTP and RTMP streaming for some videos. Since rtmpdump is kind of flaky, it would be nice to be able to select HTTP.

The LiveLeak extractor currently just chooses the first file it sees, without giving the user the option. Here is a temporary patch which just forces LiveLeak to look for HTTP first:

diff --git a/youtube_dl/extractor/liveleak.py b/youtube_dl/extractor/liveleak.py
index 5ae57a7..2e4010b 100644
--- a/youtube_dl/extractor/liveleak.py
+++ b/youtube_dl/extractor/liveleak.py
@@ -30,7 +30,7 @@ class LiveLeakIE(InfoExtractor):

     webpage = self._download_webpage(url, video_id)
  •    video_url = self._search_regex(r'file: "(.*?)",',
    
  •    video_url = self._search_regex([r'file: "(http://[^"]+\.mp4[^"]*)"', r'file: "(.*?)",'],
         webpage, u'video URL')
    
     video_title = self._og_search_title(webpage).replace('LiveLeak.com -', '').strip()
    

    (

@phihag
Copy link
Contributor

@phihag phihag commented Jan 28, 2014

Can you name an example URL that would be improved by this patch? For our test video http://www.liveleak.com/view?i=757_1364311680 I only get the HTTP download. In any case, the proper way is to extract all URLs and return them, and let the youtube-dl format handling code figure out which format/URL to pick.

@PinkPandaKatie
Copy link
Author

@PinkPandaKatie PinkPandaKatie commented Jan 28, 2014

This is the one I was trying to to download: http://www.liveleak.com/view?i=f93_1390833151

@phihag phihag closed this in 975fa54 Jan 30, 2014
@phihag
Copy link
Contributor

@phihag phihag commented Jan 30, 2014

Thank you, with that URL it's easy to test. This issue has been fixed in youtube-dl 2014.01.30 and newer (type youtube-dl -U to update).

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.