michaelni changed the topic of #ffmpeg-devel to: Welcome to the FFmpeg development channel | Questions about using FFmpeg or developing with libav* libs should be asked in #ffmpeg | This channel is publicly logged | FFmpeg 7.1.1 has been released! | Please read ffmpeg.org/developer.html#Code-of-conduct
user23 has quit [Remote host closed the connection]
E81l7HT8T7sF9JdA has joined #ffmpeg-devel
E81l7HT8T7sF9JdA has quit [Quit: Leaving]
wbs has quit [Ping timeout: 248 seconds]
Martchus has joined #ffmpeg-devel
Martchus_ has quit [Ping timeout: 248 seconds]
jamrial has quit []
MisterMinister has quit [Ping timeout: 252 seconds]
wbs has joined #ffmpeg-devel
TheVibeCoder has joined #ffmpeg-devel
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
_whitelogger has joined #ffmpeg-devel
mkver has joined #ffmpeg-devel
Richardcavell_ has joined #ffmpeg-devel
bsFFFFFF has joined #ffmpeg-devel
ngaullier has joined #ffmpeg-devel
pelotron has quit [Ping timeout: 272 seconds]
pelotron has joined #ffmpeg-devel
Richardcavell_ has quit [Ping timeout: 260 seconds]
bsFFFFFF has quit [Ping timeout: 260 seconds]
bsFFFFFF has joined #ffmpeg-devel
<TheVibeCoder> And as leader of this project, it is your prerogative to decide whether you want.
<kierank> lol
<kierank> TheVibeCoder: factual statement
<TheVibeCoder> I intend to start a discussion about intend to start a discussion about intend to start discussion about leader soon.
<kierank> he is right about event loops though
<TheVibeCoder> libuv
<microchip_> libultraviolet ?
<TheVibeCoder> fully asynchronous IO lib
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ffmpeg-devel
jamrial has joined #ffmpeg-devel
rvalue- has joined #ffmpeg-devel
rvalue has quit [Ping timeout: 276 seconds]
rvalue- is now known as rvalue
<ramiro> haasn: did you ever get a chance to check the issue I reported about the new swscale code not working properly when built with clang?
ramiro has quit [Ping timeout: 252 seconds]
ramiro has joined #ffmpeg-devel
<ramiro> I'm using Debian clang version 14.0.6. a simple "./libswscale/tests/swscale -flags 0x100000 -unscaled 1 -src yuv444p -dst argb" gives different results per run, both with x86 and the c codepath.
<ramiro> haasn: I traced it back to extract_constant_rows <https://github.com/haasn/FFmpeg/blob/swscale6_clean/libswscale/ops_optimizer.c#L364>. apparently clang is not very happy with "SwsConst clear = {0};". clear.q4[2] can end up with garbage data.
<ramiro> if I memset the variable clear to 0 instead of using "= {0}", then the code works. it could be an issue that SwsConst is an union, but I believe using "= {0}" should be correct. I don't know whether this is a bug or not...
<kasper93> there was some chatter about this already on IRC
<kasper93> Basically in C "= {0}" initializes only first member of the union
<kasper93> in clang 20+ they added language extention to initialize whole thing, because linux depends on this https://github.com/llvm/llvm-project/commit/7a086e1b2dc05f54afae3591614feede727601fa
<kasper93> nevertheless, I think it would be good to handle it in standard C way in ffmpeg, if anything for support for older clang
cone-320 has joined #ffmpeg-devel
<cone-320> ffmpeg Derek Buitenhuis master:b58cca5a279b: tools: Remove libav-merge-next-commit
<cone-320> ffmpeg Derek Buitenhuis master:5bcff199d9f4: doc: Remove libav-merge.txt
user23 has joined #ffmpeg-devel
minimal has joined #ffmpeg-devel
<ramiro> kasper93: thanks! I found the discussion in the logs now.
MisterMinister has joined #ffmpeg-devel
ngaullier has quit [Remote host closed the connection]
microchip_ has quit [Quit: There is no spoon!]
microchip_ has joined #ffmpeg-devel
IndecisiveTurtle has joined #ffmpeg-devel
bsFFFFFF has quit [Quit: bsFFFFFF]
<jamrial> yeah
bsFFFFFF has joined #ffmpeg-devel
<llyyr> i can't believe ffmpeg got jia tan'd
* JEEB scrolls through the backlog he hasn't read yet
<JEEB> he even brings up the zlib fun in december
jlj35 has joined #ffmpeg-devel
<kierank> holy mother
bsFFFFFF has quit [Ping timeout: 252 seconds]
bsFFFFFF has joined #ffmpeg-devel
ngaullier has joined #ffmpeg-devel
Guest24 has joined #ffmpeg-devel
Guest24 has quit [Quit: Client closed]
cone-320 has quit [Quit: transmission timeout]
<TheVibeCoder> FFmpeg AI agent Premiere at 20:00 at your local dealer!
compnn has quit [Read error: Connection reset by peer]
compnn has joined #ffmpeg-devel
<beastd> I think if you really want to use LLMs for coding, you should use it for preliminary code review and **not** for generating code. still need to be careful to not let LLM nonsense in the review confuse you. TANSTAAFL :)
System_Error has quit [Remote host closed the connection]
System_Error has joined #ffmpeg-devel
bsFFFFFF has quit [Quit: bsFFFFFF]
bsFFFFFF has joined #ffmpeg-devel
<kasper93> LLMs do so much bs with bigger parts of code. IMHO they are useful to generate/transform some short snippets, see the result, take inspiration if usable. But copying code as-is is often just trash
<kasper93> even if it somehow works
<beastd> sure. i also suspect users of LLMs for generating code vastly overrate the gain. and underrate long term consequences and costs.
<kasper93> vp9_mc_template.c:439:1: warning: using simple load CSE after register allocation: 17119 basic blocks and 63597 registers; increase ‘--param max-gcse-memory’ above 132939 [-Wdisabled-optimization]
ngaullier has quit [Remote host closed the connection]
<kasper93> this doesn't look great
<kasper93> same for swscale_unscaled.c:2375 ‘planarCopyWrapper’
iive has joined #ffmpeg-devel
secondcreek has joined #ffmpeg-devel
Everything has joined #ffmpeg-devel
psykose has quit [Remote host closed the connection]
Everything has quit [Quit: leaving]
jamrial has quit [Read error: Connection reset by peer]
jamrial has joined #ffmpeg-devel
<BtbN> How can a seemingly central and important API like SChannel be so horribly under-documented?
<BtbN> Hard to find anything concrete about it
<TheVibeCoder> security through obscurity
<BtbN> I can't for the life of me get SChannel to open a (D)TLS server. Only obscure and generic errors left and right.
<BtbN> Client part works just fine though...
<BtbN> Also seemingly zero examples for an SChannel server out in the wild
<JEEB> the rust native_tls library seems to have server implementation mapping against schannel backend, but no idea how tested that is
<JEEB> it has nice FIXME in the accept function regarding > FIXME we're probably missing the certificate chain?
<BtbN> I'm just trying to make it work _at all_ for now
<BtbN> with a self signed cert which it itself previously generated
<BtbN> but no matter what I try, it complains about what seems like being unable to access the private key
<BtbN> but the private key seems fine to me at least
<JEEB> at least searching in ddg for "schannel server example" does bring up what seem to be server side examples
<nevcairiel> I doubt many people use these low level APIs, hence the low experience all around the web
<BtbN> But _someone_ has to use it
<BtbN> So there should be documentation on how to do it
<BtbN> I also feel like I understand how it works by now. But given it throws weird errors at me, clearly I got something wrong.
<BtbN> JEEB: where? I can find literally non for server mode.
<wbs> BtbN: are you trying to do schannel server mode for regular TLS, or DTLS?
<BtbN> ideally both
<BtbN> but it fails at a point where there is no distinction yet anyway
bsFFFFFF has quit [Quit: bsFFFFFF]
<wbs> right
<wbs> I would kinda expect regular mode to need to exist somewhere, while it doesn't surprise me that DTLS mode would be too rare to exist in example form anywhere (or even work)
<BtbN> AcquireCredentialsHandle is what's failing on me. Returning SEC_E_UNKNOWN_CREDENTIALS. With Internal Error Code 10001. Whatever that's supposed to mean.
<BtbN> Event Viewer says that it can't access/find the private key. But when I manually try to access it, it works just fine.
<BtbN> Exporting the cert to PEM or into the cert store also works fine, including the private key.
<BtbN> I've been tacking more and more extensions onto the cert, to get it closer and closer to the one ASP.NET Generated for its local development server
<BtbN> I'm at a near perfect match now, but still same issue. Also kinda makes sense, given it's complaining about the private key.
<BtbN> Just simply Googling for SECPKG_CRED_INBOUND, which is mandatory for any SChannel server, comes back empty.
<BtbN> Which tells me that there is no actual example code anywhere?
<BtbN> Though not sure how much the example could would help me. They all neglect the cert, or just magically load it from the store and call it a day.
<ePirat> BtbN, google got very bad starting a few years back for single word queries for obscure stuff like that
bsFFFFFF has joined #ffmpeg-devel
<BtbN> duckduckgo got nothing either, except a simple example saying "When it's a server instead of a client, pass SECPKG_CRED_INBOUND instead!"
IndecisiveTurtle has quit [Ping timeout: 252 seconds]
<BtbN> What's driving me nuts is... if I load ASP.NET example localhost certificate, AcquireCredentialsHandle works! But I can't tell what is different about mine.
bsFFFFFF has quit [Quit: bsFFFFFF]
<iive> BtbN, do you have ways to inspect what it does, something like strace if it reads local data, or wireshark for network... ideally schannel with debug messages?
<BtbN> I'm not aware of any such ways
<BtbN> The "debug info" it gives me is "internal error state 10001"
<iive> can you find the source that returns the error? like putting printf before all "return ERROR(10001);" lines
<BtbN> It's logged in the Windows Event Viewer
<iive> oh, it's windows...
<BtbN> the only extend of error I get in the code is it returning SEC_E_UNKNOWN_CREDENTIALS
<iive> it's not opensource library I guess.
<BtbN> It's the OS built in TLS library
TheVibeCoder has quit [Ping timeout: 260 seconds]
<iive> so no peeking into the implementation...
<iive> maybe check the "wine" implementation of that library
<BtbN> I _think_ wine flat out emulates the native one from windows
<BtbN> i.e. the closed source DLLs
<iive> you mean, they don't have source implementation :|
<BtbN> I'm not sure. I feel like I'd have long come accross it, given I've been googling for various schannel macros and functions, and the results often came up empty except MSDN
<iive> you could try filemon or process explorer from ms sysinternals suite, they also show registry access.
<BtbN> On a slightly related note, WHY does whip outsource parts of its code into tls_openssl.c?
<BtbN> ff_ssl_read_key_cert does way too much
<BtbN> it should load the cert from a file or buffer at best
<BtbN> not a bloody url it then downloads
<iive> ^_^
<BtbN> I've now changed some stuff around, and now I'm getting a UI prompt to insert a compatible smartcart oO
<pross> g
<BtbN> Hey, I just added the few missing bits for normal TLS server mode, and it appear to work perfectly fine
<kasper93> BtbN: have you seen this sample? Maybe it helps? https://github.com/david-maw/StreamSSL
<BtbN> Hm, given it's only TLS, not DTLS, sadly not much. But it's a nice find. Looks like the most complete SChannel server implementation yet
mkver has quit [Ping timeout: 245 seconds]
<BtbN> I think it actually largely works now...
<BtbN> I looked at https://learn.microsoft.com/en-us/windows/win32/api/schannel/ns-schannel-schannel_cred, which says to use SCH_CREDENTIALS instead. But that has no grbitEnabledProtocols field, which I used to signal DTLS. So I assumed it'd just work, cause I tell it about DTLS later on anyway.
<iive> BtbN, glad you found a solution :)
<BtbN> Well, the field will go away in future SDK versions. And it seems like they... forgot about DTLS?
<BtbN> Or I'm missing something
MisterMinister has quit [Ping timeout: 272 seconds]
MisterMinister has joined #ffmpeg-devel
lemourin has quit [Remote host closed the connection]
lemourin has joined #ffmpeg-devel
lemourin has quit [Remote host closed the connection]
<BtbN> https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/tls_schannel.c#L259 lol, this is just straight up broken? Comparing against https://learn.microsoft.com/en-us/windows/win32/secauthn/extra-buffers-returned-by-schannel it should check for that in the OUTPUT buffers?!
<BtbN> How does the schannel code work at all, what
lemourin has joined #ffmpeg-devel
iive has quit [Quit: They came for me...]