[FFmpeg-user] Question about 2 pass encoding
Srikanth Kotagiri
srikanthk at gmail.com
Mon Apr 1 21:47:33 EEST 2024
On Mon, Apr 1, 2024 at 11:15 AM Aditya Dandavate
<adityadandavate04 at gmail.com> wrote:
>
> okay.
>
> thank you sir.
>
> But, I had one more problem coming frequently while encoding in two-pass.
> The problem says `File Ended Prematurely`.
>
> What could be the reason for this frequent issue ?
>
> On Mon, 1 Apr, 2024, 11:42 pm Laine Lee, <llee040 at sbcglobal.net> wrote:
>
> >
> >
> > > On Apr 1, 2024, at 9:35 AM, Aditya Dandavate <
> > adityadandavate04 at gmail.com> wrote:
> > >
> > > But according to H.264 guide :
> > >
> > > Warning: When using option -an, you may eventually get a segfault or a
> > > broken file. If so, remove option -an and replace by -vsync cfr to the
> > > first pass.
> > >
> > > When I put `vsync cfr` then it says that `-vsync` is deprecated, use
> > > `-fps_mode`
> > >
> > > What is all this happening ?
> >
> > I’ve found that using “-fps_mode cfr” appears to serve as an adequate
> > replacement for the “vsync” call in recent versions of ffmpeg (to keep it
> > from complaining).
> >
> > Sincerely,
> > L. Lee
> > _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> >
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
Thinking about it a little bit more, having the -an or removing the
-an filter can change the computed duration of the file depending on
audio track durations and any start_pts for the tracks. I think ffmpeg
prioritized the audio track duration over the video track. I think I
saw something recently? So I take my previous advice back and suggest
using the audio codec consistently between the first and second pass
commands. Also using -fps_mode cfr is the recommended way for newer
ffmpeg versions.
More information about the ffmpeg-user
mailing list