[FFmpeg-user] 2nd pass has more frames than 1st pass (99021)2kbits/s dup=27 drop=0 speed=4.76x
Carl Eugen Hoyos
ceffmpeg at gmail.com
Sun Nov 29 20:39:48 EET 2020
Am So., 29. Nov. 2020 um 16:32 Uhr schrieb Mathieu Malaterre
<mathieu.malaterre at gmail.com>:
> $ ffmpeg -y -i input.avi -c:v libx264 -b:v 1321894 -pass 1 -an -f null
> /dev/null && \
> ffmpeg -y -i input.avi -c:v libx264 -b:v 1321894 -pass 2 -c:a aac -b:a
> 128k fixed.mp4
This cannot work (and this is not related to the fact that you are not
using a version of FFmpeg that we support here).
In some cases - if you are lucky - there is a crash and no output file
is written, in other cases, a "broken" output file is written, broken in
the sense that two-pass encoding did not work the way it is supposed
to (more bitrate was given to frames that do not need it).
Do not use -an on the first pass and add "-vsync cfr" to the first pass.
(Other workarounds are possible.)
For future questions: Do not cut FFmpeg's console output, only
post ffprobe output if you see an issue with it.
Not really related:
> Does it make sense to simply copy/paste the existing bit_rate to
> re-encode it ?
No, to the best of my knowledge, it makes no sense whatsoever.
Very generally you either want a specific output quality, in this
case specifying a bitrate and two-pass encoding make no
Or you have a particular size requirement for the output file,
then bitrate and two-pass encoding make sense.
More information about the ffmpeg-user