Skip to content

cli: update progress output after stream has ended #5887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

bastimeyer
Copy link
Member

This fixes the download progress output missing the last data chunk.

Without patch (depends on the timing of the last write() call):

$ streamlink -l none --force -o /tmp/foo.mp4 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_adv_example_hevc/v9/prog_index.m3u8' best
[download] Written 563.48 MiB to /tmp/foo.mp4 (12s @ 45.01 MiB/s)

$ streamlink -l none --force -o /tmp/foo.mp4 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_adv_example_hevc/v9/prog_index.m3u8' best
[download] Written 554.26 MiB to /tmp/foo.mp4 (12s @ 45.19 MiB/s)

$ streamlink -l none --force -o /tmp/foo.mp4 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_adv_example_hevc/v9/prog_index.m3u8' best
[download] Written 545.10 MiB to /tmp/foo.mp4 (10s @ 51.81 MiB/s)

With patch:

$ streamlink -l none --force -o /tmp/foo.mp4 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_adv_example_hevc/v9/prog_index.m3u8' best
[download] Written 564.41 MiB to /tmp/foo.mp4 (11s @ 48.87 MiB/s)

Actual file size:

$  stat -c %s /tmp/foo.mp4 | numfmt --to=iec-i --format=%.2f --round=down
564.41Mi

@bastimeyer bastimeyer merged commit 6bbbb8e into streamlink:master Mar 12, 2024
@bastimeyer bastimeyer deleted the cli/utils/progress/update-after-close branch March 12, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant