split download and ffmpeg procces
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user