Hello,

I want to enhance my app with h.264-cut support. My problem is, that my 
streams does not have an idr-Frame. The stream only contains slices (I-, P-, 
B-) and SPS/PPS Values but no IDR-Frames. What I have done is following:

I read all AVPackets and save the info about their PTS-values from the 
Keyframes. libav seems to recognize all I-Slices as key-frames (I suppose 
because of the SPS/PPS-Packets in front of them). After that little parsing 
process I can seek thru my stream by jumping from I-Slice to I-Slice. This 
works fine. After the selection of the cut-points I begin to cut before an 
I-Slice. Now comes the first problem. The PTS-Values after that I-Slice are 
smaller. I think this is so cause of the frames referencing pictures before 
that I-Slice correct? Ok. At the moment I throw that pictures away, and 
waiting for pictures with greater PTS-Values. Does exists a better solution 
for that? It is silly that the broadcasting stations does not send 
IDR-Frames.

The second problem is that it seems that av_read_frame does only read slice 
wise. Possible? I mean if one slice is the same like one picture/frame, then 
it is no problem. But could it be that some slices of an h.264 stream belong 
to the same picture/frame? If yes, how can I check/find it out??? Has anyone 
an idea?

regards,
Sven
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to