mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 10:45:21 +03:00
Optimize timelapse
This commit is contained in:
parent
7a66ffc35b
commit
a70ebaa707
@ -15,7 +15,7 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
class PlaybackFactorEnum(str, Enum):
|
class PlaybackFactorEnum(str, Enum):
|
||||||
realtime = "realtime"
|
realtime = "realtime"
|
||||||
timelapse_5x = "timelapse_5x"
|
timelapse_25x = "timelapse_25x"
|
||||||
|
|
||||||
|
|
||||||
class RecordingExporter(threading.Thread):
|
class RecordingExporter(threading.Thread):
|
||||||
@ -82,7 +82,7 @@ class RecordingExporter(threading.Thread):
|
|||||||
|
|
||||||
if self.playback_factor == PlaybackFactorEnum.realtime:
|
if self.playback_factor == PlaybackFactorEnum.realtime:
|
||||||
ffmpeg_cmd.extend(["-c", "copy", file_name])
|
ffmpeg_cmd.extend(["-c", "copy", file_name])
|
||||||
elif self.playback_factor == PlaybackFactorEnum.timelapse_5x:
|
elif self.playback_factor == PlaybackFactorEnum.timelapse_25x:
|
||||||
ffmpeg_cmd.extend(["-vf", "setpts=0.25*PTS", "-r", "5", "-an", file_name])
|
ffmpeg_cmd.extend(["-vf", "setpts=0.25*PTS", "-r", "5", "-an", file_name])
|
||||||
|
|
||||||
p = sp.run(
|
p = sp.run(
|
||||||
@ -96,6 +96,6 @@ class RecordingExporter(threading.Thread):
|
|||||||
logger.error(p.stderr)
|
logger.error(p.stderr)
|
||||||
return
|
return
|
||||||
|
|
||||||
logger.error(f"Updating finalized export {file_name}")
|
logger.debug(f"Updating finalized export {file_name}")
|
||||||
os.rename(file_name, final_file_name)
|
os.rename(file_name, final_file_name)
|
||||||
logger.error(f"Finished exporting {file_name}")
|
logger.debug(f"Finished exporting {file_name}")
|
||||||
|
|||||||
@ -63,7 +63,7 @@ export default function Export() {
|
|||||||
>
|
>
|
||||||
<option value="select">Select A Playback Factor</option>
|
<option value="select">Select A Playback Factor</option>
|
||||||
<option value="realtime">Realtime</option>
|
<option value="realtime">Realtime</option>
|
||||||
<option value="timelapse_5x">Timelapse</option>
|
<option value="timelapse_25x">Timelapse</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user