From patchwork Wed Jan 10 09:05:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 45553 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:bf2f:b0:199:de12:6fa6 with SMTP id gc47csp918754pzb; Wed, 10 Jan 2024 01:06:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IEric91yOqQ887pyzkAh6zatyJLyQ4i9QgEymorraePI89H61DaaZzSv/ptZVrlX6kHq35o X-Received: by 2002:a17:907:d9e:b0:a2a:9e60:9e1e with SMTP id go30-20020a1709070d9e00b00a2a9e609e1emr466289ejc.100.1704877570685; Wed, 10 Jan 2024 01:06:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704877570; cv=none; d=google.com; s=arc-20160816; b=k3PkBIRw8xVI0Wx1kxOvWZYF05i9wMi6mYdBLag/ohs7Y5rxQ0OErIgUlwnVPr9CbC /6gWgcRwux4x13CBMJaxEPUX5HIIUqs2Ye13JGAUH+0WzkOPlH07s4DAvNnaW0Kbs3N0 ZymbsetKhoHRHoYgvdZyVpaoBZAWcVvR2+TjtObinACYpJznYj7LTk/24CZg3EyvhwFy wtFPnp/Ys1A2l52zoJwVzvQHzu0WVSrDkL/GYb5V2mdK2vrZixtUk3jp+nrhm0bGSftc dg0L9ELsI+zaQ8TjeWtlpZ9OftX9mHBWAW5DVFbxh6+mcEnVuYnUH5RKoOwPa0kPl3mj qgsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=N5MkNmfBKkI0JgaaFZl25mVbV/ZyrDKoN3tspIXAkds=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=wYx4+NXUubx2PGz5Og3xQPc4q9va3ZmR63JDex+XUsJoGWAIsJhuOuw73Xus6mMXzu ocJjgXSo8IaCNB+0sLZgNacmr8hw2DRD6Kbj54zlI2ulQMwZKOWLZcIk3m46mwUPThMu JoT7d8fY5Q/0KdE8weCaW7cayOOZJVQpsRUkbxfvrSl+jHVinYE+DyHYd/vZu97Aa7/1 P3GfdrSPSUTsMTSF2HjshTKwQEglB3lXp1vi4qqhbqsAlV4T9BNqvj3Zs5ZvZtJ9SSsi RzQW+EaiblM+apM29tMDmGypzGfP/YGyUVj3vIgZVczDgPfK0TfLsjvEijQ4VDbqbeSa 61jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=jh23eUZT; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id mc27-20020a170906eb5b00b00a2bf9d322b0si105722ejb.855.2024.01.10.01.06.10; Wed, 10 Jan 2024 01:06:10 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=jh23eUZT; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F256368C8F6; Wed, 10 Jan 2024 11:05:58 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E4C7968CE3E for ; Wed, 10 Jan 2024 11:05:51 +0200 (EET) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 535F0414B5; Wed, 10 Jan 2024 10:05:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1704877551; bh=1FoLUeMnZK6qQwE/IITNIzR7ui5iNMXPdkQLM5A6SiM=; h=From:To:Cc:Subject:Date:From; b=jh23eUZTxveMzScoQTlIOX3GTh+z758hfnFjmParxOTKNeUWGe5BeYLb9SG/GVoWh yH/+ygq04lYm+pVcDE18ScOIUzsglb3x3On5fb8C051i++GsHfUCEhR0rWWsoy+kmF oOiK/dJTOh0/v+4EClKD2jeyOz/fENmxJ63heJvc= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Wed, 10 Jan 2024 10:05:46 +0100 Message-ID: <20240110090547.69151-1-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] fftools/ffplay: add missing YUV metadata to buffersrc 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 Cc: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: laPdPuCMiEXw From: Niklas Haas Fixes error spam from the `ffplay` tool since commit 2d555dc82d, caused by an oversight on my part - I didn't notice during development that `ffplay` goes through its own filtering code path separate from fftools/ffmpeg_filter.c --- fftools/ffplay.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 17861e60be..0771326d76 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -1881,10 +1881,12 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c graph->scale_sws_opts = av_strdup(sws_flags_str); snprintf(buffersrc_args, sizeof(buffersrc_args), - "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d", + "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d:" + "colorspace=%d:range=%d", frame->width, frame->height, frame->format, is->video_st->time_base.num, is->video_st->time_base.den, - codecpar->sample_aspect_ratio.num, FFMAX(codecpar->sample_aspect_ratio.den, 1)); + codecpar->sample_aspect_ratio.num, FFMAX(codecpar->sample_aspect_ratio.den, 1), + frame->colorspace, frame->color_range); if (fr.num && fr.den) av_strlcatf(buffersrc_args, sizeof(buffersrc_args), ":frame_rate=%d/%d", fr.num, fr.den); From patchwork Wed Jan 10 09:05:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 45552 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:bf2f:b0:199:de12:6fa6 with SMTP id gc47csp918663pzb; Wed, 10 Jan 2024 01:06:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IERFcUhf3T9ZU1yYDAUZfEVa9gRIQDzzNvpCFoC9O4TkU+GZ+n9O8i5EEzUic5OYuJQlIYm X-Received: by 2002:a17:907:1b1a:b0:a28:db16:ddf3 with SMTP id mp26-20020a1709071b1a00b00a28db16ddf3mr239170ejc.73.1704877561524; Wed, 10 Jan 2024 01:06:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704877561; cv=none; d=google.com; s=arc-20160816; b=SYwWTF/31ZecoN25dK5G6LWZXr0Dueyo8N07CDzsyzdajSrO6b8A+yCOIjXkoZpMVp SgrpufCvm5aS9M4EvV3X/EkxhZ5e6ttaxDd0hIYRh8n/+ZjA8qhdCUIFlBz/YrC19hNh bpZgfW0bFLX/ybA1y2Qfua2HXpuSzM/R/GMcPCKCJ6RewrQfw/FTwDCSQpj1+2sJo9qM ml3InBnbSG7/rrqVaDBoReYm/hxCIzgxKdPJ3c6MHc7X8nQmugb9WcYtOElqgZH8H2uT i5F38GSX84hhNSRW3Hkd6FrMQsG+EyUF7b6xT4pOGI3bz30UiYWTMQ7Q5IE2CXJBRSAx JSLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=leHeemgsUN80lzFcDgIoVNUHbUYgsZKAY4kRQJRK9VM=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=RaW4UhWin24ADE0sn4snCkwbeVFHI7fOL5lk2+xNNqgg+moLuraWxGYZbO+LYcJ1EX H6EnpTUsGdCUJPNw3qi7ZOvcjVIXZ1DR3IvQBJYJcv3TbDmgTzuFVImvqGaE7xN44jgn 1tQSz6pB9GEKttlkBABgmTGkkIArl29kKHNmtzUxT+QNi79WzM86eFkoDpYdd9qYe1I+ yasbSMIAzQ2EX9dhk5+2qlZ+lL3R28AIjEWHBwz1MfIS7Yg04frRePvBx9G/0Ml1HwlM QDwqAvt0SavsNo444OkYQ3W7hxOolJBKCBTsKI1fAlz4CXNAYZOG1QzhCEnOs2GLCHj8 SCMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=LDfENAxn; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id n27-20020a1709061d1b00b00a2bc48038a3si498973ejh.914.2024.01.10.01.06.01; Wed, 10 Jan 2024 01:06:01 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=LDfENAxn; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E688968CEE7; Wed, 10 Jan 2024 11:05:57 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E7A3068CE4A for ; Wed, 10 Jan 2024 11:05:51 +0200 (EET) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 8D2C443731; Wed, 10 Jan 2024 10:05:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1704877551; bh=f8pajVB9QyFZtX1fhgJJg81EoNMHYYAK1eP0U4tIS0s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LDfENAxn5AxoHJi0R0gDQ87f29PptnMChvvodYbU/NsBKsHqLRoTglrC41dcFW4QP zI72u2Q56thYb07LmOk9+tkzGhtGapb+qAe2B4YkspuD8VEuhCkvfHUxzzZxsdlHPq O/NCJDtDmM1pSzC5e+dMT+eibWI1+N47CxcR0RY8= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Wed, 10 Jan 2024 10:05:47 +0100 Message-ID: <20240110090547.69151-2-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240110090547.69151-1-ffmpeg@haasn.xyz> References: <20240110090547.69151-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] fftools/ffmpeg_filter: simplify buffersrc arg printing 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 Cc: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: zuzfwW9S+Fr8 From: Niklas Haas There's no need to go through full string expansion here. --- fftools/ffmpeg_filter.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 82ee4fae7d..f4324579c5 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -1497,11 +1497,10 @@ static int configure_input_video_filter(FilterGraph *fg, AVFilterGraph *graph, av_bprint_init(&args, 0, AV_BPRINT_SIZE_AUTOMATIC); av_bprintf(&args, "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:" - "pixel_aspect=%d/%d:colorspace=%s:range=%s", + "pixel_aspect=%d/%d:colorspace=%d:range=%d", ifp->width, ifp->height, ifp->format, ifp->time_base.num, ifp->time_base.den, sar.num, sar.den, - av_color_space_name(ifp->color_space), - av_color_range_name(ifp->color_range)); + ifp->color_space, ifp->color_range); if (fr.num && fr.den) av_bprintf(&args, ":frame_rate=%d/%d", fr.num, fr.den); snprintf(name, sizeof(name), "graph %d input from stream %d:%d", fg->index,