From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 7B8B2443B4 for ; Wed, 9 Nov 2022 12:08:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7AB1D68BB78; Wed, 9 Nov 2022 14:08:56 +0200 (EET) Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 64C8068B000 for ; Wed, 9 Nov 2022 14:08:50 +0200 (EET) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nodoa.me; s=key1; t=1667995730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=+gAF9enkhgM+TmfX8YyW4/H0afzX4SCIZ6+ly9Vcnic=; b=z1Hl4uVbkatOUMheGtY1ffaWUFsC7c0jcVGRGgX6aqv1ado1mYAuKAXo8+yx4pd8rGBBj9 XwCWH1paddOD3LXXe9gCYY+RcNMKGsNmxmy27R9xwNdHpYvXnvmacKjEWsKInr190+PHEk /4MkfbOtJHQ+etGXpFFhxjhXNKIPL1k= From: To: Date: Wed, 9 Nov 2022 21:08:47 +0900 Message-ID: <001401d8f434$06dcf3d0$1496db70$@nodoa.me> MIME-Version: 1.0 Content-Language: ja X-Migadu-Flow: FLOW_OUT X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH] lavfi/vf_decimate: add mixed option to process input only partially to be decimated X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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".