[MPlayer-dev-eng] [PATCH] fix support for -fps in mencoder

Ivan Szanto szivan at duticai.TWI.TUDelft.NL
Fri Nov 29 21:26:40 CET 2002


I have a movie that has an invalid fps value in its header.
When I play it with mplayer, it is way too slow. The option -fps
can be used in mplayer to adjust the fps, so I figured out
the correct fps value, and I was able to watch it with -fps
in mplayer.

I wanted to encode this movie with mencoder, so that it can be
played without specifying -fps. But I could not make mencoder to do this.
I tried -fps, -ofps, and their combinations, but none of those worked.
This small patch fixed it for me.

Now I can use the same -fps option and value I used in mplayer to
encode it.


bye,

Ivan


--- main/mencoder.c     Tue Nov 12 01:56:21 2002
+++ main.patched/mencoder.c     Fri Nov 29 21:02:34 2002
@@ -500,6 +500,12 @@
    sh_video->fps,sh_video->frametime
   );

+  if(force_fps){
+    sh_video->fps=force_fps;
+    sh_video->frametime=1.0f/sh_video->fps;
+    mp_msg(MSGT_MENCODER,MSGL_INFO,"input fps will be interpreted as %5.2f instead\n", sh_video->fps);
+  }
+
   if(sh_audio && out_audio_codec<0){
     mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_NoAudioEncoderSelected);
     mencoder_exit(1,NULL);





More information about the MPlayer-dev-eng mailing list