I tried with this spec, but the it's no use. With little more experimenting I found out that when I decode images from the file, the frame is saved as ppm and is clear as it should be. But the example (apieexample.c) just grabs a chunks of mpeg4 file and then it feeds it to decoder. It doesn't get actuall frames.
Also I'm decoding the frames from AVIFileSink::useFrame(SubsessionBuffer &buffer) function. Presuming that by that time, all RTSP part of packeting is done and the frame is in subsession buffer. In useFram() I acquire pointer to frame from: unsigned char* const frameSource = buffer.dataStart(); unsigned const frameSize = buffer. bytesInUse(); And after that I feed the decoder with the pointer to a frame. Maybe this is wrong place to do this? ----- Original Message ----- From: "Peeyush Mishra" <[EMAIL PROTECTED]> To: "'Libav* user questions and discussions'" <[email protected]> Sent: Thursday, November 06, 2008 10:40 AM Subject: Re: [libav-user] Movement leaves pixel trails on decoded MPEG4stream AVStream *st; printf("Failed to Initialize encoder \n"); exit (1); } st->codec->width = 800 ;//image->width; st->codec->height = 600; //image->height; st->codec->time_base.den = 10 ; //FramePerSecond; st->codec->time_base.num = 1; st->codec->gop_size =50; st->codec->mb_decision = 2; st->codec->bit_rate = 400000; st->codec->me_method = 1; // st->codec->max_b_frames = 2; st->codec->pix_fmt = STREAM_PIX_FMT; //Peeyush // st->codec->flags |= CODEC_FLAG2_FAST; // st->codec->qblur=0.5 ; st->codec->global_quality = st->quality = 0 ; //Sanity st->codec->qmin = st->codec->qmax = 3 ; ELMA Kurtalj d.o.o. (ELMA Kurtalj ltd.) Vitezićeva 1a, 10000 Zagreb, Hrvatska (Viteziceva 1a, 10000 Zagreb, Croatia) Tel: 01/3035555, Faks: 01/3035599 (Tel: ++385-1-3035555, Fax: ++385-1-3035599 ) Www: www.elma.hr; shop.elma.hr E-mail: [EMAIL PROTECTED] ([EMAIL PROTECTED]) [EMAIL PROTECTED] ([EMAIL PROTECTED]) [EMAIL PROTECTED] ([EMAIL PROTECTED]) [EMAIL PROTECTED] ([EMAIL PROTECTED]) [EMAIL PROTECTED] ([EMAIL PROTECTED]) [EMAIL PROTECTED] ([EMAIL PROTECTED]) [EMAIL PROTECTED] ([EMAIL PROTECTED]) _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
