On Wed, Jul 28, 2010 at 2:53 AM, Michael Chisholm <[email protected]>wrote:

> On 7/27/2010 2:35 AM, Nhat Huy wrote:
>
>> On Tue, Jul 27, 2010 at 3:04 PM, avcoder<[email protected]>  wrote:
>>
>>  On Tue, Jul 27, 2010 at 1:43 PM, Nhat Huy<[email protected]>  wrote:
>>>
>>>> Hi,
>>>>
>>>> According to your suggestion, I have to write a new av_read_frame which
>>>> points to my bit-stream buffer.
>>>>
>>>
>>> No! you do not need it, just tell ffmpeg your buffer and length ,
>>> FFmpeg will do everything for you
>>>
>>>  But how can I determine the AVPacket.size which contains each frame in
>>>>
>>> H.264
>>>
>>>> bit-stream ?
>>>>
>>>
>>> I will share some pieces of code.
>>> you should grasp my idea based on the code!
>>> Note: my code was based on older FFmpeg APIs.
>>>
>>>  Thank you very much.
>> _______________________________________________
>>
>
> That's fine if you're getting only the raw video packets.  Not so fine if
> you are getting a video stream in some container format and need to go
> through all the stream processing.  I thought it was the latter.
>
> Andy
>
>
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user
>

Hi Andy,

I'm dealing with raw H.264 bit-stream, not video format file such as: mkv,
avi  thus avcodec_decode_video is what I need. Now I'm thinking how to
determine the size of each frame in bit-stream buffer. I have to pass size
and data of each coded frame in buffer to avcodec_decode_video.

I see that av_read_frame can calculate size, but I do not know how it can do
that.

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

Reply via email to