Skip to content
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

Display currently downloaded video length #6567

Closed
cousteaulecommandant opened this issue Aug 15, 2015 · 1 comment
Closed

Display currently downloaded video length #6567

cousteaulecommandant opened this issue Aug 15, 2015 · 1 comment

Comments

@cousteaulecommandant
Copy link

@cousteaulecommandant cousteaulecommandant commented Aug 15, 2015

Sometimes knowing how many KB or % of video has been downloaded just isn't enough, and you want to preview the video to check it's working, the right topic, the correct language, etc. So you open the .part file with a video player, and skip through the video till you find a dialog or something. If you skip too far away, the player will get stuck at the end or stop or do something weird, which isn't too nice.

It would be nice if youtube-dl displayed the length of the downloaded video, something like

[download]  11.8% of 4.06MiB at 207.41KiB/s ETA 00:17 (00:12/01:43)

The info of the total video length can be obtained through the %(duration)s parameter (when available), and the current downloaded length can be approximated using a simple rule of three.

Problem with this idea is that the duration parameter doesn't seem to get passed to the [download] routines at all, so this would probably involve modifying a bunch of protocols and modules in downloader/; maybe it's not trivial to do.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 15, 2015

duration is not always available and may be incorrect. Video may be of variable bitrate so that it does not uniformly distirubted across timespan. For fragment based downloaders it would need to be extrapolated on each fragment meaning that current timepoint and total time length of the video will jump like file size when downloading f4m or hls with native. So I can barely see any benefit in this since it would be too approximate.

@dstftw dstftw closed this Apr 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.