Hello,
I'm sorry to be nerve-racking again with my bad english and my problem, but I
want to start a new thread, because I know where my problem is, but I do not
find a solution.
First of all, i want to say, I want to update my cutting application with
h.264-cut support. I must say, the ffmpeg-lib ist a really cool and good to
use library and please don't get me wrong, I don't want to stress any
libav-developer for implementing a special feature!
My problem:
The mpeg2-based features, I said it, are working fine. And now I was
believing, that everything works automaticly with h.264 encrypted
transportstreams. But no. They don't.
The first thing, that irritates me is my following code:
if (packet.flags & PKT_FLAG_KEY)
{
...
}
After I read a single frame from a stream, I look, if it is a keyframe. This
is working for mpeg2-files. But in an h.264 stream, is every single readed
frame a key frame. And this is problematic. So my question is here, does this
not work generally for h.264-streams?
I thought ok and added for h.264-streams following if-clause.
if (packet.data[i] == 0 && packet.data[i+1] == 0 && packet.data[i+2] == 0 &&
packet.data[i+3] == 1 && packet.data[i+4] == 0x67)
{
cout << "IDR - Frame: " << frames() << " bei " << i << endl;
avckey = true;
allowParsing = true;
...
}
Now I see, it work better, but the decoder produces, if I want to extract a
sequence, no pictures. The Decoder gave me no error messages, but every
decoded picture has the same size. Really strange.
So the next question is, does av_read_frame really read such a complete
NAL-Packet or not?
The last question is only for my own understanding. If I want to cut
h.264-streams, then it is only possible to do that at IDR-Frames? Yes or no?
Many thanks for any help!
regards,
Sven
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user