[MEncoder-users] duplicate frames - shortening video?

hans at netupgrades.com hans at netupgrades.com
Tue Jun 12 00:50:46 CEST 2012


Laine Lee!

Thanks very much! I tried it as well and also got 2:53!

Big thanks for help tracking and testing this. Ill play with the
options now more and fine tune it.

Much appreciated to all.  --hans

"L. Lee" <llee040 at sbcglobal.net> wrote:

> You might try adding "-mc" and increasing the values to see if you
> can get what you want. I got a 2:53 duration on your sample by using
> "-mc 1" (the original has a duration of 2:58, OMM).
> 
> Laine Lee
> 
> 
> On 6/7/12 6:31 PM, "hans at netupgrades.com" <hans at netupgrades.com>
> wrote:
> 
> > Hi Steven and thanks for the help!
> > 
> > Steven Miller <srmj.ml at gmail.com> wrote:
> > 
> >> Have you tested the source? Is all well on that end?
> > 
> > Yes - the source scrolls fine.
> > 
> >>  Couple of things,
> >> 
> >>      What is the source video codec?
> > 
> > Ogg vorbis?
> > 
> >>      Is the video  and or audio cbr or vbr or a mix (if mixing the
> >> two is even possible).
> > 
> > I am not sure on this. I have posted info from mencoder below.
> > 
> >>      Are you sure on the frame rate?
> > 
> > I am not sure, but I have tried different frame rates w/ no
> > difference.
> > 
> >>      Is it telecene? If so I believe there are instances where
> >> attempting to set the frame rate could be ignored during encoding
> >> without addressing the telecine.
> >>      If it were telecine, a filter combo something like '-vf
> >> pullup,softskip,harddup' would be needed.
> > 
> > I dont think it is telecine.
> > 
> >> I see your recompressing audio. Going from mp3 to mp3. Perhaps you
> >> can use '-oac copy' for the encoding portion. Then using mplayer go
> >> back to the original source file, '-ao
> >> pcm:waveheader:file=foo.wav'. Once you have your wav file, use
> >> lame to rencode the audio.
> >> 
> >> Demux the video using the tool(s) of choice. Then remux the video
> >> and audio.
> >> 
> >> A very round about way to do it, but it's worked for me a number of
> >> times.
> >> 
> >> Either way I'm betting '-ofps' will most likely be needed to
> >> address the 'Duplicate Frame' messages.
> > 
> > Yes - I have just tried that, too.
> > 
> >> Again, I apologize if I've missed a resolution or am asking already
> >> answered questions.
> > 
> > No problem - Here is what I wrote to Lobster answering his
> > questions.
> > 
> > Ive included the source files.
> > 
> > Thank you very much for helping Steven! :)  --Hans
> > 
> > From: <hans at netupgrades.com>
> > To: Lobster <lobo at lobs.sytes.net>
> > Subject: Re: [MEncoder-users] duplicate frames - shortening video?
> > Date: Wed, 6 Jun 2012 00:13:21 -0500
> > X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; i486-pc-linux-gnu)
> > 
> > Hey Lobster,
> > 
> > Thanks for the help. Big thanks! :)
> > 
> > I just did a new test from a different, but similar out.ogv and got
> > the same sort of shortening frames effect when processed through
> > mencoder.
> > 
> > Below I have pasted the command you just asked me to try > dev/null
> > 
> > Below that I have pasted the results of the mencoder command you
> > initially gave to me w/ the ofps flag.
> > 
> > Also, I have posted both the source and the mencoded test.avi
> > online.
> > 
> > [...]
> > 
> > Here are the vids online:
> > 
> > http://nukene.ws/sites/nukene.ws/files/out.ogv
> > http://nukene.ws/sites/nukene.ws/files/test.avi
> > http://nukene.ws/sites/nukene.ws/files/breathe-out_alpha.mp3
> > 
> > Very kind of you and much appreciated, Lobster.
> > 
> > I like mencoder a lot! :)   --Hans
> > 
> > 
> > mencoder -ovc copy -nosound -o /dev/null out.ogv
> > MEncoder svn r34540 (Debian), built with gcc-4.7 (C) 2000-2012
> > MPlayer Team success: format: 0  data: 0x0 - 0x4d725c
> > libavformat version 53.21.0 (external)
> > Mismatching header version 53.19.0
> > libavformat file format detected.
> > [ogg @ 0xb6b8efa0]max_analyze_duration reached
> > [lavf] stream 1: video (theora), -vid 0
> > VIDEO:  [theo]  1376x816  0bpp  15.000 fps    0.0 kbps ( 0.0
> > kbyte/s) [V] filefmt:44  fourcc:0x6F656874  size:1376x816
> > fps:15.000 ftime:=0.0667 videocodec: framecopy (1376x816 0bpp
> > fourcc=6f656874) 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:  24.3s    365f (100%)  0.00fps Trem:
> > 0min 4mb  A-V:0.000 [1663:0] Writing index...
> > Writing header...
> > ODML: Aspect information not (yet?) available or unspecified, not
> > writing vprp header.
> > 
> > Video stream: 1659.014 kbit/s  (207376 B/s)  size: 5046167 bytes
> > 24.333 secs  365 frames
> > 
> > ====
> > Command line logging of original mencoder run:
> > 
> > mencoder out.ogv -audiofile audio/breathe-out_alpha.mp3 -ovc lavc
> > -oac mp3lame -vf harddup -ofps 15 -o test.avi MEncoder svn r34540
> > (Debian), built with gcc-4.7 (C) 2000-2012 MPlayer Team success:
> > format: 0  data: 0x0 - 0x4d725c libavformat version 53.21.0
> > (external) Mismatching header version 53.19.0
> > libavformat file format detected.
> > [ogg @ 0xb6b73fa0]max_analyze_duration reached
> > [lavf] stream 1: video (theora), -vid 0
> > VIDEO:  [theo]  1376x816  0bpp  15.000 fps    0.0 kbps ( 0.0
> > kbyte/s) Audio only file format detected.
> > BUG! Invalid demuxer type in new_demuxer(), big troubles ahead.[V]
> > filefmt:65536  fourcc:0x6F656874  size:1376x816  fps:15.000
> > ftime:=0.0667
> > ==========================================================================
> > Requested audio codec family [mpg123] (afm=mpg123) not available.
> > Enable it at compilation. Opening audio decoder: [ffmpeg]
> > FFmpeg/libavcodec audio decoders libavcodec version 53.35.0
> > (external) Mismatching header version 53.32.2 AUDIO: 44100 Hz, 2
> > ch, floatle, 192.0 kbit/6.80% (ratio: 24000->352800) Selected audio
> > codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3 audio)
> > ==========================================================================
> > Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1, osd:
> > 1, aspect: 0.000000, round: 1 Opening video filter: [harddup]
> > ==========================================================================
> > Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
> > Selected video codec: [fftheora] vfm: ffmpeg (FFmpeg Theora)
> > ==========================================================================
> > MP3 audio selected.
> > Movie-Aspect is 1.69:1 - prescaling to correct movie aspect.
> > videocodec: libavcodec (1376x816 fourcc=34504d46 [FMP4])
> > 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.1s      2f (17%)  0.00fps Trem:   0min
> > 0mb  A-V:0.007 [0:0] [VD_FFMPEG] DRI failure.
> > Pos:   5.1s     76f (17%)  6.45fps Trem:   0min   7mb  A-V:-0.138
> > [1967:205]
> > 
> > 1 duplicate frame(s)!
> > Pos:   5.8s     86f (20%)  6.07fps Trem:   0min   7mb  A-V:-0.138
> > [2020:207]
> > 
> > 1 duplicate frame(s)!
> > Pos:   6.5s     96f (23%)  5.85fps Trem:   0min   7mb  A-V:-0.138
> > [1918:210]
> > 
> > 1 duplicate frame(s)!
> > Pos:   7.3s    106f (26%)  5.76fps Trem:   0min   6mb  A-V:-0.138
> > [1763:211]
> > 
> > 1 duplicate frame(s)!
> > Pos:   8.0s    116f (28%)  5.63fps Trem:   0min   6mb  A-V:-0.138
> > [1646:213]
> > 
> > 1 duplicate frame(s)!
> > Pos:   8.7s    126f (30%)  5.60fps Trem:   0min   6mb  A-V:-0.138
> > [1571:213]
> > 
> > 1 duplicate frame(s)!
> > Pos:   9.5s    136f (34%)  5.62fps Trem:   0min   5mb  A-V:-0.138
> > [1504:214]
> > 
> > 1 duplicate frame(s)!
> > Pos:  10.2s    146f (36%)  5.74fps Trem:   0min   5mb  A-V:-0.138
> > [1448:212]
> > 
> > 1 duplicate frame(s)!
> > Pos:  10.9s    156f (37%)  5.88fps Trem:   0min   5mb  A-V:-0.138
> > [1392:210]
> > 
> > 1 duplicate frame(s)!
> > Pos:  11.7s    166f (40%)  5.88fps Trem:   0min   5mb  A-V:-0.138
> > [1345:208]
> > 
> > 1 duplicate frame(s)!
> > Pos:  12.4s    176f (43%)  5.81fps Trem:   0min   5mb  A-V:-0.138
> > [1313:207]
> > 
> > 1 duplicate frame(s)!
> > Pos:  13.1s    186f (44%)  5.79fps Trem:   0min   5mb  A-V:-0.138
> > [1266:205]
> > 
> > 1 duplicate frame(s)!
> > Pos:  13.9s    196f (44%)  5.80fps Trem:   0min   5mb  A-V:-0.138
> > [1207:204]
> > 
> > 1 duplicate frame(s)!
> > Pos:  14.6s    206f (44%)  5.93fps Trem:   0min   5mb  A-V:-0.138
> > [1153:202]
> > 
> > 1 duplicate frame(s)!
> > Pos:  15.3s    216f (45%)  5.93fps Trem:   0min   5mb  A-V:-0.138
> > [1120:201]
> > 
> > 1 duplicate frame(s)!
> > Pos:  16.1s    226f (46%)  5.98fps Trem:   0min   5mb  A-V:-0.138
> > [1104:201]
> > 
> > 1 duplicate frame(s)!
> > Pos:  16.8s    236f (49%)  6.09fps Trem:   0min   5mb  A-V:-0.138
> > [1143:202]
> > 
> > 1 duplicate frame(s)!
> > Pos:  17.5s    246f (53%)  6.08fps Trem:   0min   5mb  A-V:-0.138
> > [1147:203]
> > 
> > 1 duplicate frame(s)!
> > Pos:  18.3s    256f (58%)  6.08fps Trem:   0min   5mb  A-V:-0.138
> > [1175:203]
> > 
> > 1 duplicate frame(s)!
> > Pos:  19.0s    266f (62%)  6.14fps Trem:   0min   5mb  A-V:-0.138
> > [1168:203]
> > 
> > 1 duplicate frame(s)!
> > Pos:  19.7s    276f (67%)  6.17fps Trem:   0min   4mb  A-V:-0.138
> > [1177:202]
> > 
> > 1 duplicate frame(s)!
> > Pos:  20.5s    286f (70%)  6.17fps Trem:   0min   4mb  A-V:-0.138
> > [1146:202]
> > 
> > 1 duplicate frame(s)!
> > Pos:  21.2s    296f (76%)  6.12fps Trem:   0min   4mb  A-V:-0.138
> > [1146:201]
> > 
> > 1 duplicate frame(s)!
> > Pos:  21.9s    306f (80%)  6.11fps Trem:   0min   4mb  A-V:-0.138
> > [1125:201]
> > 
> > 1 duplicate frame(s)!
> > Pos:  22.7s    316f (86%)  6.03fps Trem:   0min   4mb  A-V:-0.138
> > [1124:201]
> > 
> > 1 duplicate frame(s)!
> > Pos:  23.4s    326f (87%)  6.02fps Trem:   0min   4mb  A-V:-0.138
> > [1093:201]
> > 
> > 1 duplicate frame(s)!
> > Pos:  24.1s    336f (91%)  5.97fps Trem:   0min   4mb  A-V:-0.138
> > [1083:202]
> > 
> > 1 duplicate frame(s)!
> > Pos:  24.9s    346f (93%)  5.94fps Trem:   0min   4mb  A-V:-0.138
> > [1068:203]
> > 
> > 1 duplicate frame(s)!
> > Pos:  25.6s    356f (97%)  5.90fps Trem:   0min   4mb  A-V:-0.138
> > [1067:203]
> > 
> > 1 duplicate frame(s)!
> > Pos:  26.3s    365f (100%)  5.87fps Trem:   0min   3mb  A-V:-0.131
> > [1059:203]
> > 
> > Flushing video frames.
> > Writing index...
> > Writing header...
> > ODML: Aspect information not (yet?) available or unspecified, not
> > writing vprp header.
> > 
> > Video stream: 1059.505 kbit/s  (132438 B/s)  size: 3478709 bytes
> > 26.267 secs  365 frames
> > 
> > Audio stream:  204.025 kbit/s  (25503 B/s)  size: 682858 bytes
> > 26.776 secs
> > 
> >> Steve
> >> On Jun 4, 2012 11:24 PM, <hans at netupgrades.com> wrote:
> >> 
> >>> Thanks Lobster.
> >>> 
> >>> Still I am getting a video of very fast scrolling down the page as
> >>> if mencoder has discarded these long scroll pauses as duplicates
> >>> and optimized the video by removing the duplicates.
> >>> 
> >>> Anything else to try to preserve all the frames in the source vid?
> >>> 
> >>> Thanks! :)
> >>> 
> >>> Lobster <lobo at lobs.sytes.net> wrote:
> >>> 
> >>>> On 5/06/2012 11:01 a.m., hans at netupgrades.com wrote:
> >>>>> Hi -
> >>>>> 
> >>>>> Videos are being shortened (losing frames?).
> >>>>> 
> >>>>> My source video is a desktop recording of me scrolling down a
> >>>>> web page, and I wait for a few seconds each time before I
> >>>>> scroll down further.
> >>>>> 
> >>>>> I think mencoder is optimizing these "similar" frames and drops
> >>>>> them.
> >>>>> 
> >>>>> 
> >>>>> I have tried many variations to keep my long scroll pauses
> >>>>> intact:
> >>>>> 
> >>>>> mencoder out.ogv -audiofile myfile.mp3 -ovc lavc -oac mp3lame
> >>>>> -fps 5 -o test.avi
> >>>>> 
> >>>>> mencoder out.ogv -audiofile myfile.mp3 -ovc lavc -oac mp3lame
> >>>>> -fps 15 -o test.avi
> >>>>> 
> >>>>> mencoder out.ogv -audiofile myfile.mp3 -ovc lavc -oac mp3lame
> >>>>> -fps 15 -vf harddup -o test.avi
> >>>>> 
> >>>>> mencoder out.ogv -audiofile myfile.mp3 -ovc lavc -oac mp3lame
> >>>>> -vf harddup -o test.avi
> >>>>> 
> >>>>> These are the type of messages I see:
> >>>>> 
> >>>>> 1 duplicate frame(s)!
> >>>>> Pos:  10.9s    151f (93%) 16.10fps Trem:   0min   2mb
> >>>>> A-V:-0.133 [1406:210]
> >>>>> 
> >>>>> 
> >>>>> Each time, I see duplicate frames being dropped, and my video
> >>>>> is a very fast scrolling down the web page.
> >>>>> 
> >>>>> I thought -vf harddup made it not lose frames?
> >>>>> 
> >>>>> How do I keep the same video length as my source file?
> >>>> 
> >>>> use -ofps to force the output frame rate.
> >>>> I.E `mencoder out.ogv -audiofile myfile.mp3 -ovc lavc -oac
> >>>> mp3lame -vf harddup -ofps 15 -o test.avi`
> >>>> 
> >>>> 
> >>>> _______________________________________________
> >>>> MEncoder-users mailing list
> >>>> MEncoder-users at mplayerhq.hu
> >>>> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
> >>> 
> >>> _______________________________________________
> >>> MEncoder-users mailing list
> >>> MEncoder-users at mplayerhq.hu
> >>> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
> >>> 
> >> _______________________________________________
> >> MEncoder-users mailing list
> >> MEncoder-users at mplayerhq.hu
> >> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
> > 
> > _______________________________________________
> > MEncoder-users mailing list
> > MEncoder-users at mplayerhq.hu
> > https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
> 
> 
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users



More information about the MEncoder-users mailing list