Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Zhao Zhili" <quinkblack@foxmail.com>
To: <ffmpeg-devel@ffmpeg.org>
Cc: 'Anton Khirnov' <anton@khirnov.net>
Subject: [FFmpeg-devel] [RFC] fftools/ffmpeg and libavdevice/sdl issue
Date: Wed, 13 Dec 2023 01:27:39 +0800
Message-ID: <tencent_873A89C0A1B68C6BAA002D689E7CF6ACEA0A@qq.com> (raw)

Now it's time to talk about the libavdevice/sdl issue.

SDL output is broken with ffmpeg multithread refactor. SDL 'muxer' write_header
and write_packet must be run in the same thread. And to make it work portable
and reliable, SDL 'muxer' must be run in main thread. It's a common requirement
for render to be run in main thread.

There are at least two trac tickets for the same issue: #10644 and #10649.

And there are two patches for the issue:
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20230918063728.198377-1-haihao.xiang@intel.com/
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20231101090115.10655-1-angus.chen@intel.com/

There patches might work on Linux, but not portable.

A simple workaround is pipe the output of ffmpeg to ffplay:

./ffmpeg -re -i /e/video/cctv.mp4 -an -f yuv4mpegpipe - |ffplay -

To fix it, another thread can be used to drive transcode rather than main thread.
A main loop should be created on main thread, and prepared to handle any special
tasks like render. It sounds a lot of work. I'm not sure if it worth for a single use case.
However, maybe we can have a libavfilter/vsink_preview after that.

What should we do?

_______________________________________________
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:[~2023-12-12 17:28 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12 17:27 Zhao Zhili [this message]
2023-12-12 18:04 ` Nicolas George
2023-12-13  4:19   ` Zhao Zhili
2023-12-13 17:30   ` [FFmpeg-devel] Mailinglist conduct [was: [RFC] fftools/ffmpeg and libavdevice/sdl issue] Ronald S. Bultje
2023-12-13  9:08 ` [FFmpeg-devel] [RFC] fftools/ffmpeg and libavdevice/sdl issue Anton Khirnov
2023-12-13  9:31   ` Zhao Zhili
2023-12-13 10:06     ` Anton Khirnov
2023-12-13 10:37       ` Zhao Zhili
2023-12-13 10:45         ` Nicolas George
2023-12-13 10:49         ` Anton Khirnov
2023-12-13  9:44   ` Nicolas George
2023-12-14  0:47   ` Stefano Sabatini
2023-12-14  7:48     ` Anton Khirnov
2023-12-14  9:35       ` Nicolas George
2023-12-16 15:18         ` Stefano Sabatini
2023-12-18 17:33           ` Anton Khirnov
2023-12-18 19:58             ` Michael Niedermayer
2023-12-18 20:02               ` Nicolas George
2023-12-19  7:23               ` Rémi Denis-Courmont
2023-12-19  9:29                 ` Nicolas George
2023-12-19 10:43                   ` Rémi Denis-Courmont
2023-12-19 12:51                     ` Nicolas George
2023-12-19 14:47                       ` Rémi Denis-Courmont
2023-12-19 16:58                 ` Michael Niedermayer
2023-12-19 18:48                   ` Rémi Denis-Courmont
2023-12-19 18:55                     ` Nicolas George
2023-12-19 19:36                     ` Michael Niedermayer
2023-12-15 12:37     ` Alexander Strasser via ffmpeg-devel

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=tencent_873A89C0A1B68C6BAA002D689E7CF6ACEA0A@qq.com \
    --to=quinkblack@foxmail.com \
    --cc=anton@khirnov.net \
    --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