[MEncoder-users] Removing Duplicate Frames
Jeremy Hood
JHood at lasercraftinc.com
Wed Apr 1 16:05:54 CEST 2009
> -mc 0 / -nosound
That didn't seem to help. Am I executing the command correctly? Do you have any advice on the "decimate" or "ovc" portions of the command?
Here are the three things I tried:
(With "-mc 0"):
mencoder -ovc lavc -mc 0 -vf decimate=-0:99999 190-1466_211.avi -o Fixed_190-1466_211.avi
(With "-nosound"):
mencoder -ovc lavc -nosound -vf decimate=-0:99999 190-1466_211.avi -o Fixed_190-1466_211.avi
(With "-mc 0" and "-nosound"):
mencoder -ovc lavc -mc 0 -nosound -vf decimate=-0:99999 190-1466_211.avi -o Fixed_190-1466_211.avi
Here's the output from the last run:
# mencoder -ovc lavc -mc 0 -nosound -vf decimate=-0:99999 190-1466_211.avi -o Fixed_190-1466_211.avi
MEncoder SVN-r28607-4.2.4 (C) 2000-2009 MPlayer Team
success: format: 0 data: 0x0 - 0x116e00
AVI file format detected.
[aviheader] Video stream found, -vid 0
VIDEO: [MPG4] 352x240 24bpp 30.000 fps 1050.5 kbps (128.2 kbyte/s)
[V] filefmt:3 fourcc:0x3447504D size:352x240 fps:30.000 ftime:=0.0333
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [decimate=-0:99999]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmp41] vfm: ffmpeg (FFmpeg MSMPEG-4 v1)
==========================================================================
VDec: vo config request - 352 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (352x240 fourcc=34504d46 [FMP4])
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Pos: 0.5s 15f ( 9%) 0.00fps Trem: 0min 1mb A-V:0.000 [0:0]
1 duplicate frame(s)!
Pos: 0.5s 16f ( 9%) 0.00fps Trem: 0min 1mb A-V:0.000 [0:0]
1 duplicate frame(s)!
Pos: 0.6s 18f (10%) 0.00fps Trem: 0min 1mb A-V:0.000 [0:0]
1 duplicate frame(s)!
Pos: 0.6s 19f (10%) 0.00fps Trem: 0min 1mb A-V:0.000 [0:0]
1 duplicate frame(s)!
Pos: 0.6s 20f (10%) 0.00fps Trem: 0min 1mb A-V:0.000 [0:0]
1 duplicate frame(s)!
Pos: 1.2s 37f (19%) 0.00fps Trem: 0min 0mb A-V:0.000 [1303:0]
1 duplicate frame(s)!
Pos: 1.6s 50f (24%) 0.00fps Trem: 0min 0mb A-V:0.000 [1166:0]
1 duplicate frame(s)!
Pos: 2.6s 80f (35%) 0.00fps Trem: 0min 0mb A-V:0.000 [1021:0]
1 duplicate frame(s)!
Pos: 3.6s 110f (48%) 0.00fps Trem: 0min 0mb A-V:0.000 [979:0]]
1 duplicate frame(s)!
Pos: 4.6s 140f (59%) 0.00fps Trem: 0min 0mb A-V:0.000 [950:0]
1 duplicate frame(s)!
Pos: 5.0s 150f (62%) 0.00fps Trem: 0min 0mb A-V:0.000 [938:0]
1 duplicate frame(s)!
Pos: 5.6s 170f (69%) 0.00fps Trem: 0min 0mb A-V:0.000 [916:0]
1 duplicate frame(s)!
Pos: 6.6s 200f (79%) 0.00fps Trem: 0min 0mb A-V:0.000 [881:0]
1 duplicate frame(s)!
Pos: 7.6s 230f (90%) 0.00fps Trem: 0min 0mb A-V:0.000 [859:0]
1 duplicate frame(s)!
Pos: 8.6s 259f (99%) 0.00fps Trem: 0min 0mb A-V:0.000 [842:0]
Flushing video frames.
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Video stream: 842.974 kbit/s (105371 B/s) size: 909710 bytes 8.633 secs 259 frames
#
Thanks for any help you guys can give me.
Jeremy
-----Original Message-----
From: mencoder-users-bounces at mplayerhq.hu [mailto:mencoder-users-bounces at mplayerhq.hu] On Behalf Of RC
Sent: Wednesday, April 01, 2009 1:59 AM
To: MEncoder usage discussions
Subject: Re: [MEncoder-users] Removing Duplicate Frames
On Tue, 31 Mar 2009 15:47:28 -0400
Jeremy Hood <JHood at lasercraftinc.com> wrote:
> It's like mencoder inserts blank frames to essentially "pause"
> playback until it comes time for the next frame.
It does... to maintain A/V sync.
> That's not the behavior I want. I want it to go straight to the
> next non-duplicated frame at the video's frame rate.
-mc 0 / -nosound
-----Original Message-----
I have video clips that have duplicated frames in them and I'd like to use mencoder to remove those duplicated frames. I think I've figured out how to get mencoder to identify the duplicatd frames with the "decimate" command, but, when I play back the video clips, there is still a time delay during the period where the duplicated frames were. It's like mencoder inserts blank frames to essentially "pause" playback until it comes time for the next frame. That's not the behavior I want. I want it to go straight to the next non-duplicated frame at the video's frame rate. Does that make sense?
Here's an illustration of what I mean. Pretend that the numbers are the consecutive frames in a video clip, starting at 1. Pretend that underscores ("_") are zero-length frames inserted by mencoder to effectively "pause" playback:
This is what I have:
1 2 3 3 3 3 4 5 6 .
After using the decimate command to remove the duplicate frames, here's what mencoder gives me:
1 2 3 _ _ _ 4 5 6 .
Here's what I want (note that there is no time delay between frame numbers 3 and 4 other than the frame rate of the video):
1 2 3 4 5 6 .
Jeremy Hood
More information about the MEncoder-users
mailing list