i know i said tests would be next but pythons mocking is kicking my ass and i've had these changes running for a while without issues so might aswell:
changelog:
* did major refactoring
script is now seperated into following files:
* arguments.py - argparse and config file parse logic
* constants.py - global and not so global constants
* coordination.py - stream recording state and it's control logic.
* environment.py - environment validation and setup logic
* post_process.py - post processing logic. converting merging and temporary file managing
* recording.py - flv recording logic
* utils.py - generic utils that don't fit anywhere else
* tt_lives_recorder.py stream detection/api invoking main loop logic
this should make the code easier to navigate if you want to look at it (which you should since i'm a stranger posting unverified code on the internet)
* added support for dual streams, will now record streams that someone you follow has joined
the end result might be you recording some random dude doing nothing for 5hours with your follower having joined for 5 seconds at the start
no flags to disable it for now
* added a filename mask for quality
* added a seperate log line for tiktok api errors and also a min wait so you can't spam it too much
also -mf with .mp4 files has been working pretty well for me even for very laggy streams
if anybody is still using this let me know how it's working for you and what options you're using
> 11899
looking at the PR I have a suspicion it will not handle stream drops and will not work for all streams in the first place
if that's not the case let me know