[Mplayer-cvslog] CVS: main mencoder.c,1.67,1.68
Arpi of Ize
arpi at mplayer.dev.hu
Sun Jan 27 15:16:45 CET 2002
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv767
Modified Files:
mencoder.c
Log Message:
bitrate calculator fix?
Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- mencoder.c 27 Jan 2002 02:31:06 -0000 1.67
+++ mencoder.c 27 Jan 2002 14:16:32 -0000 1.68
@@ -319,6 +319,7 @@
aviwrite_stream_t* mux_a=NULL;
aviwrite_stream_t* mux_v=NULL;
FILE* muxer_f=NULL;
+int muxer_f_size=0;
#ifdef HAVE_DIVX4ENCORE
ENC_FRAME enc_frame;
@@ -1432,16 +1433,17 @@
printf("\nWriting AVI index...\n");
aviwrite_write_index(muxer,muxer_f);
+muxer_f_size=ftell(muxer_f);
printf("Fixup AVI header...\n");
fseek(muxer_f,0,SEEK_SET);
aviwrite_write_header(muxer,muxer_f); // update header
+fclose(muxer_f);
if(out_video_codec==VCODEC_FRAMENO && mux_v->timer>100){
- printf("Suggested video bitrate for 650MB CD: %d\n",(int)((650*1024*1024-ftell(muxer_f))/mux_v->timer/125));
- printf("Suggested video bitrate for 700MB CD: %d\n",(int)((700*1024*1024-ftell(muxer_f))/mux_v->timer/125));
+ printf("Suggested video bitrate for 650MB CD: %d\n",(int)((650*1024*1024-muxer_f_size)/mux_v->timer/125));
+ printf("Suggested video bitrate for 700MB CD: %d\n",(int)((700*1024*1024-muxer_f_size)/mux_v->timer/125));
+ printf("Suggested video bitrate for 800MB CD: %d\n",(int)((800*1024*1024-muxer_f_size)/mux_v->timer/125));
}
-
-fclose(muxer_f);
printf("\nVideo stream: %8.3f kbit/s (%d bps) size: %d bytes %5.3f secs %d frames\n",
(float)(mux_v->size/mux_v->timer*8.0f/1000.0f), (int)(mux_v->size/mux_v->timer), mux_v->size, (float)mux_v->timer, decoded_frameno);
More information about the MPlayer-cvslog
mailing list