Quote:
Originally Posted by horacio
It's all clear to me. I tried to fix the script but obviously is a more difficult case.
So the script currently captures 'ts' segments of about 14 seconds. These segments could be linked later but this is not a solution.
In addition I noticed that there are even three different resolutions in the same segment!
I put the ffmpeg in the script and the recording is done OK but this script has a very long code and it all matches it's almost impossible mission.
I just finished my script (cbffr.py) which recording in a very similar way as chat.py and can be a good substitute.
Cbffr.py starts with cba.bat and can record a specific model 24/7 if it has free disk space 
Recording is performed in flv format at the highest available resolution. It will not be a problem to make a 'ts' variant recording if it is necessary. If more than one 24/7 models must be recorded, more copies of cba.bat scripts should be started.
Download link for all files in zip: https://codeload.github.com/horacio9...ous/zip/master
|
I have played with the code & I think the problem is in "r1 = self.session.get(m)"
because the second count "c" now imediately counts to "5" & calls "self.ok = False"
if r1.ok:
c = 0
d1 = self.decode_m3u8(r1)
for i in d1:
self.pool.spawn(self.get_and_decode, i)
else:
c += 1
if c >= 5 :
self.ok = False
I can change 'self.ok = False' to 'self.ok = True' and everything works as used to, which is ok as long as there is no error or cam reset. But it does give demo of how it should run while all is ok with the stream, although it wont close the stream and reset. Or increase 5 to 1000 for similar effect. But this is only a hack /work around in the crudest sense.