On 08/28/2011 09:13 AM, Alex Cohn wrote:
(a) is there a general way to bookmark frames while writing a file in such a
way that I can seek to them directly when playing, without searching? pts is
NOT the answer, as explained below.
This is only relevant for key frames, but yes, you can. When writing
the stream, you can embed a copy of SPS/PPS preceeding every key
frame. Keep the file offset for this copy of SPS in your database, and
when you need it, you can simply start reading the file from this
offset.
As I mentioned in my original post, this works fine for .h264 file, but for some reason not for .avi or .mp4 - perhaps I am missing some magic incantation that someone on the list is aware of?
(c) is there a way to force "low delay" handling of a stream despite its
SPS/PPS description? for some cameras, video decoding is lagging 4 frames
after the packet arrival, which - at 5fps, is almost 1 second delay. (one
suggestion given below, looking for more options)
Why can't you fix the SPS to require low delay?
I can (and probably will), but that requires bit manipulation that I was hoping to avoid; I hoped there was a way to do it without patching either libavcodec or the bitstream.
(d) is there a way, other than subtitles, to add a visual timestamp to the
file while writing it, without decoding+overlaying+reencoding?
What's wrong with using subtitles?
Nothing wrong, and is probably what I am going to do; It would require adding a different subtitle per frame. I was hoping there's a standard or accepted way to do this that I was unaware of - I'm sure I'm not the first person to run into this.
(e) is there a way to tell, without decoding the video stream, that a
received packet starts a new non-key frame?
Look at the first Nal code. It will most likely be 65 for I-frame, and
61 for P-frame.
Thanks.

_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to