chrippa / livestreamer

Command-line utility that extracts streams from various services and pipes them into a video player of choice. No longer maintained, use streamlink or youtube-dl instead.
http://livestreamer.io/
BSD 2-Clause "Simplified" License
3.88k stars 582 forks source link

live.nicovideo.jp: support #163

Open ketburai opened 11 years ago

ketburai commented 11 years ago

back to terrorize people. (how do i label an issue, or does the project staff handle that?)

curious as to what live.nicovideo uses, and if livestreamer could easily implement it? though i get the feeling the traffic-based throttling is going to hurt something.

chrippa commented 11 years ago

back to terrorize people. (how do i label an issue, or does the project staff handle that?)

For some reason Github only allow admins to set labels. :-/

curious as to what live.nicovideo uses, and if livestreamer could easily implement it? though i get the feeling the traffic-based throttling is going to hurt something.

Niconico support cannot easily be added right now. This is because while the streams use RTMP, they require the client to send a special command after connection is established. Since the current RTMPStream in Livestreamer uses rtmpdump it's not possible to support it without using a patched version of rtmpdump.

I do not wish to add plugins that requires special patches right now, since it will easily get really messy if you need a bunch of patched versions of rtmpdump (the exception is the KSV patch set since it's fairly well known).

However, in the future (probably 2.0) I wish to add a RTMPStream implementation based on python-librtmp, which gives us more control of the RTMP stream. Adding support for Niconico at that point should be trivial.

athoik commented 11 years ago

@ketburai, why don't you ask from K-S-V to add support for live.nicovideo.jp into rtmpdump?

You can ask (@K-S-V) here http://stream-recorder.com/forum/customized-rtmpdump-binaries-patch-file-t16103.html?s=c4513e70250caadac6c3c9c260cd3db3

ketburai commented 11 years ago

@athoik: ooh, i should probably bring it up there, yeah. i'd gladly wait until a livestreamer 2.0, though. thanks for the program @chrippa, wish i could help with /something/.

athoik commented 10 years ago

Hi,

Here is a working plugin for Livestreamer: https://gist.github.com/athoik/9918293

Test URL: http://live.nicovideo.jp/watch/lv173117558?ref=top&zroute=index

chrippa commented 10 years ago

@athoik Are you able to use this with any streams not available on the front page? I believe those still require authentication + a special RTMP command.

athoik commented 10 years ago

I did not try other streams :/ only main screen.

So special RTMP probably required, unless they switched to different provider.

McDoogal commented 10 years ago

@athoik Hello, any chance you could write a simple tutorial as if I were a 5-year old on how to get this up and running in Linux (Lubuntu)?.

Many thanks for plugin.

isamu99 commented 10 years ago

athoik commented on Apr 1

Hi,

Here is a working plugin for Livestreamer: https://gist.github.com/athoik/9918293

Test URL: http://live.nicovideo.jp/watch/lv173117558?ref=top&zroute=index


Hello athoik,

Can you please tell me where to place this py file? Which directory within livestreamer?

isamu99 commented 10 years ago

OK it seems that livestreamer has found the plugin but I'm getting an "unknown error" :(

satsuki-sama commented 10 years ago

Some information for anyone who would like to tackle this project at some point:

satsuki-sama commented 10 years ago

It might also be worth looking at XBMC_nico, a Japanese plugin for XBMC written in Python. It plays normal videos out of the box. It also claims to play live video but that feature appears to require custom compile of rtmpdump (included). I'm not sure if it can play timeshifted live video. Official live broadcasts may rely on a different rtmpdump and paid broadcasts may have difficulties.

Alternatively, the best approach may be to try to reverse-engineer the iOS or Android API, which may ignore rtmpdump altogether.

isamu99 commented 10 years ago

Thanks for the information satsuki-sama. Please try these suggestions and let us know if any of them work. :)

EraYaN commented 9 years ago

Also Lookup namaroku and kakoroku. They are in japanese and getting them can be tricky (it's in a community on nico nico) but they appear to work pretty well.

omnigear commented 9 years ago

@athoik https://gist.github.com/athoik/9918293 any update on this?

nico-lab commented 9 years ago

If you access niconico and watch videos, lives and so on, you must login to niconico. Niconico has permmited 5 sessions, looking at this page(https://account.nicovideo.jp/my/sessions), if you login to niconico.

Nicolive has 3 providers and live or timeshifted video. There are 6 type of videos,

Custom version of rtmpdump has needed 3 type of videos, channel live video, user live video, and user timeshifted video. How to know live providers, looking here at getplayerstatus API(http://watch.live.nicovideo.jp/api/getplayerstatus?v=lv[id]).

Custom version of rtmpdump has distributed at http://nht.r.ribbon.to (not incluted source code). If you want to get source code at https://github.com/taonico/rtmpdump-nico-live , but not supported librtmp, only supported rtmpdump. Dump to nicolive has many type of commands, I writed this page (http://nico-lab.net/nicolive_rtmpdump_commands/) in Japanese.

nico-lab commented 9 years ago

I found another repository. https://github.com/meronpan3419/rtmpdump_nicolive