Question regarding the frame rate options (seems inconsistent with ffmpeg command-line) #50
-
|
Thanks for this nice project! I have a question regarding the framerate change. For example, I have a test_video.mp4 with 60fps, I'm trying to convert it to 24fps without changing the playback time. This means I need to drop some frames for the new framerate. Surprisingly, I find the above code seems working well. However, if I use |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
as much as I know the rate in should be the input video FPS in this case 60 |
Beta Was this translation helpful? Give feedback.
-
|
@buggyyang - Glad you found it useful, and I moved this conversation to Discussions as it is not an
Yes and no. Yes, they are different but no because you are invoking the difference. When calling FFmpeg, the option order matters. With If you want to change the framerate, you need to use the output In This applies everywhere including Hope this makes sense to you. Also, if you're only transcoding, use the |
Beta Was this translation helpful? Give feedback.
@buggyyang - Glad you found it useful, and I moved this conversation to Discussions as it is not an
ffmpegioissue.Yes and no. Yes, they are different but no because you are invoking the difference.
When calling FFmpeg, the option order matters.
With
ffmpeg -r 24 -i test_video.mp4 -, you're forcing the input to have 24 fps, i.e., play back in slow-mo as you described, because-rhere is an input stream option.If you want to change the framerate, you need to use the output
-roption:ffmpeg -i test_video.mp4 -r 24 -In
ffmpegio, if you give anffmpegoption name (minus the leading dash-) as your keyword argu…