[MPlayer-users] mencoder stream transcoding and frame rates.

Michael Kohne mhkohne at moberg.com
Wed Aug 22 15:31:27 EEST 2018

I'm using mencoder to transcode data from an RTSP server (Sony EP-580 IP
camera, sending H.264) to an mpeg42 AVI file, and my output AVI files are
ending up short about 70 frames per minute.

What I suspect is that mencoder is using the input frames as the clock to
drive the transcoding. Thus, when stream frames go missing (as they
regularly do on my setup), output frames are ALSO missing. During
transcoding, mencoder is showing a framerate anywhere from 27-28.5 fps.

For my application (we're capturing video data time synchronized with other
data) I REALLY need the output to be exactly 30 fps, no matter what happens
to the input. (I need this for compatibility with other tools that I don't

So what I want is a way to decouple the output frame rate clock from the
input frame rate clock. Obviously this will require duplication or dropping
of frames, and I'm fine with that, but so far I haven't found a way to
accomplish it at all.

Can this be done at all with mencoder?

mencoder version is MPlayer-1.3.0.

Stream is video only.

mencoder -prefer-ipv4 -rtsp-port 62000 -user admin -passwd admin -fps 30
rtsp:// -ofps 30  -o output.avi -ovc lavc

Michael Kohne

Senior Software Engineer
Office: 215.283.0860 x208
mhkohne at moberg.com


Celebrating 20 Years

Transforming Neurocritical Care

Research, Inc.

224 S Maple Street, Ambler, PA 19002

24/7 Customer 
Support: 888.662.7246

www.moberg.com <https://www.moberg.com/>

More information about the MPlayer-users mailing list