ffmpeg PNG - MP4 - Error opening input files: invalid argument

15,722

If you look at your terminal output it says the FFmpeg parameters are wrong, because you are passing an incorrect parameter to the input file. The bitrate parameter must be applied to your output file, since you are encoding using that bitrate. Moving it to the right position will do the trick.

I tested it out, this works:

ffmpeg -r 20 -i example%01d.png -b:v 20M output.mp4

Share:
15,722
Admin
Author by

Admin

Updated on July 25, 2022

Comments

  • Admin
    Admin almost 2 years

    I am following along with this visualization project converting PNG files in an MP4.

    The only change from the code on the example is that my time stamp starts with 1.

    ffmpeg -r 20 -b 20M -i example%01d.png output.mp4
    

    And this is what returns

    ffmpeg version N-53055-g7b43120 Copyright (c) 2000-2013 the FFmpeg developers
    built on May 14 2013 20:43:53 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
    configuration: --disable-yasm
    libavutil      52. 31.100 / 52. 31.100
    libavcodec     55.  9.100 / 55.  9.100
    libavformat    55.  7.100 / 55.  7.100
    libavdevice    55.  0.100 / 55.  0.100
    libavfilter     3. 67.100 /  3. 67.100
    libswscale      2.  3.100 /  2.  3.100
    libswresample   0. 17.102 /  0. 17.102
    **Option b (video bitrate (please use -b:v)) cannot be applied to input file
    example%01d.png -- you are trying to apply an input option to an output file or
    vice versa. Move this option before the file it belongs to.
    Error parsing options for input file example%01d.png.
    Error opening input files: Invalid argument**