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 37D1B44814 for ; Sun, 28 May 2023 09:15:32 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3FA6868C21C; Sun, 28 May 2023 12:14:59 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3F89E68C1E6 for ; Sun, 28 May 2023 12:14:50 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 041262404F5 for ; Sun, 28 May 2023 11:14:50 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 8EhrpgB2Hr8J for ; Sun, 28 May 2023 11:14:49 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 798C42404EC for ; Sun, 28 May 2023 11:14:47 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 1E3F83A03F3 for ; Sun, 28 May 2023 11:14:41 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sun, 28 May 2023 11:13:54 +0200 Message-Id: <20230528091416.17927-2-anton@khirnov.net> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230528091416.17927-1-anton@khirnov.net> References: <20230528091416.17927-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 02/24] fftools/ffmpeg: add logging for creating output streams 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: --- fftools/ffmpeg_mux_init.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index de39b360af..033e55d76e 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -1052,6 +1052,19 @@ static OutputStream *ost_add(Muxer *mux, const OptionsContext *o, av_strlcat(ms->log_name, "/copy", sizeof(ms->log_name)); } + av_log(ost, AV_LOG_VERBOSE, "Created %s stream from ", + av_get_media_type_string(type)); + if (ist) + av_log(ost, AV_LOG_VERBOSE, "input stream %d:%d", + ist->file_index, ist->index); + else if (ofilter) + av_log(ost, AV_LOG_VERBOSE, "complex filtergraph %d:[%s]\n", + ofilter->graph->index, ofilter->name); + else if (type == AVMEDIA_TYPE_ATTACHMENT) + av_log(ost, AV_LOG_VERBOSE, "attached file"); + else av_assert0(0); + av_log(ost, AV_LOG_VERBOSE, "\n"); + ost->pkt = av_packet_alloc(); if (!ost->pkt) report_and_exit(AVERROR(ENOMEM)); @@ -1451,6 +1464,10 @@ loop_end: "in any defined filter graph, or was already used elsewhere.\n", map->linklabel); exit_program(1); } + + av_log(mux, AV_LOG_VERBOSE, "Creating output stream from an explicitly " + "mapped complex filtergraph %d, output [%s]\n", fg->index, map->linklabel); + ost_add(mux, o, ofilter->type, NULL, ofilter); } else { ist = input_files[map->file_index]->streams[map->stream_index]; @@ -1517,6 +1534,9 @@ static void of_add_attachments(Muxer *mux, const OptionsContext *o) avio_read(pb, attachment, len); memset(attachment + len, 0, AV_INPUT_BUFFER_PADDING_SIZE); + av_log(mux, AV_LOG_VERBOSE, "Creating attachment stream from file %s\n", + o->attachments[i]); + ost = ost_add(mux, o, AVMEDIA_TYPE_ATTACHMENT, NULL, NULL); ost->attachment_filename = o->attachments[i]; ost->par_in->extradata = attachment; @@ -1550,11 +1570,21 @@ static void create_streams(Muxer *mux, const OptionsContext *o) case AVMEDIA_TYPE_AUDIO: auto_disable_a = 1; break; case AVMEDIA_TYPE_SUBTITLE: auto_disable_s = 1; break; } + + av_log(mux, AV_LOG_VERBOSE, "Creating output stream from unlabeled " + "output of complex filtergraph %d.", fg->index); + if (!o->nb_stream_maps) + av_log(mux, AV_LOG_VERBOSE, " This overrides automatic %s mapping.", + av_get_media_type_string(ofilter->type)); + av_log(mux, AV_LOG_VERBOSE, "\n"); + ost_add(mux, o, ofilter->type, NULL, ofilter); } } if (!o->nb_stream_maps) { + av_log(mux, AV_LOG_VERBOSE, "No explicit maps, mapping streams automatically...\n"); + /* pick the "best" stream of each type */ if (!auto_disable_v) map_auto_video(mux, o); @@ -1565,6 +1595,8 @@ static void create_streams(Muxer *mux, const OptionsContext *o) if (!auto_disable_d) map_auto_data(mux, o); } else { + av_log(mux, AV_LOG_VERBOSE, "Adding streams from explicit maps...\n"); + for (int i = 0; i < o->nb_stream_maps; i++) map_manual(mux, o, &o->stream_maps[i]); } -- 2.40.1 _______________________________________________ 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".