Skip to content

Issues when stream or connection are not stable #158

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

Closed
roberto-sartori-gl opened this issue Nov 28, 2024 · 8 comments
Closed

Issues when stream or connection are not stable #158

roberto-sartori-gl opened this issue Nov 28, 2024 · 8 comments
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@roberto-sartori-gl
Copy link

So, sometimes the stream, the internet connection, tiktok itself or the streamer internet connection are not stable. In this situation, the recorded file is very small as the recording ends at the first connectivity issue - or if automatic recording is used, a lot of small files are generated.

I think this is the case even when the streamer 'pauses' the live (but I couldn't confirm this).

Various recording tools (even fork of this one!) 'solved' the problem concatenating all the files after the live actually ends. Is there any plan to include something like this?

There are also various ffmpeg options that could be used (reconnect_streamed, reconnect_delay_max) which may be useful.

@Michele0303
Copy link
Owner

Hi Roberto, to solve the problem, I was thinking of exploring some options in ffmpeg, like reconnect_streamed, etc.

@Michele0303 Michele0303 added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels Dec 26, 2024
@Michele0303
Copy link
Owner

Fixed in: https://github.com/Michele0303/tiktok-live-recorder/releases/tag/5.5

@roberto-sartori-gl
Copy link
Author

@Michele0303 Thanks, I'll try it!

@roberto-sartori-gl
Copy link
Author

@Michele0303 I don't know if it is related to this, but the issue appeared after this change so. I was recording a ~2hours live, and it was working pretty well: I was recording the same live with the previous release and with the new one, and the previous one was creating multiple files while the new one was not.

At a certain point though, the new release failed with the error:
[!] ('Connection broken: IncompleteRead(0 bytes read, 2 more expected)', IncompleteRead(0 bytes read, 2 more expected))

After this, the file was damaged: it can probably be repaired because the video can be played but it does not have a lenght (VLC, media player classic), so I cannot go back and forward in the video. This is not a big issue for now, I wanted to report the above error though.

@Michele0303
Copy link
Owner

Are you using version 5.7?

@roberto-sartori-gl
Copy link
Author

Are you using version 5.7?

I was using 5.5 because 5.7 was not out when I tried that :)
I'm trying now 5.7, I'll let you know if the issue happens again!

@roberto-sartori-gl
Copy link
Author

roberto-sartori-gl commented Dec 28, 2024

@Michele0303 with 5.7, I saw some of these errors:
[!] 2024-12-28 18:55:35 - [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2578)

I have a damaged file for each of these lines with that same 'modified date' as the log (e.g. 18:55:35) (like yesterday, the file is there, playable, but it does not report a lenght so I can't move forward-backward with any player).

Looking at journalctl, I never had this line before today so versions < 5.4 probably were cutting the file at this point. I was using the options 'ffmpeg' and 'auto-covert' (or whatever it was) so maybe I did not saw the files damaged because they were converted on the fly. These options do not exist anymore so the resulting file is damaged.

To add a note, manually running 'ffmpeg -i damaged_file.flv -c copy restored_file.mp4' generates a working file.

edit: I'm going to try 5.8 that may fix the problem, as it catches more exceptions now.

@Michele0303
Copy link
Owner

If that ffmpeg command solves the problem, then version 5.8 will work correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants