Hello Victor,

Many thanks for your answer. That helps very much! I did not know that library 
but this will help! 
I suspected it, but I hoped that AVPacket gets a complete NAL-Packet. Does the 
ffmpeg-library will support this feature in the future? It will be nice, 
because ffmpeg has an h.264-decoder and with the x264-library an encoder. 

Or is it possible to give AVPacket a complete NAL-packet (readed and extracted 
with an other library) to write an muxer with the ffmpeg-lib?

regards,
Sven

Am Donnerstag 22 Januar 2009 04:30 schrieb Victor lyamtsev:
> AVPacket  doesn't correspond to NAL unit at all (  if I understand
> your dilemma).
> If you need to quickly write NAL parser, look  at the H264Bitstream
> library at Sourceforge; You can find h264 stream parsing app with
> example of how to use library there. Hope that helps...
>
> On Tue, Jan 20, 2009 at 8:31 AM, Sven Alisch <[email protected]> wrote:
> > 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
>
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to