Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Jack Lau <jacklau1222gm@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] avformat/whip: set this muxer as experimental
Date: Thu, 5 Jun 2025 23:12:39 +0800
Message-ID: <9AE74A60-8FE3-4CF5-A04B-2D56F8F37D3D@gmail.com> (raw)
In-Reply-To: <0a4d3d7d-a9c7-4617-b9fa-a2af9afa7dc9@gmail.com>



> On Jun 5, 2025, at 22:56, James Almer <jamrial@gmail.com> wrote:
> 
> On 6/5/2025 11:54 AM, Jack Lau via ffmpeg-devel wrote:
>> Signed-off-by: Jack Lau <jacklau1222@qq.com>
>> ---
>>  libavformat/whip.c | 6 ++++++
>>  1 file changed, 6 insertions(+)
>> diff --git a/libavformat/whip.c b/libavformat/whip.c
>> index 0671e23635..e7cd57400d 100644
>> --- a/libavformat/whip.c
>> +++ b/libavformat/whip.c
>> @@ -1733,6 +1733,12 @@ static av_cold int whip_init(AVFormatContext *s)
>>      int ret;
>>      WHIPContext *whip = s->priv_data;
>>  +    if (s->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
>> +        av_log(s, AV_LOG_ERROR,
>> +            "WHIP: This muxer is experimental, please set -strict experimental in order to enable it\n");
>> +        return AVERROR_EXPERIMENTAL;
>> +    }
>> +
>>      if ((ret = initialize(s)) < 0)
>>          goto end;
> 
> I think the AVFMT_EXPERIMENTAL flag is used for this.
I’ve tried this, but the whip runs normally even I don’t set `-strict experimental`

@@ -1913,7 +1913,7 @@ const FFOutputFormat ff_whip_muxer = {
     .p.long_name        = NULL_IF_CONFIG_SMALL("WHIP(WebRTC-HTTP ingestion protocol) muxer"),
     .p.audio_codec      = AV_CODEC_ID_OPUS,
     .p.video_codec      = AV_CODEC_ID_H264,
-    .p.flags            = AVFMT_GLOBALHEADER | AVFMT_NOFILE,
+    .p.flags            = AVFMT_GLOBALHEADER | AVFMT_NOFILE | AVFMT_EXPERIMENTAL,
     .p.priv_class       = &whip_muxer_class,
     .priv_data_size     = sizeof(WHIPContext),
     .init               = whip_init,

> ffmpeg -re -i input.mp4 -c copy -f whip "http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream"
ffmpeg version N-119824-gbdf45d079e Copyright (c) 2000-2025 the FFmpeg developers
  built with Apple clang version 17.0.0 (clang-1700.0.13.5)
  configuration: --enable-gpl --enable-shared --disable-static --disable-optimizations --enable-libx264 --enable-libx265 --enable-libopus --enable-sdl2 --enable-debug=3 --disable-stripping --enable-openssl --enable-version3
  libavutil      60.  3.100 / 60.  3.100
  libavcodec     62.  3.101 / 62.  3.101
  libavformat    62.  0.102 / 62.  0.102
  libavdevice    62.  0.100 / 62.  0.100
  libavfilter    11.  0.100 / 11.  0.100
  libswscale      9.  0.100 /  9.  0.100
  libswresample   6.  0.100 /  6.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf60.9.100
    comment         : vid:v0300fg10000cgho9hjc77u1ugkqvn10
  Duration: 00:01:47.40, start: 0.000000, bitrate: 5716 kb/s
  Stream #0:0[0x1](und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 5613 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc60.21.100 libx264
  Stream #0:1[0x2](und): Audio: opus (Opus / 0x7375704F), 48000 Hz, stereo, fltp, 95 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
[WHIP muxer @ 0x119808200] WHIP: Muxer state=11, buffer_size=4096, max_packet_size=1184, elapsed=96ms(init:9,offer:0,answer:25,udp:0,ice:5,dtls:54,srtp:0)
Output #0, whip, to 'http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    comment         : vid:v0300fg10000cgho9hjc77u1ugkqvn10
    encoder         : Lavf62.0.102
  Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 5613 kb/s, 30 fps, 30 tbr, 90k tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc60.21.100 libx264
  Stream #0:1(und): Audio: opus (Opus / 0x7375704F), 48000 Hz, stereo, fltp, 95 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
Press [q] to stop, [?] for help
[WHIP muxer @ 0x119808200] WHIP: Dispose resource http://localhost:1985/rtc/v1/whip/?action=delete&token=i540z3223&app=live&stream=livestream&session=a2093739:93b7d050 ok
[out#0/whip @ 0x14a905320] video:1738KiB audio:25KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown
frame=   62 fps= 32 q=-1.0 Lsize=N/A time=00:00:02.03 bitrate=N/A speed=1.04x elapsed=0:00:01.94

I noticed the AVFMT_EXPERIMENTAL flag was used in this code:

format.c
186     while ((fmt1 = av_demuxer_iterate(&i))) {
187         if (fmt1->flags & AVFMT_EXPERIMENTAL)                                                                                        
188             continue;

So maybe the AVFMT_EXPERIMENTAL is only valid to demuxer for now?
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org <mailto:ffmpeg-devel@ffmpeg.org>
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org <mailto:ffmpeg-devel-request@ffmpeg.org> with subject "unsubscribe".

_______________________________________________
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".

      reply	other threads:[~2025-06-05 15:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05 14:54 Jack Lau via ffmpeg-devel
2025-06-05 14:55 ` Kieran Kunhya via ffmpeg-devel
2025-06-05 14:56 ` James Almer
2025-06-05 15:12   ` Jack Lau [this message]

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=9AE74A60-8FE3-4CF5-A04B-2D56F8F37D3D@gmail.com \
    --to=jacklau1222gm@gmail.com \
    --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