[MPlayer-users] [PATCH] mencoder pts, filmdint vfr, timecode dumping
Andrew Mahone
andrew.mahone at gmail.com
Thu Oct 26 08:46:42 CEST 2006
Three patches attached, may be of use for playback, but are primarily
intended for using mencoder as part of a VFR encoding chain (other
tools will be needed, as mencoder does not support VFR directly).
mplayer-filmdint-vfr.patch add a new vfr parameter to the filmdint
filter. When it is set to a non-zero value, filmdint should try to
output frames with reasonable pts values, and should try not to drop
frames unless they are telecine duplicates. This is still not perfect,
and will need either a two-pass mode or frame buffering in the filter
to fix.
mencoder-pts.patch is a very quick hack to get pts values passed to
the filter chain in mencoder. It is very possibly not right, but a
quick test here shows that the pts values being passed are the same as
in mplayer, at least on my sample material.
mplayer-tcdump.patch adds a new filter, "tcdump", which will dump
frame timecodes to a file. The format used is the v2 format as
described in the documentation for mkvmerge.
You should use -noskip when using mencoder with filmdint=vfr=1 and
tcdump. The tcdump filter should be placed after any filters that will
drop or duplicate frames. Here's an example sequence for producing a
VFR matroska file:
mencoder -profile x264-fast file.vob -nosound -of rawvideo -o
noir-open.264 -mc 0 -noskip -vf filmdint=vfr=1,tcdump=file.tcv2
MP4Box -add file.264 file.mp4
mkvmerge -o file.mkv --timecodes 1:file.tcv2 file.mp4
The decimate filter can also be used to drop duplicate frames - as
long as it appears before the tcdump filter, the timecodes of the
dropped frames will not be in the timecode file, and all should be
well.
I apologize for the rough nature of these patches. They are
experimental, and you should probably keep the originals of any files
you transcode with them. I would appreciate it if others could take a
look at them, try to find samples that break them, or offer any
suggestions for improvement. The most obvious place for improvement is
probably with a multi-pass mode for filmdint, which would allow it to
make better decisions about possible telecine sequences in the input.
--
Andrew Mahone
andrew DOT mahone AT gmail DOT com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-filmdint-vfr.patch
Type: application/octet-stream
Size: 3566 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20061026/38e6c353/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mencoder-pts.patch
Type: application/octet-stream
Size: 753 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20061026/38e6c353/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-tcdump.patch
Type: application/octet-stream
Size: 5246 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20061026/38e6c353/attachment-0002.obj>
More information about the MPlayer-users
mailing list