Hi all!<br><br>I write live transcoder (<a href="https://gitorious.org/live-transcoder">https://gitorious.org/live-transcoder</a>) that can accept input streams from web cams (and other live streams) and transcode it into given formats and distribute it via different transports (currently HTTP only).<br>
<br>On my work we plan to use this transcoder for transcode streams from Axis cams to FLV and publish its ob our site. But it look like FLV players wants FLV with 25 FPS but cams provide streams with FPS from 25 up to 30.<br>
<br>And I have trouble:<br>I set:<br>1. AVCodecContext::time_base to 1/25<br>2. AVStream::time_base to 1/25<br>3. AVStream::r_frame_rate to 25/1<br><br>After encoding packet I scale PTS:<br>Packet.pts = av_rescale_q(Frame.pts, FrameTimeBase, PacketTimeBase);<br>
<br>FrameTimeBase equal to input video stream time base<br>PacketTimeBase equal to output video stream time base<br><br>AVIOContext I alloc with avio_alloc_context() and write packets to HTTP stream with av_write_frame()<br>
<br>All work well (in the first approximation) but if I try to play video stream via ffplay it plays and ffplay shows<br>1k tbr, 1k tbn, 1k tbc<br>but I expect about 25 tbr<br><br>I dump FLV (with curl) to file, manualy parse header and view, that framerate set to 25, so I can't understand how to correct change framerate for output stream.<br>
<br>Thanks for any help.<br>