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 B30114B998 for ; Tue, 2 Jul 2024 18:43:41 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9818368D93A; Tue, 2 Jul 2024 21:43:38 +0300 (EEST) Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 23D8568D83C for ; Tue, 2 Jul 2024 21:43:32 +0300 (EEST) Received: by mail-ot1-f53.google.com with SMTP id 46e09a7af769-701ef03185fso2613399a34.0 for ; Tue, 02 Jul 2024 11:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719945809; x=1720550609; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=XIw0/UJkdERanQgSOsVHda7IZWN7u+svOxjhhBedwwQ=; b=fB5O4Cx7UQhqFkMIIpwN7iaM5y3XIISTlsIf3tbdiB5ySti3rW2LPwMseqmfSHOsw5 RCHfUaN3Q/VxeMKeA/tc5SalA7rfRU7NATYet/y5YrMkPHUdnQebpxZWexeb8F2rYjhE fojDaPe58dpdrDF9PglBLBpFUcz76VLpipTRVb0RpV/XWi2AmSeRAw4dO5FPtq+FABZv 2gG/+WTbSFqaHzGkUucTMnYXE1avPirLbY0u0JIvx1jfNMpAV8uFD+x6P+iYpzTaICgh gcOF7YU9WyRU0K1QCuOcSGaxPDnoaGspXIccv8Cv31WknPSoUeZrIgXk+KsBUXijHRbv OfDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719945809; x=1720550609; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XIw0/UJkdERanQgSOsVHda7IZWN7u+svOxjhhBedwwQ=; b=jS2QS9EIBM84ukZ78mH9YaiTlQBz5VFb7XHWpvZMpkKq2nFaOTT/6ZY5eGE+vRb8j2 w9CsrxBNcN7d9N9lCMutP5xPZph0RQB6QUb/gF9wtqUD4a3GXx0oW1xyB/QiUjSxdpyR uCtDBbaOWwBkqyeI6hSJHynyGC0a9hWO85qphJUS8UM04wVRVPzTJy49FWO66IpH+0jv 3+Dre4pJUCbkqhTf9nzJGmNVKtnKcI14IU8VErHoIkTAHD+Qge0rwDI9IeKgRUVUTDVC ygxikc5ilvfxcS1ij+GHEf6Cp60yTQ6VXU5s9ChYbX4noswBtUG4+1pwjnWrXTWphsk2 JFWg== X-Gm-Message-State: AOJu0YxHRNg1K/X3Quk3q2M0w/oS1ZL7e1KgKBPGxhXEJZXPz02enMPS JzVDV6RtWcdm6QgrCGXHaSaQ/bblMBIPP9uXjGGIuaSFSH3BF5knr88JmA== X-Google-Smtp-Source: AGHT+IHitc8RK35r8CXG1wlhp13FBjJL3Yc2nNiv2w/KBBVSFZKKLntW8/gbiQVfdfoOYIzdKcyvGg== X-Received: by 2002:a05:6830:169a:b0:702:1eb7:ec86 with SMTP id 46e09a7af769-7021eb7ef0cmr4203356a34.23.1719945809261; Tue, 02 Jul 2024 11:43:29 -0700 (PDT) Received: from [192.168.0.16] ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-72c6afb9042sm7026311a12.41.2024.07.02.11.43.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Jul 2024 11:43:28 -0700 (PDT) Message-ID: <102189ef-09b2-4988-8a50-ffcb05d7d158@gmail.com> Date: Tue, 2 Jul 2024 15:43:59 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: ffmpeg-devel@ffmpeg.org References: <171931078242.21847.5755059493417163903@lain.khirnov.net> <20240702164936.6140-1-jamrial@gmail.com> <171994291944.21847.1436706415867340803@lain.khirnov.net> Content-Language: en-US From: James Almer In-Reply-To: <171994291944.21847.1436706415867340803@lain.khirnov.net> Subject: Re: [FFmpeg-devel] [PATCH 5/6 v3] fftools/ffmpeg: support applying container level cropping 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 7/2/2024 2:55 PM, Anton Khirnov wrote: > Quoting James Almer (2024-07-02 18:49:36) >> Signed-off-by: James Almer >> --- >> doc/ffmpeg.texi | 16 ++++++++++++++++ >> fftools/ffmpeg.h | 15 +++++++++++++++ >> fftools/ffmpeg_demux.c | 26 ++++++++++++++++++++++++++ >> fftools/ffmpeg_filter.c | 10 ++++++++++ >> fftools/ffmpeg_opt.c | 25 +++++++++++++++++++++++++ >> 5 files changed, 92 insertions(+) >> >> diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi >> index f25f6192eb..f75ed681cf 100644 >> --- a/doc/ffmpeg.texi >> +++ b/doc/ffmpeg.texi >> @@ -1262,6 +1262,22 @@ disabled, all output frames of filter graph might not be in the same resolution >> and may be inadequate for some encoder/muxer. Therefore, it is not recommended >> to disable it unless you really know what you are doing. >> Disable autoscale at your own risk. >> + >> +@item -apply_cropping > > +@item -apply_cropping[:@var{stream_specifier}] @var{source} (@emph{input,per-stream}) Ok. > > >> +Automatically crop the video according to file metadata. Default is @emph{all}. > ^ > after decoding Ok. >> + >> +@table @option >> +@item none (0) >> +Don't apply any cropping metadata. >> +@item all (1) >> +Apply both codec and container level croppping. This is the default mode. >> +@item codec (2) >> +Apply codec level croppping. >> +@item container (3) >> +Apply container level croppping. >> + >> +@end table >> + > > Also, this should probably be in the advanced section, since it's marked > as OPT_EXPERT. So are autoscale and autorotate, which are also outside the advanced section. But i can move it if you prefer. > >> @@ -715,6 +729,7 @@ AVDictionary *strip_specifiers(const AVDictionary *dict); >> int find_codec(void *logctx, const char *name, >> enum AVMediaType type, int encoder, const AVCodec **codec); >> int parse_and_set_vsync(const char *arg, int *vsync_var, int file_idx, int st_idx, int is_global); >> +int parse_and_set_cropping(const char *arg, int *out); > > What's the point of this being in a separate file when it's only used > from ffmpeg_demux? Copy-paste implementation from parse_and_set_vsync(). Will move. _______________________________________________ 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".