playlet icon indicating copy to clipboard operation
playlet copied to clipboard

Videos longer than 5 hours cut off at that mark (HLS VOD playlist too large)

Open Horsearms opened this issue 1 year ago • 6 comments

At 2:30, the sound cuts out, video stops playing at around 2:31. Throws error code -5, seems to be a buffer issue. 1733418305370727989379030124102

Horsearms avatar Dec 05 '24 17:12 Horsearms

Thanks, what are the steps to reproduce the issue? (let it run for two hours? skip to two hours? which videos? etc)

iBicha avatar Dec 05 '24 19:12 iBicha

Any video that is over two and a half hours it does this for. If I let it run to the two and a half hour mark, first it loses sound, then eventually (after a minute or so) it gives the error message.

If I try to skip past two and a half hours, it automatically gives me that error message.

On the buffer, it also says some number right around 2 and a half hours, even if the video is much longer. For example, this video is 3 hours and 16 minutes, and only shows 2 hr 27 min remaining,

And this one is 6 hours and 20 minutes, but only shows 2 hours and 26 minutes remaining.

On Thu, Dec 5, 2024, 2:26 PM Brahim Hadriche @.***> wrote:

Thanks, what are the steps to reproduce the issue? (let it run for two hours? skip to two hours? which videos? etc)

— Reply to this email directly, view it on GitHub https://github.com/iBicha/playlet/issues/500#issuecomment-2521225036, or unsubscribe https://github.com/notifications/unsubscribe-auth/BNPMR2JHJMLZDJEWPO37K432ECSHHAVCNFSM6AAAAABTC5OHKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRRGIZDKMBTGY . You are receiving this because you authored the thread.Message ID: @.***>

Horsearms avatar Dec 05 '24 20:12 Horsearms

Thanks for confirming, it looks like Invidious (DASH) has no issues with very long videos, but playlet backend (HLS) reports wrong length and stops working when the wrong length (about two and a half hour) is reached.

iBicha avatar Dec 11 '24 13:12 iBicha

The good news is: I understand why this happens: for a very long video (say, 10 hours) the playlist file is very large. It is segmented into small chunks of about 6 seconds. Each chunk is its own video file, and its own url. This results in a file of 16k lines and close to 10 MB. Roku can't seem to handle that. The bad news is: I don't think there's a possible workaround, unless Roku make a firmware update to raise this limitation. When I try to play the same HLS file in another player (say VLC) it plays fine.

The only way to fix this in the future is to switch to DASH for the playlet backend, which will take a while.

Right now, the only workaround is to use Invidious for really long videos. (I understand that most public instances struggle to play videos right now, but if you have your own private instance, long videos work fine)

iBicha avatar Dec 12 '24 15:12 iBicha

Update: I've found a way to improve things, which reduces the playlist size. After testing, an 11 hours video that was being detected as a 2h20m, is now detected as 4h57m. https://github.com/iBicha/playlet/commit/357019d74b96656e3ac44f00d6aa49e2c08b67ad The fix is in the Canary release, and will be part of the next release.

iBicha avatar Dec 13 '24 00:12 iBicha

Thank you so much for all of your help! I appreciate it!

On Thu, Dec 12, 2024, 7:38 PM Brahim Hadriche @.***> wrote:

Update: I've found a way to improve things, which reduces the playlist size. After testing, an 11 hours video that was being detected as a 2h20m, is now detected as 4h57m. 357019d https://github.com/iBicha/playlet/commit/357019d74b96656e3ac44f00d6aa49e2c08b67ad The fix is in the Canary release, and will be part of the next release.

— Reply to this email directly, view it on GitHub https://github.com/iBicha/playlet/issues/500#issuecomment-2540288986, or unsubscribe https://github.com/notifications/unsubscribe-auth/BNPMR2IJTT56C3TUIU4XO2L2FIUBTAVCNFSM6AAAAABTC5OHKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBQGI4DQOJYGY . You are receiving this because you authored the thread.Message ID: @.***>

Horsearms avatar Dec 13 '24 13:12 Horsearms

Small update: you can play longer videos, if cast from web app https://github.com/iBicha/playlet/issues/618#issuecomment-2941630965

Small update: When I was testing, I noticed that YouTube didn't like that I was refreshing my session frequently. With that, I've made two changes:

  • Session data only refreshes after 7 days - let's see if this helps

  • When casting from the Playlet web app, there's now a new button: "Play on DEVICE_NAME (ytjs)". When this option is used, YouTube.js and BgUtils are used to generate a PoToken and play the video in a more "authentic" way, and might reduce the amount of errors.

These changes are currently in Canary release https://github.com/iBicha/playlet/releases/tag/canary if you can test these changes, that would be helpful. Thanks

iBicha avatar Jun 04 '25 21:06 iBicha

I'm not seeing the new button "Play on DEVICE_NAME (ytjs)" button on either the YouTube app on my iPad or the Playlet Dev-Canary app (v0.40.0). 🤔

Is there a setting I forgot to hit? Otherwise, this specific video (7h 05m 24s) still kinda stops working correctly after the 4 hour, 40-some minute mark.

JCollins2048 avatar Jun 05 '25 16:06 JCollins2048

The button is on Playlet web app

Image

iBicha avatar Jun 05 '25 16:06 iBicha

Fixed in 0.40.12

iBicha avatar Sep 03 '25 01:09 iBicha