Hello, I am encoding video with a new framerate expecting a slowdown or speed up in the final result. Odd thing is: "Videos" or ffmpeg player seems to give me expected results while VLC plays the video at the same-ish framerate (makes no difference what FPS I set)
Encoder setup: out_codec = avcodec_find_encoder(AV_CODEC_ID_H264); if (!out_codec) { cout << "out_codec found" << endl; exit(1); } pOutputContext = avcodec_alloc_context3(out_codec); if (!pOutputContext) { cout << "Could not allocate video codec context" << endl; exit(1); } // put sample parameters pOutputContext->bit_rate = FILE_OUTPUT_WIDTH * FILE_OUTPUT_HEIGHT * 4; pOutputContext->width = FILE_OUTPUT_WIDTH; pOutputContext->height = FILE_OUTPUT_HEIGHT; // frames per second pOutputContext->time_base.den = OUT_FRAMERATE; //FPS pOutputContext->time_base.num = 1; pOutputContext->gop_size = 10; pOutputContext->max_b_frames = 1; pOutputContext->pix_fmt = AV_PIX_FMT_YUV420P; av_opt_set(pOutputContext->priv_data, "preset", "slow", 0); Any thoughts what might cause this behaviour? /Kris
_______________________________________________ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user