Add rotate camera feature to record option

This commit is contained in:
Galindo, Alex 2023-03-06 11:59:17 +01:00
parent 826671c008
commit ead1c36a87

View File

@ -388,7 +388,7 @@ def parse_preset_input(arg: Any, detect_fps: int) -> list[str]:
return PRESETS_INPUT.get(arg, None)
PRESETS_RECORD_OUTPUT = "-f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1"
PRESETS_RECORD_OUTPUT = "-f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 {0} {1}"
PRESETS_RECORD_VIDEO_AUDIO = {
"preset-record-generic": {
"video": "-c:v copy",
@ -430,10 +430,10 @@ def parse_preset_output_record(arg: Any, hw_acc: Any, rotate: int) -> list[str]:
video = preset_record_video_audio["video"]
transpose =_parse_rotation_scale(hw_acc, "record", rotate)
if transpose != "" or not "copy" in video:
if transpose != "":
video = transpose + " -c:v libx264"
return (PRESETS_RECORD_OUTPUT + video + audio).split(" ")
return PRESETS_RECORD_OUTPUT.format(video, audio).split(" ")
PRESETS_RTMP_OUTPUT = {