frame rate change w/o changing frames

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

frame rate change w/o changing frames

Green Koopa
I have a video from a GoPro Hero8. It was recorded at 29.97 fps. I would
like to speed up this video. I figure it would be nice to simply increase
the frame rate to 60 fps, so a x2.002 speed-up.

Can this be done without re-encoding the video? I tried:
ffmpeg -r 60 -i in.mp4 -c:v copy -c:a copy out.mp4
This gave me output that was slightly (1MB, 0.1%) smaller, but the same
length in time.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: frame rate change w/o changing frames

Wayne Poll
>I have a video from a GoPro Hero8. It was recorded at 29.97 fps. I would like to speed up this video. I figure it would be nice to simply increase the frame rate to 60 fps, so a x2.002 speed-up.
>
>Can this be done without re-encoding the video? I tried:
>ffmpeg -r 60 -i in.mp4 -c:v copy -c:a copy out.mp4 This gave me output that was slightly (1MB, 0.1%) smaller, but the same length in time.

You need to include a filter, like this: -

-r 60 -vf "setpts=(1/2)*PTS"

Full command would be like this: -

ffmpeg -i in.mp4 -c:v copy -c:a copy -r 60 -vf "setpts=(1/2)*PTS" out.mp4

(I haven't tested this exact CL but I use this type of fame rate change a lot...).

WRP
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: frame rate change w/o changing frames

Carl Eugen Hoyos-2
In reply to this post by Green Koopa
Am Mi., 8. Jan. 2020 um 21:32 Uhr schrieb Green Koopa <[hidden email]>:
>
> I have a video from a GoPro Hero8. It was recorded at 29.97 fps. I would
> like to speed up this video. I figure it would be nice to simply increase
> the frame rate to 60 fps, so a x2.002 speed-up.
>
> Can this be done without re-encoding the video? I tried:
> ffmpeg -r 60 -i in.mp4 -c:v copy -c:a copy out.mp4
> This gave me output that was slightly (1MB, 0.1%) smaller,
> but the same length in time.

It should work if you extract the video first:
$ ffmpeg -i in.mp4 -c copy -f rawvideo out
$ ffmpeg -r 60 -i out -c copy out.mp4
(You may need an mkv file as additional intermediate)

I don't understand why you are also trying to copy audio,
this will most likely not work...

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://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: frame rate change w/o changing frames

Moritz Barsnick
In reply to this post by Wayne Poll
On Wed, Jan 08, 2020 at 20:48:56 +0000, Wayne Poll wrote:
> > I would like to speed up this video. I figure it would be nice to
> > simply increase the frame rate to 60 fps, so a x2.002 speed-up.
> >
> > Can this be done without re-encoding the video? I tried:

> You need to include a filter, like this: -
> -r 60 -vf "setpts=(1/2)*PTS"

You cannot use filters without re-encoding the video.

You *can* use bitstream filters though. I seem to recall there was an
idea of a "setpts" bitstream filter, but I can't find the thread on
ffmpeg-devel. This could have changed speed without reencoding.

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

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