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] Change playback speed of downloaded files #12623

Open
Vitruvia opened this issue Apr 2, 2017 · 9 comments
Open

[Feature Request] Change playback speed of downloaded files #12623

Vitruvia opened this issue Apr 2, 2017 · 9 comments
Labels

Comments

@Vitruvia
Copy link

@Vitruvia Vitruvia commented Apr 2, 2017

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.04.02. 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 2017.04.02

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

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

Dear developers of youtube-dl,

In the first place, thank you for making this excellent tool. It has enabled me to listen to quality audio during my commutes.

I'd just like to ask if it is possible to include an option to save the video/audio in a faster speed, thus mimicking youtube's function of increasing the playback speed of their videos.

I thought of helping with this, but I'm quite a beginner. I've been learning to code for only 3 months (with python 3), so I don't know if I could be of any help. If you think there is anything I can do, just let me know.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 2, 2017

Use player's playback speed options.

@dstftw dstftw closed this Apr 2, 2017
@Vitruvia
Copy link
Author

@Vitruvia Vitruvia commented Apr 2, 2017

That is assuming my car player has such option; it doesn't. I'm looking for a way to circunvent this by putting audios in my iphone and changing playback speed there, but I haven't found a practical way of doing it yet.

@dstftw dstftw reopened this Apr 2, 2017
@dstftw dstftw added the request label Apr 2, 2017
@mrkmndz
Copy link

@mrkmndz mrkmndz commented Apr 7, 2017

For your own use, your best bet is probably just to use ffmpeg directly afterward https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video

@CharlSteynberg
Copy link

@CharlSteynberg CharlSteynberg commented Jun 6, 2018

Cool tip @mrkmndz
I don't know if the following feature already exists in youtube-dl -but here's an idea:
Using a filter-argument, maybe it could be used to pass filter options through to ffmpeg?
The command could then look something like:
youtube-dl --extract-audio --filter-atempo=0.5 https://www.example.com/...

-awesome cli tool btw, thanks for making it and maintaining, appreciated

@andrew-ma
Copy link

@andrew-ma andrew-ma commented Oct 5, 2018

i'm working on this now (but never done any real coding project or any open source). Theoretically, it would be like --ffmpeg-filter FILTER where FILTER is 'atempo=0.5' I just need a way to detect if input is a video or audio because ffmpeg -filter:(v|a). And also i would need to add it to options.py

general.add_option( '--ffmpeg-filter', metavar='FILTER', dest='ffmpeg_filter', help='Apply ffmpeg filter to downloaded file. Example: --ffmpeg-filter \'atempo=0.5\'.')

@uhhmaybe
Copy link

@uhhmaybe uhhmaybe commented Oct 5, 2018

Just use a podcast app that allows you to upload your own files and then speed adjust them using that on the fly as fast or slow as you want. For example, both Overcast and Pocket Casts can do this, plus they have the ability to do things like trim silences and boost the voice. Way better than trying to roll your own solution.

@andrew-ma
Copy link

@andrew-ma andrew-ma commented Oct 5, 2018

@ashleyharvey
Copy link

@ashleyharvey ashleyharvey commented Feb 2, 2019

@andrew-ma are you still working on this?

I dug into the arguments of ffmpeg and youtube-dl a bit, and found you can execute a command on a downloaded file after the fact using --exec, for example: youtube-dl -v "https://www.youtube.com/watch?v=SOME_URL" --restrict-filenames --extract-audio --exec 'ffmpeg -i {} -af "atempo=2.0" -vn processed_{}'.

But, this is obviously less elegant than having the option built-in to youtube-dl.

@xxKeith20xx
Copy link

@xxKeith20xx xxKeith20xx commented Nov 30, 2019

To increase both audio and video, I ran this on the download from youtube-dl, as a separate command:

ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=1.5[a]" -map "[v]" -map "[a]" output.mp4

The 1.5 above representing the playback rate.

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
8 participants
You can’t perform that action at this time.