Skip to content

Instantly share code, notes, and snippets.

View RenaKunisaki's full-sized avatar
🦊
Hacking a lamp

Rena Kunisaki RenaKunisaki

🦊
Hacking a lamp
View GitHub Profile
@RenaKunisaki
RenaKunisaki / lolav.txt
Created February 17, 2025 20:44
libav is too complicated for deepseek-14b
>>> What's the correct way to determine a frame's play timestamp (as UNIX timestamp) in libav?
<think>
Okay, I need to figure out how to get the play timestamp of each frame as a UNIX timestamp using libav. Hmm, I remember that libav has some
structures and functions for handling frames and streams.
So first, I think about the steps involved. Each frame has its own presentation time, right? In libav, frames are part of a stream context, so
maybe I need to access each stream's parameters.
I recall there's an AVStream struct which contains information about the stream, including a timebase. The timebase is used to convert