Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
TakanoTaiga committed Dec 8, 2024
1 parent 61aac8c commit d5c0009
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app-x.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
with gr.Column():
input_videos = gr.File(label="Upload Video", file_count="multiple", file_types=[".mp4", ".mov", ".mpg"])
input_project_name = gr.Text(label="Project Name")

upload_button = gr.Button("Start Upload")
with gr.Column():
output_status = gr.Text(label="Status")
Expand Down
2 changes: 1 addition & 1 deletion horus/project_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ def make_project(project_name: str, project_host_dir="/workspace/horus_inference
yaml.dump(project_data, f, default_flow_style=False, allow_unicode=True)

print(f"プロジェクトファイルが作成されました: {project_description_file_path}")
return project_dir
return project_dir
3 changes: 2 additions & 1 deletion horus/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ def video_to_images(video_path: str):

return output_dir


def natural_sort(file_list):
def alphanum_key(key):
filename = os.path.basename(key)
return [int(text) if text.isdigit() else text for text in re.split(r'(\d+)', filename)]
return sorted(file_list, key=alphanum_key)
return sorted(file_list, key=alphanum_key)
5 changes: 2 additions & 3 deletions horus/video_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def make_video_list_file(video_files: list[str]):
video_path = p.resolve()

f.write(f"file '{video_path}'\n")

return file_name


Expand All @@ -31,7 +31,7 @@ def run_ffmpeg_concat_av1(input_list: str, output_file: str, preset="fast"):
"-b:v", "500k",
output_file
]

try:
result = subprocess.run(command, check=True, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print("ffmpegコマンドの実行に成功しました。")
Expand Down Expand Up @@ -76,4 +76,3 @@ def video_processing_ui(video_files: list[str], project_name: str):
run_ffmpeg_timelaps_av1(merge_video_path, timelaps_video_path, 15 * 60)

return video_files

0 comments on commit d5c0009

Please sign in to comment.