I'm writing the receiver.

Yes, that's what i'm doing sort of in the loop, i thought there was an option. thanks anyway

 int framenb = 0;

             while(av_read_frame(pFormatCtx, &packet)>=0) {

               if(packet.stream_index==videoStream) {
                // Decode video frame

len = avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);


                 if (framenb>400) # Set nb of frames to be processed
                               {
                                  break;
                               }
                 framenb = framenb+1;

....



On 01/12/2012 02:16 PM, Alex Cohn wrote:
On Wed, Jan 11, 2012 at 16:36, David martin<[email protected]>  wrote:
Hi,
Which is the option that will let me stream a few seconds of a video on the
web and then stop ?

Are you writing the receiver or the streamer?

pFormatCtx->duration is empty when streaming from the web, so can how i
force a video duration so that I only stream a few seconds for testing ??

In any case, can you use the fps and stop after n = fps*sec frames?
thanks,

BR,
Alex


_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to