ffmpeg broadcast video often framedrop

Hi, I make a broadcast server with mediasoup and ffmpeg.

but, I often find framedrop. because of nack count is many.
( video is framedrop // audio is fine )

my server
(ffmpeg (rtmp to rtp) ) β†’ (PlainTransport - PipeTransport) β†’ (PipeTransport - WebrtcTransport) β†’ web client

I check Producer and Consumer getStats.
stats show unusual data.

I attach my ffmpeg code

ffmpeg -re -i 'rtmp://localhost:1935/live/{stream_id}' \
-map 0:a:0 -acodec libopus\
-map 0:v:0 -pix_fmt yuv420p -c:v libvpx -crf 23 -b:v 2000k \
-preset ultrafast -cpu_used 4
-f tee [select=v:f=rtp:ssrc=22222222:payload_type=101]rtp://127.0.0.1:{videoRtp.tuple.localPort}?rtcpport={videoRtp.rtcpTuple.localPort}

first pipetransport server stats

[
  {
    bitrate: 2769146,
    byteCount: 303236557,
    firCount: 0,
    fractionLost: 0,
    kind: 'video',
    mimeType: 'video/VP8',
    nackCount: 0,
    nackPacketCount: 0,
    packetCount: 218633,
    packetsDiscarded: 0,
    packetsLost: 335,
    packetsRepaired: 0,
    packetsRetransmitted: 0,
    pliCount: 198,
    roundTripTime: 0.0152587890625,
    score: 10,
    ssrc: 675818638,
    timestamp: 68003191,
    type: 'outbound-rtp'
  }
]

second server webrtc transport stats

[
  {
    bitrate: 2101325,
    byteCount: 324480336,
    firCount: 0,
    fractionLost: 0,
    kind: 'video',
    mimeType: 'video/VP8',
    nackCount: 32533,
    nackPacketCount: 51016,
    packetCount: 233946,
    packetsDiscarded: 0,
    packetsLost: 746,
    packetsRepaired: 43749,
    packetsRetransmitted: 43770,
    pliCount: 109,
    roundTripTime: 3.72314453125,
    rtxSsrc: 858126961,
    score: 10,
    ssrc: 480979860,
    timestamp: 68080091,
    type: 'outbound-rtp'
  },
  {
    bitrate: 2101325,
    byteCount: 324480336,
    firCount: 0,
    fractionLost: 0,
    jitter: 0,
    kind: 'video',
    mimeType: 'video/VP8',
    nackCount: 0,
    nackPacketCount: 0,
    packetCount: 233946,
    packetsDiscarded: 0,
    packetsLost: 725,
    packetsRepaired: 0,
    packetsRetransmitted: 0,
    pliCount: 197,
    score: 10,
    ssrc: 970671065,
    timestamp: 68080091,
    type: 'inbound-rtp'
  }
]

I think between first server and second server pipe transport stats is normal.
but, between second server and web client web transport stats is bad.

I try to low bitrate ( 1000k ) & high bitrate ( 4000k )

At result.
low bitrate nack ( 10nackcount / s ) β†’ sometimes frame drop
high bitrate nack ( 80nackcount / s ) β†’ video not showing

Second test,
I try to use WebrtcTransport Instead of PlainTransport.

same low bitrate ( 1000k ) & high bitrate ( 4000k )
At result. two cases is normal.

When I use ffmpeg, what’s the problem??

Who knows??

@ksg
I face similar problem by gstreamer which broadcast rtp to mediasoup server.
Have you solved this issue?