[Libav-user] decoding video frames
bobslf at gmail.com
Thu May 10 17:26:27 CEST 2012
On Thu, May 10, 2012 at 10:03 AM, Alex Cohn <alexcohn at netvision.net.il> wrote:
> On Thu, May 10, 2012 at 3:43 PM, Bob Self <bobslf at gmail.com> wrote:
>> I'm trying to decode video frames. The decoding loop prints this message:
>> [mpeg4 @ 00823420] Invalid and inefficient vfw-avi packed B
>> frames detected
>> After that it prints these lines over and over:
>> [mpeg4 @ ...] slice end not reached but screenspace end (5 left
>> 78000, score= -2)
>> [mpeg4 @ ...] concealing 1350 DC, 1350 AC, 1350 MV errors
>> What causes these warning messages? Is this the correct way to decode video?
> Such problems could be caused by some strange video steams. Therefore
> it's important to decode your file with the latest command-line
> ffmpeg. If its output is not as expected, it's also recommended to use
> alternative players: either the video may be corrupt, or there may be
> a bug in ffmpeg.
> But if ffmpeg succeeds, your code must be analyzed for problems.
> Alex Cohn
> Libav-user mailing list
> Libav-user at ffmpeg.org
My example is basically from the doc/examples directory. There is this
note there in the video_decode_example() function
NOTE1: some codecs are stream based (mpegvideo, mpegaudio)
and this is the only method to use them because you cannot
know the compressed data size before analysing it.
BUT some other codecs (msmpeg4, mpeg4) are inherently frame
based, so you must call them with all the data for one
frame exactly. You must also initialize 'width' and
'height' before initializing them.
Since the video I'm trying to decode is MPEG4, how do you initialize
the width and height? Could this be my problem?
More information about the Libav-user