Giter Club home page Giter Club logo

Comments (4)

AlexAplin avatar AlexAplin commented on September 25, 2024

wss_url = ["site"]["relive"]["webSocketUrl"]
broadcast_id =["site"]["program"]["broadcastId"]

GET wss_url
101 Upgrade

Initialization:

CLIENT: {"type":"watch","body":{"command":"playerversion","params":["leo"]}}
CLIENT: {"type":"watch","body":{"command":"getpermit","requirement":{"broadcastId":broadcast_id,"route":"","stream":{"protocol":"hls","requireNewStream":true,"priorStreamQuality":"abr","isLowLatency":true,"isChasePlay":false},"room":{"isCommentable":true,"protocol":"webSocket"}}}}
SERVER: {"type":"watch","body":{"command":"statistics","params":["66864","41957","0","0"]}}
SERVER: {"type":"watch","body":{"command":"servertime","params":["1562491996809"]}}
SERVER: {"type":"watch","body":{"command":"permit","params":["12100564943432"]}}
CLIENT: {"type":"watch","body":{"command":"getakashic","requirement":{"isChasePlay": false}}}
SERVER: {"type":"watch","body":{"currentStream":{"uri":"https://pb085cb3ae2.dmc.nico/hlslive/ht2_nicolive/nicolive-production-pg12100564943432_87ca7412ec2223150e41e5ed71b9effc1e20b5a246168df9ee14632c4a8237ef/master.m3u8?ht2_nicolive=anonymous-user-0114ad22-44d0-4fc2-b518-4794fffac627.kru1if_pu9mjg_2ssy8uydxz3ja","name":null,"quality":"abr","qualityTypes":["abr","super_high","high","normal","low","super_low"],"mediaServerType":"dmc","mediaServerAuth":null,"streamingProtocol":"hls"},"command":"currentstream"}}

Ping check with server:

SERVER: {"type":"ping","body":{}}
CLIENT: {"type":"pong","body":{}}

Every thirty seconds after first message:

CLIENT: {"type":"watch","body":{"command":"watching","params":[broadcast_id,"-1","0"]}}

from nndownload.

AlexAplin avatar AlexAplin commented on September 25, 2024

Streams seem to be stable when played in an external player and do not seem to change URL. As long as we communicate the watching command and pong back, these should work without any issue.

from nndownload.

AlexAplin avatar AlexAplin commented on September 25, 2024

The client initialization can be reduced to:

{"type":"watch","body":{"command":"getpermit","params":[broadcast_id,"","true","hls",""]}}

playerversion can be ommited.

from nndownload.

AlexAplin avatar AlexAplin commented on September 25, 2024

A fully qualified getpermit is required to get all qualities. The stream stutters in MPC and VLC, even when adjusting buffers. It's stable in mpv/streamlink, so I'm guessing like most HLS/DASH streams it needs an aggressive cache and threading.

from nndownload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.