Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Devin Heitmueller <devin.heitmueller@ltnglobal.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] Playout to DeckLink will wait for all buffered frames before stopping.
Date: Tue, 8 Jul 2025 12:22:04 -0400
Message-ID: <CAHGibzGBPYiqk_cgfq2aPQ=NjsE+CLgKEs3JU+5Z0yh+tjGHgg@mail.gmail.com> (raw)
In-Reply-To: <E11760FF-196F-493C-AF7A-A217BD48AB85@gmail.com>

Hi Marvin,

On Tue, Jul 8, 2025 at 11:19 AM Marvin Scholz
<epirat07-at-gmail.com@ffmpeg.org> wrote:
> I think even if a frame is schedule "far" in the future, if I want them
> all played out then it should probably still wait, no? As what is considered
> "far" is a matter of interpretation…

That probably depends.  If the clock gets screwed up and a frame is
submitted with a PTS five hours into the future you don't want it to
stall for five hours.  The driver lets you control the number of
buffers available (and has limits on such), but IIRC not explicitly on
the timestamps submitted (which dictates when the frame gets played
out).

But yeah, "far" is a matter of interpretation.  In practice you
generally won't see frames queued more than a second in advance.  I
think we can agree on a reasonable threshold that prevents it getting
stuck in a loop for potentially hours if the clocks were bad but
doesn't cause issues in practice (e.g. 2 seconds?).

> Also there should likely be an option to opt in to this new behavior?

Agreed, this behavior should probably be configurable.  I would argue
though that the behavior provided by this patch should be the default.
AFAIK, it wasn't an intentional decision to terminate before all
buffers were output, and flushing pending data on close is the
standard behavior for other muxers.

On a personal note, I work with realtime decoding and thus the
existing behavior is my preference (since I want it to terminate
immediately).  But I think my use case is far less common than people
who simply want to play out their file based content to the Blackmagic
device.

Devin

-- 
Devin Heitmueller, Senior Software Engineer
LTN Global Communications
o: +1 (301) 363-1001
w: https://ltnglobal.com  e: devin.heitmueller@ltnglobal.com
_______________________________________________
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-07-08 16:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-08  1:39 Matt via ffmpeg-devel
2025-07-08 14:54 ` Devin Heitmueller
2025-07-08 15:19   ` Marvin Scholz
2025-07-08 16:22     ` Devin Heitmueller [this message]
2025-07-08 17:08       ` Marvin Scholz
2025-07-08 17:13         ` Devin Heitmueller
2025-07-08 20:11           ` Marton Balint

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='CAHGibzGBPYiqk_cgfq2aPQ=NjsE+CLgKEs3JU+5Z0yh+tjGHgg@mail.gmail.com' \
    --to=devin.heitmueller@ltnglobal.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