Hi, On Thu, Jan 20, 2011 at 6:09 PM, aviad rozenhek <[email protected]> wrote: > On Mon, Apr 12, 2010 at 23:05, Lukas Diduch <[email protected]> wrote: > >> Hello, >> >> is there any way to get timestamp information from the mpeg2-ts (or mpeg2es >> stream) based on the embedded PCR ? >> >> The problem i try to solve is timestamping a live stream recorded with a >> mpeg2es >> camera. Since the demuxing and decoding using ffmpeg works like a charm i >> would >> like to stay with the API. >> >> Theoretically the PCR information in the stream would be perfectly suited >> for >> that (good resolution and low jitter) but as far as i can see in the mpeg2 >> codebase of libavformat the PCR info is used only internally and not >> accesible >> via the API (e.g. AVStream or AVPacket). >> >> Maybe there is some clever method using pts/dts/last dts from AVPacket to >> determine the record timestamp ? >> >> Best regards >> Lukas >> > > I think this is a very good question that I wish was already answered, as I > need the same functionality myself. > > it is a pity that so few ffmpeg devs take the time to answer questions on > libav-user mailing list.
I try, but it's a lot of emails and - honestly - I don't always know the answer myself. This particular info is not accessible through our public API. Feel free to hack it in as a third parameter in AVPacket.pcr or so. If you can think of a generic enough way to introduce this into our API, you could consider sending a patch. Why is PCR better than PTS/DTS in this case? Ronald _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
