<div>Hi,all</div>
<div> Is the function av_rescale_q() some differnet bettewn H264 and the MPEG4??? </div>
<div> I had passed the same paramters, but the pkt.pts is different.</div>
<div>pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);</div>
<div> Please help me!! Thanks for all of you!!<br><br></div>
<div class="gmail_quote">2011/4/18 Vincent,Wei <span dir="ltr"><<a href="mailto:weikun0905@gmail.com">weikun0905@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,all<br> <br>     I am a new user of ffmpeg, I need to change the RTP packet to the avi file,used the H264 encoder, so I read the code of output_example.c. And I had tried to genrerate a test.avi file just like the example.<br>
    There are some question about the result:<br>    (1) When I use the .avi as the extensions, it uesd the CODEC_ID_MPEG4 as default , I had found that it is defined at the avienc.c line:562<br>       AVOutputFormat avi_muxer = {<br>
       .....<br>      CODEC_ID_MP2,<br>      CODEC_ID_MPEG4,<br>       .....<br>       };<br>      I had try to change it to the CODEC_ID_H264, but when I try to genrerat the test.avi again, I found that it can't work rightly,error as follow:<br>
      error, non monotone timestamps -368934881474191031 >= -368934881474191031<br>     Error while writing video frame .<br>     Why?<br> <br>(2) When I edit the output_example.c line:445 <br>       fmt = guess_format("h264", filename, NULL);<br>
      I also set the .avi as the extensions, but it can't generate the avi format file(alougth the file look like .avi extension name,but the format do not fit the avi format standard).<br>      It generate the file which fit the .264 file format ,so it is turly encode as the h264, but I need the avi file.<br>
 <br>(3) The example is worked as the YUV420 as input data, but my data source had already been encoded as H264(RTP packet payload),<br>     I thought that I may not need to change the data to YUV first, it's not efficient.<br>
     I means that if the data is already the encoded ,the avcodec_encode_video() may not be called? If it is right,av_write_frame() need what data as the input data ? raw h264 data ?or some others??<br>     <br>How can I use the ffmpeg to help me do the work?<br>
 <br>That is all, so many questions for all of you, please help me, thanks </blockquote></div><br>