0

So, I need to save up a lot of space on my hard drive so I'm encoding PNG files to lossless video so I can delete the PNG files. I'm encoding one at 72fps and one slightly slowed down to 60fps.

Let's say this is the command I use to encode to 72fps:

ffmpeg -framerate 72 -i png/%%06d.PNG -i audio/72.m4a^
 -c:v libx265 -c:a copy -pix_fmt yuv444p -crf:v 0^
 video/72.mkv

This is the 60fps command:

ffmpeg -framerate 60 -i png/%%06d.PNG -i audio/60.m4a^
 -c:v libx265 -c:a copy -pix_fmt yuv444p -crf:v 0^
 video/60.mkv

What would be the equivalent of the 60fps command if I want to encode it from the 72fps video file rather than the PNG files since they were deleted, but slow the video down to 60fps without dropping frames? If possible, I want to tell it to encode exactly at 60fps without using the setpts video filter, and/or copy the video stream at a different frame rate (which I'm not sure if that is even possible).

2

Basic command is

ffmpeg -itsscale 1.2 -i video/72.mkv -i audio/60.m4a^
 -map 0:v -map 1 -c copy video/60.mp4

This uses input option itsscale to rescale timestamps, where 1.2 is decimal representation of 72/60. Note that this does not supply a new frame rate value to the output writer, so for formats like MKV, it will show the old rate with ffprobe, but play at the new rate. With MP4, you should see the new rate.

  • If I copy it to MP4, and then copy that file to MKV, will I still see the old rate or will I see the new rate? – user245115 Jun 30 at 21:07
  • Just checked - you get the new rate. – Gyan Jul 1 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.