split download and ffmpeg procces

This commit is contained in:
root
2026-09-27 12:52:05 +08:00
parent 993fd8f217
commit b6160430a0
13 changed files with 868 additions and 341 deletions
+9
View File
@@ -49,6 +49,15 @@ result = client.download_url(
DownloadRequest(output_dir=Path("downloads")),
)
# Download ordered segment files without merging tracks. The caller owns and
# removes result.temporary_dir after its own post-processing is complete.
segments = client.download_segments(
media,
DownloadRequest(output_dir=Path("downloads"), temporary_dir=Path("work")),
)
for track in segments.tracks:
print(track.track_id, track.initialization, track.segments)
video = next(track for track in media.tracks if track.resolution)
video_only = client.download(
media,