路径跨平台兼容优化 - 修改相对路径,兼容Windows/Linux/Mac
This commit is contained in:
@@ -146,7 +146,7 @@ class VideoComposer:
|
||||
style=style if isinstance(style, str) else "subtitle",
|
||||
custom_style={
|
||||
**(custom_style or {}),
|
||||
"font_name": "/System/Library/Fonts/PingFang.ttc",
|
||||
"font_name": config.DEFAULT_FONT,
|
||||
},
|
||||
cache=False
|
||||
)
|
||||
@@ -156,7 +156,7 @@ class VideoComposer:
|
||||
text=text,
|
||||
style=style if isinstance(style, str) else "subtitle",
|
||||
custom_style={
|
||||
"font_name": "/System/Library/Fonts/PingFang.ttc",
|
||||
"font_name": config.DEFAULT_FONT,
|
||||
},
|
||||
cache=False
|
||||
)
|
||||
@@ -662,7 +662,7 @@ def quick_compose(
|
||||
|
||||
def example_hairclip_video():
|
||||
"""示例:发夹商品视频合成"""
|
||||
素材目录 = Path("/Volumes/Tony/video-flow/素材/发夹/合成图拆分镜")
|
||||
素材目录 = config.BASE_DIR / "素材" / "发夹" / "合成图拆分镜"
|
||||
|
||||
video_paths = [
|
||||
str(素材目录 / "视频-分镜1.mp4"),
|
||||
@@ -706,7 +706,7 @@ def example_hairclip_video():
|
||||
output = quick_compose(
|
||||
video_folder=str(素材目录),
|
||||
script=script,
|
||||
output_path="/Volumes/Tony/video-flow/output/发夹_合成视频.mp4",
|
||||
output_path=str(config.OUTPUT_DIR / "发夹_合成视频.mp4"),
|
||||
voice_type="sweet_female"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user