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>
Cc: Matthew Rademaker <matthew@watchgood.com>
Subject: Re: [FFmpeg-devel] Advice on patch: Decklink flushes most buffered frames at end of video instead of displaying them
Date: Wed, 5 Mar 2025 06:50:42 -0500
Message-ID: <CAHGibzEtQbPZsbuUWAMMTy8c=3TMkRbDgiVqsAWUjdpdwACNkA@mail.gmail.com> (raw)
In-Reply-To: <CAGBDY-suNJVT1F7cga+8uW7xfTepdp1GfnG_KRPkfCWLqWAogA@mail.gmail.com>

On Tue, Mar 4, 2025 at 10:47 PM Matthew Rademaker via ffmpeg-devel
<ffmpeg-devel@ffmpeg.org> wrote:
>
> When playing out video to a Decklink SDI 4K card I've found that all/most
> of the buffered frames get flushed instead of being displayed, essentially
> shortening the video by the amount of pre-roll. I found a way to fix this
> by adding a counter of outstanding frames, then delaying the call to
> StopScheduledPlayback until all frames are returned.
>
> I would submit this as a patch, but this is my first attempt at any ffmpeg
> development so I wanted to see if this was the best way to fix this issue.
> Are the outstanding frames already counted some other way? Is blocking via
> sleep ideal? The StopScheduledPlayback has a pts parameter, which I assume
> means that it should only stop playback at that time - should this not
> prevent the issue I am seeing? Why would it flush the frames?

Thanks for reaching out.

This is a longstanding issue that has been reported before, and I just
never got around to submitting a fix for (since for my particular use
case, I actually want it to exit immediately, although I realize this
isn't the common use case).  The correct fix is simply to change the
StopScheduledPlayback to not exit immediately (for which there is a
specific argument, IIRC).  You shouldn't need to do any sort of
counters/timers to achieve the desired behavior.

If you still can't get it to work, let me know and I'll take a look
and submit the appropriate patch.

Regards,

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-03-05 11:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-05  3:47 Matthew Rademaker via ffmpeg-devel
2025-03-05 11:50 ` Devin Heitmueller [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='CAHGibzEtQbPZsbuUWAMMTy8c=3TMkRbDgiVqsAWUjdpdwACNkA@mail.gmail.com' \
    --to=devin.heitmueller@ltnglobal.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=matthew@watchgood.com \
    /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