[MPlayer-users] mpeg2video, frame rate
Andres Heinloo
andres at gfz-potsdam.de
Wed Feb 4 22:35:45 CET 2004
On Wed, 4 Feb 2004, D Richard Felker III wrote:
> On Wed, Feb 04, 2004 at 06:07:40PM +0100, Andres Heinloo wrote:
> >
> >
> > On Wed, 4 Feb 2004, Andres Heinloo wrote:
> >
> > > The problem is that mpeg2video apparently does not set the frame rate in
> > ^^^^^^^^^^
> > Sorry, I meant bitrate.
> >
> > > the header, which confuses some software. What is the easiest way of
> > > filling this field in the header of m2v file? I cannot use, eg., mpeg2enc,
> > > because the source video has uneven framerate.
> > >
> > > I would also appreciate any tipps for fixing the framerate (inserting
> > > duplicate frames or skipping frames where needed). I was trying this:
> > >
> > > mencoder in_file.mpg -ofps 29.97 -ovc lavc -lavcopts vcodec=mpeg2video:vqscale=2:vhq -oac copy -of mpeg -o out_file.mpg
> > >
> > > (followed by dumpvideo, dumpaudio, mplex).
> >
> > I mean, is there a way to normalize the frame rate (insert/remove frames)
> > without re-encoding the video?
>
> In principle, adding duplicate frames is easy, but afaik mencoder
> can't do it right.
>
> Also in principle, you can remove frames, but it requires some
> reencoding. The naive way is the reencode up to the next keyframe, but
> it should be possible with advanced software to remove a single P
> frame and replace the next P frame with one that combines the changes
> from the two... Anyway this is difficult and requires very specialized
> software, so don't expect it anytime soon.
>
> > Is vqscale=2 sensible (I want the output to
> > be in size and quality as close to the input as possible)?
>
> Probably not. It could be much larger than the original, and won't
> meet the bitrate constraints for DVD/SVCD/whatever.
>
> Rich
Thanks for the answer. In fact, duplicate frames is all I would need (the
original video never exceeds 29.97 fps). But setting the correct bitrate
of mpeg2 stream would be also extremely helpful...
Andres.
More information about the MPlayer-users
mailing list