Hello, I am having some difficulties using the H.263 decoder. What I am trying to do is to develop a client-server application where a server would interface with a video source to acquire uncompressed (RGB or YUV) frames of video. Then I want to use ffmpeg to encode the video as an H263+ stream and send it to an client over RTP. The client would then decode and render the video.
Before dealing with the RTP stuff, I want validate the encoding/decoding part. To do so, I have developed a small test application that does the following: Frame by frame, an avi video is read from file and decompressed (using OpenCV). Each frame is then encoded as H263+ video to a memory buffer and decoded from that same memory buffer before being rendered to screen. Unfortunately, I am having some difficulties with the H263 video decoder. So far, this test is succesful but at some point, the H263 decoder fails (see output below) and rendered video is no longer updated. F, score= -3) [h263 @ 0080CE00]concealing 1320 DC, 1320 AC, 1320 MV errors [h263 @ 0080CE00]slice end not reached but screenspace end (419428466 left 3FFFF F, score= -3) [h263 @ 0080CE00]concealing 1320 DC, 1320 AC, 1320 MV errors [h263 @ 0080CE00]slice end not reached but screenspace end (419428629 left 07FFF F, score= -3) [h263 @ 0080CE00]concealing 1320 DC, 1320 AC, 1320 MV errors [h263 @ 0080CE00]slice end not reached but screenspace end (419428310 left 017FF F, score= -3) [h263 @ 0080CE00]concealing 1320 DC, 1320 AC, 1320 MV errors [h263 @ 0080CE00]slice end not reached but screenspace end (419428250 left 3FFFF 0, score= -3) [h263 @ 0080CE00]concealing 1320 DC, 1320 AC, 1320 MV errors [h263 @ 0080CE00]slice end not reached but screenspace end (419428348 left 0FFFF F, score= -3) [h263 @ 0080CE00]concealing 1320 DC, 1320 AC, 1320 MV errors [h263 @ 0080CE00]slice end not reached but screenspace end (419428183 left 01FFF F, score= -3) (and so on) Now I could observe that the point where it crash depends on multiple (and strange) parameters: 1. The decoder does not crash at the same frame if my project is compiled with Debug or Release configuration 2. The decoder does not crash at the same frame depending on the bitrate (at lower bitrate (ie. 60000), it does not crash at all but the video quality is poor) 3. So far, the decoder never crashes if instead I encode all frames to a very large memory buffer and then decode all frames. However, this scenario is not suitable for my application because I want to decode/display the video in real-time on the client side. This in fact the reason why I opted for a frame-based with no b-frames codec rather than stream-based codec. Here are some additional information about the project * Using today's SVN version of ffmpeg compiled with LGPL configurations * Using windows32 platform * FFMPEG is compiled as a shared library (using MinGW) * Visual Studio C++ 2008, Express Edition for my application's development * I have also tried with the latest unofficial ffmpeg windows builds (GPL version) with no success Here are all the parameters that I set for the H263+ encoder (CODEC_ID_H263P): bit_rate = 500000 width = 704 height = 480 time_base.num = 1 time_base.denum = 30 pix_fmt = PIX_FMT_YUV420P gop_size = 30 (all the other parameters are default params (unmodified) or if I want fixed quantizer then I would use the following encoder params: bit_rate = 0 qmin = 4 qmax = 4 Here are all the parameters that I set for H263 decoder (CODEC_ID_H263): (all default parameters) Thank you in advance for your help! Silvain Beriault _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
