I m trying to retrieve Frame rate in following manner.

        context = avformat_alloc_context();

        int err;
        err = avformat_open_input (&context, "<rtsp IP>", NULL, NULL);
        for (i = 0; i < context->nb_streams; i++)
        {
                codec =
avcodec_find_decoder(context->streams[i]->codec->codec_id);
                if (codec->type  == AVMEDIA_TYPE_VIDEO ) {
                        videoStreamIndex = i;
                        video_stream = context->streams[videoStreamIndex];
                      AVRational fr = av_guess_frame_rate(context,
video_stream, NULL);
                     LOGD(" Frame RAte = %d/%d ", fr.num, fr.den);

                }
        }




I am getting ways 0/0   printed. What am i doing wrong?
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to