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

Feature Request: Add a timecompressor as postprocessing option #16544

Closed
fbuchinger opened this issue May 24, 2018 · 1 comment
Closed

Feature Request: Add a timecompressor as postprocessing option #16544

fbuchinger opened this issue May 24, 2018 · 1 comment
Labels

Comments

@fbuchinger
Copy link

@fbuchinger fbuchinger commented May 24, 2018

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.05.18. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2018.05.18

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

A common usage of youtube-dl is to download podcasts or instructional youtube videos for offline usage/archival. The people who listen to educative podcasts want to minimize their learning time, so they often increase the playback speed of the podcast mp3's or videos. On the other hand, they also want to save storage space.

Why can't we combine these two requirements in one feature? Youtube-dl could download the video and then re-encode it using ffmpeg at an increased framerate. With this "baked-in" playback speed increase, we also save storage space.

Example invocation:
youtube-dl https://www.youtube.com/watch?v=1n9KMqssn54 --playback-speed=2.0

As a proof-of-concept, I tried to reencoded the mentioned video to 2.0 playback speed using a manual ffmpeg call:

> youtube-dl https://www.youtube.com/watch?v=1n9KMqssn54
> dir *.mp4
[..]
02.03.2018  11:10       295.366.625 Using PyPy instead of Python for speed by Niklas Bivald-1n9KMqssn54.mp4
> ffmpeg -i ...1n9KMqssn54.mp4 -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" timecompressed.mp4
> dir *.mp4
24.05.2018  22:08       133.155.279 timecompressed.mp4
02.03.2018  11:10       295.366.625 Using PyPy instead of Python for speed by Niklas Bivald-1n9KMqssn54.mp4

My PoC shows that the timecompressed version of the video saves about 56% storage space and about 12 minutes listening time (original duration ~24 minutes). I have to admit that the timecompressed version is not perfectly understandable and took a while to encode, but I haven't tweaked the settings yet and I am using a pretty old machine.

According to a recent lifehacker article, playback speeds from 1.4 to 1.7 are pretty common today: https://lifehacker.com/speed-up-your-podcasts-for-more-efficient-listening-1797029702

What do you think?

@dstftw dstftw closed this May 24, 2018
@dstftw dstftw added the duplicate label May 24, 2018
@fbuchinger
Copy link
Author

@fbuchinger fbuchinger commented May 25, 2018

Why is this a duplicate of #15840? My proposal is about resampling the video for increased playback speed, #15840 is about slicing a video at a given start/ end time.

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.