getid <LOGIN>
% npm run getid hasanabi
207813352listsubs
% npm run listsubs
1. 06b9c5ff-5e34-4bfe-abfc-b544e4db8c65 | PaymoneyWubby | stream.online | enabled
2. 3715ebf0-6c0a-4f00-834d-69822f084f8b | PaymoneyWubby | stream.offline | enabled
3. c16ca04e-be30-4341-8054-3d0fe9064756 | rezonmain | stream.online | enabled
4. 115dc981-0f25-43fd-a484-b4cfd2dad266 | rezonmain | stream.offline | enableddeletesub <SUBSCRIPTION_ID>
% npm run deletesub 115dc981-0f25-43fd-a484-b4cfd2dad266
Subscription with id 115dc981-0f25-43fd-a484-b4cfd2dad266 deletedcreatesub <SUBSCRIPTION_TYPE> <USER_ID>
% npm run createsub stream.online 207813352
% npm run listsubs
[...]
4. e3852373-c37a-4a3f-9e2b-8b0a151f7d7d | HasanAbi | stream.online | webhook_callback_verification_pendingm3u8url <LOGIN>
% npm run m3u8url h3h3productions
https://usher.ttvnw.net/api/channel/hls/h3h3productions.m3u8?client_id=kim[...]restream <LOGIN>
$ npm run restream h3h3productions
[hls @ 0x7f33f456a600]
Skip ('#EXT-X-TWITCH-INFO:NODE="video-edge-ee538e.iad05",MANIFEST-[...]- Personal OAuth token can be read from the
auth-tokencookie saved on storage from https://twitch.tv - Personal OAuth token is sent on the first GQL POST request the client makes (to fetch the playback access token) in the
Authorizationheader prefixed byOAuth - This token seems to expire, if this is the case, the mentioned request will return 401 for an invalid token, removing the token (writing
Authorization: undefinedin the headers) should work, but stream won't be authorized
-
Create project on google's developer console
-
Enable the youtube data api for the project
-
Head on to credentials and create a new OAuth2 credential for a web application
-
Add the redirect URLs
-
Complete the OAuth concent screen setup
-
Add testing user, should be the owner of the channel you'll be live streaming to
-
IMPORTANT: google will only send the refresh token during auth if is the first time the user has authorized your application, to make sure you save the refresh token to the cache, revoke access to the autovod application in you google account settings
-
Log the last output of ffmpeg to see wtf is going on