On 11/9/22, m...@nodoa.me <m...@nodoa.me> wrote: > The purpose of this new option is to enable processing of mixed content > such > as TV recordings or even movies which have some cuts in telecined 24fps and > others in 30p. > > Enabling it (mixed=1) will calculate a common timebase between decimated > and > non-decimated content and set frame duration according to whether the > current cycle contains a frame deemed to be a duplicate or not. > > The default is disabled (mixed=0) and keeping it disabled will keep the PTS > as before (verified using ffprobe). > > > > Regarding setting frame->pts, I had to adjust this part a bit as it is no > longer possible to assume all frames counted by frame_count_in have the > same > duration. > > As for outlink->frame_rate, I have removed the assignment in the case of > mixed content as the output will be of variable frame rate. Please tell me > in case this is not sufficient to signalize VFR content. > > > > An example for verifying the result is > http://samples.ffmpeg.org/HDTV/Hellboy.ts > > ffmpeg -i Hellboy.ts -map 0:v -c:v libx264 -vf > fps=fps=30000/1001,fieldmatch,decimate=mixed=1,fps=fps=120000/1001 -preset > veryfast -crf 10 Hellboy.mp4 > > The source has a frame rate of 30000/1001 -> timebase 1001/30000 which with > a decimation cycle of 5 results in a decimated timebase of 24000/1001 and a > common timebase of 1001/120000. > > The source contains 24fps interlaced content which will result in a > duration > of 5 frames at the output frame rate of 120000/1001. > > The source also contains 30p content which in the output will have a > duration of 4 frames. > > This particular source requires the frame rate to be set to constant > 30000/1001. I haven't looked into why but I have verified this to also be > required if not applying this patch. >
Applied _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".