Darkness4 / fc2-live-dl-go

Automatically download FC2 livestream. Fast and light.
MIT License
9 stars 0 forks source link

Error and bulky, broken video #24

Closed IipeikousBill closed 7 months ago

IipeikousBill commented 7 months ago

Getting this sometimes https://i.gyazo.com/35db5fd6f38b0a76931915b9df23f949.png When it happens the video file is huge and skips. Restarting mid-stream doesn't seem to help. Not a coder so don't expect much from me.

Darkness4 commented 7 months ago

Can confirm. I will work on a fix.

Darkness4 commented 7 months ago

Fix will be pushed shortly.

The bug is caused by FC2 not sending timestamp. Expected:

https://us-west-1-media-worker1075.live.fc2.com/a/stream/v3/48843568/32/data/118606.ts?time=1699894101&hash=4670624c359019cd3a95c84fa0a6690c6c1a7862728e030e5555f49a9416b9d6
https://us-west-1-media-worker1075.live.fc2.com/a/stream/v3/48843568/32/data/118607.ts?time=1699894102&hash=d9007927f368b2ed45be06f712d06603d7acc55582c8c285db1e4efa9b904f7f

Got:

https://us-west-1-media-worker1075.live.fc2.com/a/stream/v3/48843568/32/data/118606.ts
https://us-west-1-media-worker1075.live.fc2.com/a/stream/v3/48843568/32/data/118607.ts

In the past, I put a simple skip (if timestamp not found, timestamp = now) and then looked for the next url to download. However, as fc2 doesn't send a timestamp at all, this doesn't work since it isn't able to find the next url. This causes my HLS downloader to download all the fragments again, which explains the size of the file (since fc2 sends 10 URLs per request, the file size has been multiplied by 10).

Darkness4 commented 7 months ago

Fixed with commit d8f7671e9180a4a2b6bdadc7b49770f2b4ee8cc6, tagged v1.6.2.

Darkness4 commented 7 months ago

Whoops, I forgot to fix some logs. Wait for 1.6.3.