Too many packets buffered for output stream 0:0 means ffmpeg's muxing queue filled while it waited for a late stream. Raise -max_muxing_queue_size, or send the job to ReelSDK's ffmpeg 8.1 at $0.02 per compute minute.

Too many packets buffered for output stream 0:0

We hit it with ffmpeg 6.0 on a 48-second, 60 fps recording whose audio began 20 seconds in. ReelSDK's ffmpeg 8.1 kept every frame of it, while 6.0 exited with code 0 and quietly lost about one in ten.

ErrorsUpdated

ffmpeg 6.0, video copied, audio from 20 s, 177 times, exit code 0
[vost#0:0/copy @ 0x28c755c0] Too many packets buffered for output stream 0:0.
[vost#0:0/copy @ 0x28c755c0] Error submitting a packet to the muxer
[vost#0:0/copy @ 0x28c755c0] Too many packets buffered for output stream 0:0.
[vost#0:0/copy @ 0x28c755c0] Error submitting a packet to the muxer
frame= 1503 fps=1190 q=-1.0 Lsize=   92043kB time=00:00:47.98 bitrate=15712.4kbits/s speed=  38x

Source: ffmpeg docs: advanced options, checked November 2026.

Where it shows up

While you copy one stream and encode another

You copy the video and encode the audio, and the audio starts late. Our test file is a 48-second, 60 fps vertical video at about 30 Mb/s whose audio begins 20 seconds in, run through ffmpeg -i late.mp4 -c:v copy -c:a aac out.mp4.

ffmpeg 6.0 printed Too many packets buffered for output stream 0:0. 177 times, each followed by Error submitting a packet to the muxer, and still exited with code 0. ffmpeg 4.4 treats the overflow as fatal: with the queue threshold lowered to 1 MB to reach it, it printed the same message, then Conversion failed!, and exited with code 1.

Why it happens

ffmpeg holds packets until every stream has one

ffmpeg's docs say it plainly: when transcoding audio or video, ffmpeg will not begin writing the output until it has one packet for each such stream, and packets for the other streams wait in a buffer meanwhile. On ffmpeg 6.0, our AAC encoder had nothing to give until 20 seconds in, so the copied video piled up.

That buffer has two limits per output stream. It grows freely up to 50 MB (-muxing_queue_data_threshold), and past that only to 128 packets (-max_muxing_queue_size). More than 50 MB of video was waiting before the first audio packet, so ffmpeg 6.0 dropped one video packet per message, 177 in all, about a tenth of the video. The other versions we ran never hit the limits on this file with default settings.

Causes and fixes

What we ran on the late-audio file

What we ran on the late-audio file
RunWhat we sawNext step
ffmpeg 6.0, defaults177 messages, 177 frames lost, exit code 0Raise the queue limit
ffmpeg 6.0, -max_muxing_queue_size 1024Still 177 messagesGo higher
ffmpeg 6.0, -max_muxing_queue_size 2048 or moreNo message, every frameDone
ffmpeg 6.0, -muxing_queue_data_threshold 209715200No message, every frameDone
ffmpeg 4.4, threshold cut to 1 MBConversion failed!, exit code 1Same options
ffmpeg 7.0, 7.1 and 8.1, defaultsNo message, every frameNothing to fix

Source: ffmpeg docs: advanced options, checked November 2026.

The local fix

Raise the queue limit, then count the frames

Add -max_muxing_queue_size as an output option, after -i and before the output name. On ffmpeg 6.0, 1024 still gave 177 messages; 2048, 4096 and 9999 each gave none and every frame. Raising -muxing_queue_data_threshold to 200 MiB (209715200) worked as well.

Then check the frame count, because a 6.0 run that lost frames still exits with code 0. A newer ffmpeg also fixed this file: 7.0, 7.1 and 8.1 wrote every frame with default settings, and 8.1 still did with the threshold cut to 1 MB.

fix.sh
ffmpeg -i late.mp4 -c:v copy -c:a aac -max_muxing_queue_size 4096 out.mp4

# or let the queue grow further before the packet cap applies
ffmpeg -i late.mp4 -c:v copy -c:a aac -muxing_queue_data_threshold 209715200 out.mp4
count-frames.sh
# 1503 on the broken 6.0 run, 1680 after the fix
ffprobe -v error -select_streams v:0 -count_packets \
  -show_entries stream=nb_read_packets -of csv=p=0 out.mp4

Skip the binary

Or run the same args on ffmpeg 8.1

POST /v1/ffmpeg runs ffmpeg 8.1 on a fresh machine per job. We sent the same 105.5 MB file with the same args and got every frame back, with no queue option, about 7 seconds after the request.

Both options are on the API's allowlist if a file needs them, and inputs can be up to 500 MB each. Compute is $0.02 per minute, billed per second, so this copy cost well under a cent.

copy.mjsTry it
const res = await fetch("https://api.reelsdk.com/v1/ffmpeg?wait=60", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.REELSDK_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "inputs": {
      "in.mp4": "https://api.reelsdk.com/f/lib/in/errors/late-audio.mp4"
    },
    "args": ["-i", "in.mp4", "-c:v", "copy", "-c:a", "aac", "out.mp4"],
    "outputs": ["out.mp4"]
  }),
});
const { job } = await res.json();
The late-audio file through ffmpeg 8.1 on the API, with every frame kept.Input: late-audio input

Spot a late stream before you convert

ffprobe prints each stream's start time. On our file the video starts at 0 and the audio at about 20 seconds; at about 30 Mb/s, that gap holds more video than the 50 MB threshold, which is the setup that tripped ffmpeg 6.0. If you see a gap like that, add the queue option up front or use a newer ffmpeg.

start-times.sh
ffprobe -v error -show_entries stream=codec_type,start_time -of compact late.mp4
# stream|codec_type=video|start_time=0.000000
# stream|codec_type=audio|start_time=19.978000

FAQ

Questions, answered

What value should I use for -max_muxing_queue_size?

Enough packets to cover the wait for the late stream. On our file, 1024 was too low and 2048 was enough; the fix above uses 4096. The queue sits in memory, so a high cap only costs RAM when packets really pile up.

Why does it name stream 0:0 when the audio is late?

The message names the stream whose packets are piling up, not the one ffmpeg waits for. Our copied video was output stream 0:0, and it filled the queue while the AAC encoder had nothing until 20 seconds in.

Is it an error or a warning?

It depends on the version. ffmpeg 4.4 stopped with Conversion failed! and exit code 1. ffmpeg 6.0 kept going, dropped one video packet per message and exited with code 0, which is worse: the file is short and nothing failed.

Do I need these options on the API?

Not for this file: ffmpeg 8.1 on the API wrote every frame with default settings. Both options are allowed in args if a file of yours needs them.

Ready to build?

Ship video from your app today

Your first $0.50 is free, and one key covers every endpoint.

Moonlit lake with a lit cabin under the mountains