From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 02BC847C32 for ; Wed, 13 Dec 2023 09:32:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BDBDA68D0B5; Wed, 13 Dec 2023 11:32:01 +0200 (EET) Received: from out203-205-251-60.mail.qq.com (out203-205-251-60.mail.qq.com [203.205.251.60]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 98C2968CFEC for ; Wed, 13 Dec 2023 11:31:52 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1702459909; bh=1/vqRkHc1M7Bz4nkl2mAIbbyjE914eFnI82SN4BsBjU=; h=From:Subject:Date:References:To:In-Reply-To; b=bZbvSxzECpjUN8T2L/ZV+jWpVhQtTULFbkPHNOIKDxqylToTvAyN/kHNzXbrczfa+ q2fQ7v9gAILiuPGOYFbljPnwZ8H7Zb7ScZf3KyHf30rtbJCp/Q6UXln8bYubus+9VP dw6YCnbo0MbRUuXHavpXzhKz0CXQ51HNaJftDCmU= Received: from smtpclient.apple ([119.147.10.197]) by newxmesmtplogicsvrszc5-1.qq.com (NewEsmtp) with SMTP id 7F0122B1; Wed, 13 Dec 2023 17:31:48 +0800 X-QQ-mid: xmsmtpt1702459908tc1ccm48e Message-ID: X-QQ-XMAILINFO: NQR8mRxMnur91gIxrQVtefQ6I6GS2B+4cxyZTOpHmRshKuRjH8xI+kDezbL7LD VKA2B3y+XAfLUqi7m5nEsd/sYReJizjRelU7BNYydxqkyMW+eNRqDT34UXS7S77+xXiL3sjDX16r iThDd42IkeBNtmO44Fi61aDjGani51azQ6MNfThWBEzCkWFtkpC8D4/T5CE6wykhb9gG0L1c7wH1 DMK8rxYaEQwAa5ldkxuSoWAMiP5pc76m+GrWBGyTgwhzwbG2L2exDn9haHBWXh22w2YxC6myZooW BYLrWq0oHRK2OC/Di7Xh14G4VYxvXPIobVofZnrc9C/ST3BbivJDCIF5FkRqNZuGA6rYiT9myd4s mKZLt+k2aeWxnTpILfZcVcXLl6DPl3/dJpfqvD7bi8QultKIFiJFTKQpsrpQv5391GnOw1Ndxgln 5bjZ2MkySpVbSH7PHOWvsdySrnoiT8wf2BpLIZ2S50mlpkaGnuS+9k7NDAhVJe8PrHSWwyTzabJt vxZqlzbdXQbhQ6QzaDKSabhadeTYixBGE0IeiwL+GnKv47MIrUDNA5ifU+azfaXtn1tnzSolwcEd BP6LP/B1itkWE0UmETnvGuzSmoYzC/dxxTeNxqjOSZBhVqE9QzpZFipZK3p/btHq4/6VphzPiwIN UfrvQ3UWPx/vkMhFUY49gM2EkD6BvniFu9jFzqqRsfozEKvX2sqHAbswGHMVmsNkSM+4pX+QaYYj RxjpIadQVBm1sbJjJ74jlDv2K33vohNTi/oO/JT62eQAWnbVqbd1LnZXG+2wald7rvScfg4FYwFe VZWDZrESE/P2HCkQQI9EbuKcN3UVjXoK0HpZnfs32l5+N8bdRc5auPyH3pkNtlKhkYba4d08iQXI Zo1S6cF/MiwfD/OVdXfQ+i8p8hsDKvxUWqc6nQ5BWlKDqtm0BmTwkHpAMX927pk8XOjgpBVJWYXX /kSq7MlvMHIfVXP6UNGm8fXYMT7Czi99w9kdDFzLRPoFzyKjL+DmKRKwrdQaxYH8GTY7DSj7Q85E /S57t78Q== X-QQ-XMRINFO: NI4Ajvh11aEj8Xl/2s1/T8w= From: Zhao Zhili Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Date: Wed, 13 Dec 2023 17:31:38 +0800 References: <170245852534.8914.12550775596488175101@lain.khirnov.net> To: FFmpeg development discussions and patches In-Reply-To: <170245852534.8914.12550775596488175101@lain.khirnov.net> X-OQ-MSGID: X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [RFC] fftools/ffmpeg and libavdevice/sdl issue X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: > On Dec 13, 2023, at 17:08, Anton Khirnov wrote: > > Quoting Zhao Zhili (2023-12-12 18:27:39) >> 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? > > Honestly I don't see how this could be done in ffmpeg CLI without > disgusting hacks, but before that the question is: why is there an SDL > "muxer" and why would anyone want to use it in ffmpeg CLI? What actual > use cases does it serve that cannot be better handled otherwise? I pasted wrong tickets, they are #10625 and #10649. https://trac.ffmpeg.org/ticket/10625 The use case is realtime preview. The function lavd/sdl2 provides is limited. A vsink_preview filter is more appropriate. It has the same thread issue with libavfilter. > > -- > Anton Khirnov > _______________________________________________ > 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". _______________________________________________ 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".