0

I have a folder containing 1701 image frames named "frame0000.jpg", "frame0001.jpg",..., "frame1700.jpg". When I try to convert them to a video using this command:

ffmpeg -r:1751/61 -b:2400k -i frame%3d.jpg video1.avi

It produces a video with a bitrate of 717kbs and 25 frames/second (so the FPS is also different than what I specified!); hence, it has a poor quality.

I read a lot about this issue such as: FFMPEG ignores bitrate

But couldn't find the solution to my case.

Any help is appreciated.

Mohammad
  • 145
  • 8
  • 1
    Bitrate for output goes after the input e.g. `ffmpeg -framerate 1751/61 -i frame%3d.jpg -b:v 2400k video1.avi` – Gyan Mar 12 '21 at 04:22

1 Answers1

1

Fixed command:

ffmpeg -framerate 1751/61 -i frame%3d.jpg -b:v 2400k video1.avi

Option placement is important

Syntax is:

  ffmpeg [input options] -i input [output options] output

Use valid options

  • -r:1751/61 is incorrect. Use -framerate 1751/61. The image demuxer prefers -framerate, not -r.
  • -b:2400k is incorrect. Use -b:v 2400k

Refer to the log

It should have provided errors to help you determine the problem:

  • Invalid stream specifier: 1751/61
  • Option b (video bitrate (please use -b:v)) cannot be applied to input -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.
llogan
  • 121,796
  • 28
  • 232
  • 243