Changing video speed

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing video speed

jd1008
I have a video that was sped up and now the voice is like
that of cats in cartoons.
How can I at least lower the pitch back to normal?
Since the whole video was sped up, I would rather
slow down the whole video (video and audio) AND lower
the pitch back to near normal?

Thanx
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Changing video speed

Carl Eugen Hoyos-2
2019-01-19 22:55 GMT+01:00, JD <[hidden email]>:
> I have a video that was sped up and now the voice is like
> that of cats in cartoons.
> How can I at least lower the pitch back to normal?
> Since the whole video was sped up, I would rather
> slow down the whole video (video and audio) AND lower
> the pitch back to near normal?

Look at the documentation for the setpts filter:
https://ffmpeg.org/ffmpeg-filters.html#setpts_002c-asetpts

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Changing video speed

jd1008


On 01/19/2019 03:27 PM, Carl Eugen Hoyos wrote:

> 2019-01-19 22:55 GMT+01:00, JD <[hidden email]>:
>> I have a video that was sped up and now the voice is like
>> that of cats in cartoons.
>> How can I at least lower the pitch back to normal?
>> Since the whole video was sped up, I would rather
>> slow down the whole video (video and audio) AND lower
>> the pitch back to near normal?
> Look at the documentation for the setpts filter:
> https://ffmpeg.org/ffmpeg-filters.html#setpts_002c-asetpts
>
> Carl Eugen
Thank you very much Gene.
But .... I am no expert in this. I have no idea
what to specify - from those plethora of options you show in that link.
Could someone make it simple for me so that I can specify the right options
to just slow down vid and aud say by 5 points, if that makes sense.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Changing video speed

Moritz Barsnick
In reply to this post by jd1008
On Sat, Jan 19, 2019 at 14:55:55 -0700, JD wrote:
> I have a video that was sped up and now the voice is like
> that of cats in cartoons.
> How can I at least lower the pitch back to normal?
> Since the whole video was sped up, I would rather
> slow down the whole video (video and audio) AND lower
> the pitch back to near normal?

There's a wiki page covering this:
https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video

(There's a part saying "Using a complex filtergraph, you can speed up
video and audio at the same time:". IMO, you can also do this with
separate "simple" filters, using "-vf" and "-af".)

Carl Eugen failed to mention that the setpts filter doesn't change the
audio speed. The audio example in the wiki, using "atempo", changes the
speed while _maintaining_ the pitch. To stretch the audio _including_
pitch change, you need to instead change the sample speed with the
"asetrate" filter, and re-adapt the output sample rate (because your
output file will require a sane sample rate such as 44.1k or 48k) with
"-ar".

E.g. to reduce the speed of the audio to 0.8x of the given input,
assuming an input sample rate of 48000k:

$ ffmpeg -i input -af asetrate=38400 -ar 48000 output

(38400 is 0.8 * 48000. I wish asetrate would understand an "input
sample rate" variable.)

Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Changing video speed

jd1008


On 01/21/2019 06:42 AM, Moritz Barsnick wrote:

> On Sat, Jan 19, 2019 at 14:55:55 -0700, JD wrote:
>> I have a video that was sped up and now the voice is like
>> that of cats in cartoons.
>> How can I at least lower the pitch back to normal?
>> Since the whole video was sped up, I would rather
>> slow down the whole video (video and audio) AND lower
>> the pitch back to near normal?
> There's a wiki page covering this:
> https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video
>
> (There's a part saying "Using a complex filtergraph, you can speed up
> video and audio at the same time:". IMO, you can also do this with
> separate "simple" filters, using "-vf" and "-af".)
>
> Carl Eugen failed to mention that the setpts filter doesn't change the
> audio speed. The audio example in the wiki, using "atempo", changes the
> speed while _maintaining_ the pitch. To stretch the audio _including_
> pitch change, you need to instead change the sample speed with the
> "asetrate" filter, and re-adapt the output sample rate (because your
> output file will require a sane sample rate such as 44.1k or 48k) with
> "-ar".
>
> E.g. to reduce the speed of the audio to 0.8x of the given input,
> assuming an input sample rate of 48000k:
>
> $ ffmpeg -i input -af asetrate=38400 -ar 48000 output
>
> (38400 is 0.8 * 48000. I wish asetrate would understand an "input
> sample rate" variable.)
>
> Moritz________________________

Hi Moritz,
Once I determine what the videos current rates are,
for vid and aud, and let's assume I want to low down both
by a factor of 30%, and I multiply 0.3 by each rate (aud and vid),
and come up with 2 values that re 30% less than current vid,
would my command line look like this: ?

ffmpeg -i my-vid.mp4 -af asetrate newRate -ar 48000  -vf vsetrate
newRate -vr ????? Output

How would I specify the value for the '?????'

Thanx
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".