teacat / chaturbate-dvr

😎 Chaturbate DVR - auto records the stream when it goes online!
MIT License
142 stars 18 forks source link

Error: Video Stuttering when Recording #57

Closed BlahBlah5309 closed 4 months ago

BlahBlah5309 commented 5 months ago

I know it's not a playback issue because I can watch other .ts videos just fine, on the same and different video players, on the same and different devices. could it be a bandwidth thing? I've tinkered with other chaturbate DVR things and I haven't had this issue.

YamiOdymel commented 5 months ago

The program downloads video segments and combine into one large .ts file, this might happen if there was network lagging, and some segments were lost.

I used to fixed it by waiting for the next segment to be fetched unless timed out, can't think of how it still happened 🤔

BlahBlah5309 commented 5 months ago

I see. will this occur if the computer's resources are too occupied while recording? sometimes I do other stuff while the recorder works in the background.

YamiOdymel commented 5 months ago

No, it's not related to computer resources.

wandersons13 commented 5 months ago

I thought this was something normal, isn't it?

I have 400mbps speed, and all recordings with the program are like this. Recordings that should be 1:30 hours end up being 1:35 hours due to errors, and when watching the video, it freezes a lot, and even the audio glitches, repeating parts like a broken record.

To be honest, I haven't used the program for over a week because many of my recordings are torture to watch. I only visited the page today to see if there was an update for the program.

YamiOdymel commented 5 months ago

oh no 💀 i don't have the issue with long video, this is a bit hard to reproduce and debug

SamirPRO1 commented 5 months ago

Yeah I have that problem too but it isn´t too noticeable, but for example I tried recording a room at 720 and none of its segments were lost, but at the same time I was recording other room in 480p and some segments were lost, so idk whats happening, also I was whatching the 480p room at 480p in my browser and everything looked smooth

YamiOdymel commented 5 months ago

image

Chaturbate DVR fetches the segment list every second, I'm guessing that Chaturbate DVR was fetching the segment list at the exact 'half-second' when Chaturbate was updating its list, and the offset led to discrepancies in the final video result.

I will seek for the solution, but I've been really busy lately, you will receive the issued closed email once it got fixed 😭

fhb302 commented 5 months ago

I recorded a 4k video, but it also appear this problem, it usually stuck and repeat some clips. I recently switch to another program. At the same time, I hope it can add the support of .mkv and h265, it can save more space (30G vs 6G)

YamiOdymel commented 5 months ago

@fhb302 Chaturbate DVR only combines the segments and it doesn't do encode. The program you used supports .mkv and h265?

wandersons13 commented 4 months ago

If you're interested in seeing what it's like, I added a video with no changes to this 7z. All my videos are like this, some very bad, others not so much, this one in particular is relatively good. link

I understand that it is difficult to replicate, but it should at least help you understand what is happening.

YamiOdymel commented 4 months ago

@wandersons13 Thanks for that, I can see frames were dropped/loss with PotPlayer

(also I edited your comment to make sure you won't get banned for that, lmao

BlahBlah5309 commented 4 months ago

I recorded a 4k video, but it also appear this problem, it usually stuck and repeat some clips. I recently switch to another program. At the same time, I hope it can add the support of .mkv and h265, it can save more space (30G vs 6G)

what program is that?

SamirPRO1 commented 4 months ago

I realized this issue can be fixed by pausing the recording and resuming it, perhaps you could implement a code that detects these errors: [2024-05-05 02:51:06] [WARN] segment #5297 not found in buffer, skipped and when there are like more than 2 or 3 in a minute it "restarts" the recording, just like you would do manually

YamiOdymel commented 4 months ago

@SamirPRO1 hmmm- interesting, though "not found in buffer" should only happens when you were in an unstable internet environment. Can I confirm that you are not using any VPN and internet runs smoothly?

Also I'm checking the source code of following tool, it doesn't seems to have any stutter issue, i will see how to intergrate https://github.com/canhlinh/hlsdl

YamiOdymel commented 4 months ago

I kinda have a clue about why the stutter is happening...

chaturbate-dvr has multiple fetchers that retrieve video segments in parallel, but they share the same data (variable). This makes it prone to being overridden by another fetcher, resulting in both fetchers fetching the same segment.

Should be fixed in 3 days, finally- I guess. 🥺


Related source code snippet: (BUG: v.URI is shared between fetchers)

https://github.com/teacat/chaturbate-dvr/blob/acb1dff0cc553a0af077166aab5e2e574802d1db/chaturbate/channel_internal.go#L290-L300

YamiOdymel commented 4 months ago

Fixed in v1.0.5, report again if it still occurred alot

image