[Libav-user] FFmpeg mpeg2 packet length

Steffen Ebersbach ebersbac at hs-mittweida.de
Tue Oct 11 10:44:56 CEST 2011


Am 11.10.2011 10:09, schrieb c:
> On 10/11/2011 08:32 AM, Steffen Ebersbach wrote:
>> Am 10.10.2011 19:22, schrieb c:
>>> On 10/10/2011 09:45 AM, Steffen Ebersbach wrote:
>>>> Am 9.10.2011 16:46, schrieb Veysel Macit:
>>>>> Hi every developer,
>>>>>
>>>>> i need length of packet for detect scene changing is it possiable 
>>>>> to get lengt of packets(i-p-b) in data before decoded?
>>>>> Thanks...
>>>>> _______________________________________________
>>>>> Libav-user mailing list
>>>>> Libav-user at ffmpeg.org
>>>>> http://ffmpeg.org/mailman/listinfo/libav-user
>>>>
>>>> After reading a packet from the input stream the return value of 
>>>> the function is the length of the packet of the encoded content.
>>>>
>>>> Steffen
>>>> _______________________________________________
>>>> Libav-user mailing list
>>>> Libav-user at ffmpeg.org
>>>> http://ffmpeg.org/mailman/listinfo/libav-user
>>> which function you meant exactly?
>>> Thanks...
>>> Veysel
>>> _______________________________________________
>>> Libav-user mailing list
>>> Libav-user at ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/libav-user
>>
>>
>>
>> The function I mean is "av_read_packet" , but im wrong, the return 
>> value isn't the packetsize , but in the av_packet structure a field 
>> called "size" exists, which are the number of bytes of the decoded 
>> frame.
>>
>>
>> Steffen
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/libav-user
> i know this but i need encoded packet isnt there any way to get this 
> length.
> Thanks...
> Veysel
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user

This is the ENcoded packet, means the data is codec-data, like h.264 or 
something like this, to have the raw pixeldata you have to make 
av_decode_video ...
I think you would know if it's a i,p,b frame?

Steffen



More information about the Libav-user mailing list