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

Question/SiteRequest: freespeech.org #2234

Closed joeschmoe40 closed 8 years ago

joeschmoe40 commented 10 years ago

I am used to using youtube-dl with the -j option to get the "real" URL, then using VLC to view that "real" URL. This works well with YouTube and other, similar, sites.

I would like to be able to do the same with "freespeech.org".

Observe:

$ youtube-dl.py -j http://freespeech.org WARNING: Falling back on generic information extractor. {"extractor": "generic", "format": "0 - unknown", "uploader": "www.freespeech.org", "format_id": "0", "id": "4C7VcgRKrZA", "stitle": "Free Speech TV", "playlist": null, "title": "Free Speech TV", "url": "http:\/\/www.youtube.com\/v\/4C7VcgRKrZA", "extractor_key": "Generic", "playlist_index": null, "ext": "unknown_video", "webpage_url": "https://www.freespeech.org/", "_filename": "Free Speech TV-4C7VcgRKrZA.unknown_video", "fulltitle": "Free Speech TV", "webpage_url_basename": ""} $ youtube-dl.py --version 2014.01.23.4

Not surprisingly, VLC can't work with the above URL (the one that references youtube.com - which is, obviously, unlikely to be a good URL for freespeech.org).

Please help!

(The point is - I'm surprised it works at all - usually if I give a bad URL to the "-j" option, I get a few screenfuls of error messages, and no useful output).

Can I make a site request for freespeech.org?

jaimeMF commented 10 years ago

I've added support (to https://www.freespeech.org/video/* pages). It was giving a result because we were detecting it as a site powered by jw_player, but the youtube url wasn't being extracted properly.

By the way, if you are only interested in getting the url for playing with vlc, you can use the -g option, which will print only the url.

joeschmoe40 commented 10 years ago

OK, thanks. It looks like it hasn't been pushed out yet, because when I tried to upgrade (just a few minutes ago), i got:

youtube-dl is up-to-date (2014.01.23.4)

Also, re: "-g". Yes, I used to use "-g", but nowadays my script uses a lot of the "-j" variables, so I just always use "-j".

jaimeMF commented 10 years ago

A new version hasn't been released yet, it has only been pushed to the repo.

Sure, if you need more info, using the json is the best option.

joeschmoe40 commented 10 years ago

I have upgraded to 2014.01.27.1, but (AFAICT) freespeech.org still doesn't work. I had been laboring under the belief that the next version pushed out would have support for freespeech.org.

$ youtube-dl.py -j http://freespeech.org WARNING: Falling back on generic information extractor. {"extractor": "generic", "format": "0 - unknown", "uploader": "www.freespeech.org", "format_id": "0", "id": "4C7VcgRKrZA", "stitle": "Free Speech TV", "playlist": null, "title": "Free Speech TV", "url": "http:\/\/www.youtube.com\/v\/4C7VcgRKrZA", "extractor_key": "Generic", "playlist_index": null, "ext": "unknown_video", "webpage_url": "https://www.freespeech.org/", "_filename": "Free Speech TV-4C7VcgRKrZA.unknown_video", "fulltitle": "Free Speech TV", "webpage_url_basename": ""} $

It still generates a youtube.com web page - which can't be right.

jaimeMF commented 10 years ago

So, what you wanted is to see the live stream?. You can find it on livestream http://new.livestream.com/accounts/4434684/events/2677504, but we don't support live streams yet. Please open a new issue for that. In the meantime,, there are programs like https://github.com/chrippa/livestreamer, that should allow you to get the live stream.

joeschmoe40 commented 10 years ago

OK - got it. I must have misunderstood what it meant for this thread to be closed. I thought that "closed" meant that the underlying problem had been fixed (i.e., in this instance, the required functionality added to the program).

Anyway, no worries there.

Re: your alternative suggestions. I can currently get freespeech just fine in a browser (under Windows, of course, not Linux or ARM), but the whole point of the exercise is to avoid a browser (i.e., Flash) interface.

Re: livestreamer. Looks very interesting. This could be exactly what I am looking for. Will look into it when I get around to it. The web page for livestreamer says explicitly that the goal is to be able to view live streams without using (the ugliness that is known as) Flash.

And, finally, yes, it would be nice if youtube-dl did support live streams directly. Someday...

phihag commented 10 years ago

No, you've understood the close reason just fine - closing means the issue has been solved. However, your original request was somewhat imprecise - you actually wanted support for the URL http://freespeech.org/ , and not individual videos such as https://www.freespeech.org/video/obama-romney-campaign-colorado-ahead-debate-0 . @jaimeMF added the latter . However, what youtube-dl could return for the frontpage is a list of videos as well as the livestream itself.

I agree that adding support for livestreams would be a great idea, see #2133.

phihag commented 10 years ago

Reopening for support for the mainpage, as an alias of livestream.

joeschmoe40 commented 10 years ago

[quote] individual videos such as https://www.freespeech.org/video/obama-romney-campaign-colorado-ahead-debate-0 . @jaimeMF added the latter . [/quote]

Note, BTW, that the video you reference above (obama-romney) is, I think, just a redirect to YouTube (the web-page URL that I get from "youtube-dl -j" is: https://www.youtube.com/watch?v=poKsVCZ64uU), so maybe not such a good example/demonstration of a new capability in the program.

P.S. Is there any "right" way to quote on this board. I've used the [quote][/quote] method that works on some other boards, but it doesn't seem to work here.

jaimeMF commented 10 years ago

It's not a redirect, it embeds the youtube video (although it isn't the normal player). We just extract the youtube url and pass it to the Youtube extractor. We don't store the original url, that's why you only see the youtube url in the json output.

To quote, you just need to use:

> Blah

Which displays as

Blah

Github has a help page about markdown.

joeschmoe40 commented 10 years ago

One more thing, and I know I'm getting off-topic for this board, but ...

I tried out "livestreamer" - installed the "Windows Installer" on a Windows box - this is supposed to install everything you need. Couldn't get it to work. Every site I accessed said either "No plugin for ..." or "There are no streams on ...". The included example (given in the help), which uses "twitch.tv" didn't work - it did find the plugin, but didn't find any streams.

In any case, it looks like in order to use it (livestreamer) with "freespeech.org", someone will have to write a dedicated plugin for freespeech. Any chance of that happening?

TRox1972 commented 8 years ago

Are the livestreams hosted on freespeech.org itself, or livestream.com? If it's the latter, which now is supported, should this be closed?

joeschmoe40 commented 8 years ago

I'm not sure.  All I know is that if I load up a browser, and go to "http://www.freespeech.org", it plays the live stream of what they are currently showing. If, using the latest version (Updating to version 2016.05.21.2 ...) of youtube-dl, I get: $ youtube-dl.py http://www.freespeech.org[generic] www.freespeech: Requesting header[redirect] Following redirect to https://www.freespeech.org/[generic] www.freespeech: Requesting headerWARNING: Falling back on generic information extractor.[generic] www.freespeech: Downloading webpage[generic] www.freespeech: Extracting information[generic] playlist: Downloading m3u8 informationERROR: Failed to download m3u8 information: HTTP Error 404: Not Found (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.$

On Sunday, May 22, 2016 9:07 AM, Déstin Reed <notifications@github.com> wrote:

Are the livestreams hosted on freespeech.org itself, or livestream.com? If it's the latter, which now is supported, should this be closed?— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

yan12125 commented 8 years ago

The Livestream embedded video on freespeech.org main page will be correctly detected in the next version.