Added debug print statements for AVI video FPS.

This commit is contained in:
mjbudd77 2021-10-01 20:02:06 -04:00
parent e3a9160797
commit b23db9f8fc
2 changed files with 5 additions and 1 deletions

View File

@ -1149,6 +1149,8 @@ static int initVideoStream( const char *codec_name, OutputStream *ost )
//c->pix_fmt = AV_PIX_FMT_YUV420P; // Every video encoder seems to accept this
c->pix_fmt = (AVPixelFormat)ost->pixelFormat;
printf("AVI Encoded Video FPS: %.12lf\n", (double)ost->st->time_base.den / (double)ost->st->time_base.num );
//c->sample_aspect_ratio = (AVRational){ 4, 3 };
//printf("compression_level:%i\n", c->compression_level);
//printf("TAG:0x%08X\n", c->codec_tag);

View File

@ -136,7 +136,7 @@ gwavi_t::open(const char *filename, unsigned int width, unsigned int height,
return -1;
}
usec = (unsigned int)((1000000.0 / fps)+0.50);
printf("FPS: %f %u\n", fps, usec );
//printf("FPS: %f %u\n", fps, usec );
/* set avi header */
avi_header.time_delay= usec;
@ -192,6 +192,8 @@ gwavi_t::open(const char *filename, unsigned int width, unsigned int height,
stream_header_v.image_width = width;
stream_header_v.image_height = height;
printf("AVI Encoded Video FPS: %.12lf\n", (double)stream_header_v.data_rate / (double)stream_header_v.time_scale );
/* set stream format */
stream_format_v.header_size = 40;
stream_format_v.width = width;