-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
plugins.tiktok: rewrite plugin, fix live, add VODs #6381
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
plugins.tiktok: rewrite plugin, fix live, add VODs #6381
Conversation
@drehtisch |
@bastimeyer Seems to be working fine. Worked for 2 out of 3 lives i tried. Wasn't different before the change, not understanding what is different between the lives that work and the ones that don't but that isn't the point. Some other feedback, about the pull-request-feedback documentation. I had to run Thank you very much for your fix. |
What is that supposed to mean? I am looking for feedback with actual data (which you btw also avoided in #6380), so the plugin can be fully fixed. The current implementation on |
When the version in master still worked before it broke, some lives worked and others didn't. As none of the lives i used this with were online, where this usually worked fine until yesterday. I now tested it with random lives from the live feed. Where 2 worked and 1 didn't. If you want i can repeat the test, possible also with more lives and then send you the names with which it worked and with which it didn't. I don't know if they will still be online when you try to reproduce my test though. |
streamlink https://www.tiktok.com/@hofzeitprojekt/live best --player-external-http --player-external-http-port 12345 --loglevel=debug This does currently not work. |
While this does work, and it is not apparent to me why this works and the other one doesn't. |
Something i just found out, there are lives that are not accessible without being logged in, and this might be the reason why it doesn't work. |
9026a54
to
6b9aca2
Compare
Thanks for the follow-up data. Streams that require a login for some reason still have a success response type, but don't include the curl 'https://www.tiktok.com/api-live/user/room?aid=1988&sourceType=54&uniqueId=hofzeitprojekt' \
-s \
-H 'accept: */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'referer: https://www.tiktok.com/@hofzeitproject/live' \
-H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36' \
| jq {
"data": {
"user": {
"avatarLarger": "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-avt-0068-euttp/4076a1904d416c0589b481a2759cce1e~c5_1080x1080.webp?lk3s=a5d48078&nonce=5132&refresh_token=8ca1a5762aad8fc0d0ca22d027a0ef5b&x-expires=1736262000&x-signature=sYGceSXal7zLfYUh1xnHyGJqX9g%3D&shp=a5d48078&shcp=fdd36af4",
"avatarMedium": "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-avt-0068-euttp/4076a1904d416c0589b481a2759cce1e~c5_720x720.webp?lk3s=a5d48078&nonce=39010&refresh_token=6de48f196168b53e57d1413d269018f7&x-expires=1736262000&x-signature=i5QrL4QKTxNAiw5uCBR4vu8lSd8%3D&shp=a5d48078&shcp=fdd36af4",
"avatarThumb": "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-avt-0068-euttp/4076a1904d416c0589b481a2759cce1e~c5_100x100.webp?lk3s=a5d48078&nonce=75820&refresh_token=3397dd97d99a5dca42dd376a39e1a68b&x-expires=1736262000&x-signature=1GQE2zOUZxoRJUBHDQ9Iz4TBtiQ%3D&shp=a5d48078&shcp=fdd36af4",
"id": "7049376587855037445",
"nickname": "Hofzeit Projekt",
"secUid": "MS4wLjABAAAASkhNIwWSfT0VqvSzBELgKKTQMFAiU6dMH-D-iGUukquhPKk4L1l8VIpruUYmG61w",
"secret": false,
"uniqueId": "hofzeitprojekt",
"verified": false,
"roomId": "7456412520824310550",
"signature": "https://linktr.ee/hofzeitprojekt",
"status": 2,
"followStatus": 0
},
"stats": {
"followingCount": 2255,
"followerCount": 20648
},
"liveRoom": {
"coverUrl": "https://p16-sign-useast2a.tiktokcdn.com/tos-useast2a-avt-0068-euttp/4076a1904d416c0589b481a2759cce1e~c5_720x720.webp?lk3s=a5d48078&nonce=36871&refresh_token=6d065495b8669eb65412978b7b9ad24f&x-expires=1736262000&x-signature=i5QrL4QKTxNAiw5uCBR4vu8lSd8%3D&shp=a5d48078&shcp=fdd36af4",
"squareCoverImg": "",
"title": "",
"startTime": 1736081407,
"status": 2,
"paidEvent": {
"event_id": 0,
"paid_type": 0
},
"liveSubOnly": 0,
"liveRoomMode": 0,
"gameTagId": 0,
"liveRoomStats": {
"userCount": 1187
}
}
},
"message": "",
"extra": {
"id": "202501051559012BF397F177959BD16759"
},
"statusCode": 0
} The plugin now handles this correctly and shows the inaccessible error message:
|
Btw, if someone wants support for authentication, then they'll have to submit a pull request with the necessary changes. I am not interested in this myself at all, or really anything with tiktok/douyin/bytedance etc... Merging now... |
Thank you. |
Fixes #6380
This fixes live streams and adds support for VODs. The stream type has not been changed and it's still using HTTPStream instead of HLSStream (idc). The "origin" quality is now considered best.
Random live stream
Random offline stream
Invalid channel
Live stream metadata
Random video
Invalid video
Video metadata