From: <mail@nodoa.me> To: <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH] lavfi/vf_decimate: add mixed option to process input only partially to be decimated Date: Wed, 9 Nov 2022 21:08:47 +0900 Message-ID: <001401d8f434$06dcf3d0$1496db70$@nodoa.me> (raw) 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. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next reply other threads:[~2022-11-09 12:08 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-09 12:08 mail [this message] 2022-12-19 15:27 ` Paul B Mahol -- strict thread matches above, loose matches on Subject: below -- 2022-11-09 12:07 mail
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='001401d8f434$06dcf3d0$1496db70$@nodoa.me' \ --to=mail@nodoa.me \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git