[Mplayer-dvb] framerate conversion using framestep filter
Patrick Cernko
errror at ps.uni-sb.de
Fri Nov 28 15:08:19 CET 2003
Hi list,
the appended patch against the current cvs enhances the framestep filter
to not only drop every nth frame, but to be able to set a "keep"-ratio,
a fraction, how many frames should (not) be droped. With this
enhancement, it is possible to do easy framerate conversion (only
dowmwards) by specifying a fraction of new and original framerate. For
example to convert NTSC material to PAL framerate, use:
... -vf framestep=2500:2997 ...
I have to use this for outputing NTSC material to my DVB-card. My card
of course also could decode NTSC material, by my TV set is unable to
present it in color (a really loosy one! :-( ). As I did not find a way
to use any other filter (mencoder's -ofps option is not usable when
preseting with mplayer), I patched the one, which already had most of
the stuff.
I only _added_ a new feature. I hope I did not overlook any case, so no
old features should be broken. The implementation uses int64_t-based
rationals to have highest precision. Although a int32_t-based
implementation would have been enough for easy cases like 3/4 or 15/16,
the above example of conversion from 29.97 to 25.0 requires
64Bit-precision to avoid computational overflows. Using the
rational-implementation, you get the most even drop distribution.
I hope this patch can make it in future versions of mplayer.
P.S.: @mplayer-dev-eng: As I have not subscribed your list, I would be
happy, if someone could send me a little note, if my patch made it into
cvs or was rejected.
--
Patrick Cernko | mailto:errror at errror.de | http://www.errror.de
Quote of the Week: "/vmlinuz does not exist.
Installing from scratch, eh?"
(Debian Kernel Installation)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mplayer-framestep-rational.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dvb/attachments/20031128/65560501/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 252 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dvb/attachments/20031128/65560501/attachment.pgp>
More information about the MPlayer-dvb
mailing list