[Kdenlive-devel] Advise on using NTSC 4/3 material in PAL 16/9 project

Zachary Drew zachary.drew at gmail.com
Mon Apr 7 16:24:38 UTC 2008


On Sat, Apr 5, 2008 at 9:05 PM, Dan Dennedy <dan at dennedy.org> wrote:

> I already replied previously to the other interested party or the list
> here about the slowmotion producer. I tried it, and I can not get it
> to work good. It ends up distorting the image very badly.


Yup, producer slowmotion is definitely not production code. Here are some of
the reasons:

1. Motion (as calculated by filer motion_est) is assumed to be in the plane
of the frame and not perpendicular to it. This is a false assumption.
2. The motion code does not account for rotation within the frame of the
plane. This problem is easier to solve than #1 but is still difficult.
3. The code has trouble accounting for things moving in front of other
things.

In other words it's crazy and insanely difficult to interpolate between two
frames without severe artifacts. Here are notes and a long list of
deficiencies from the motion_est code:

http://mlt.svn.sourceforge.net/viewvc/mlt/trunk/mlt/src/modules/motion_est/README?revision=855&view=markup

For now, the motion_est related code is useful in a small number of
circumstances:

1. Detecting scene changes (applying filer_motion_est will have the side
effect of flagging frames that are part of a new scene)
2. Detecting crops (filer_crop_detect, this is a good candidate to move to
core modules)
3. Tracking objects to obscure them (like faces)
4. Trippy effects

I hope  this clears things up.

Zach




>
> On Sat, Apr 5, 2008 at 2:10 PM, Mads Bondo Dydensborg
> <mads at dydensborg.dk> wrote:
> > mandag 24 Marts 2008 skrev Dan Dennedy:
> >
> > > On Sun, Mar 23, 2008 at 3:26 PM, Mads Bondo Dydensborg
> >
> > > >  I have some footage taken with a helmet cam in 640x480 @30 fps
> (4/3),
> >  that I
> >  > >  would like to use in a PAL DV 16/9 project.
> >  > >
> >  > >  What is the best way to get the highest quality of the headcam
> footage in
> >  > >  kdenlive? Should I transcode it using some external program, or
> just add
> >  it
> >  > >  as a clip to kdenlive?
> >  >
> >  > The simplest is to just add it as a clip. MLT does framerate
> >  > decimation and image resampling automatically. However, to get more
> >  > quality, you need high quality temporal interpolation. Zachard Drew
> >  > wrote the motion estimation module[1] in MLT that can use in an inigo
> >  > job to transcode it prior to use in kdenlive. However, I do not have
> >  > any experience using motion estimation for this. After making sure to
> >  > build the module (it is opt-in), try this as a hint to get started:
> >  >
> >  > $ inigo -profile dv_pal_wide slowmotion:some-ntsc.avi speed=0.8342
> >  > -consumer avformat:my.dv ...
> >
> >  Hi Dan
> >
> >  I had quite some trouble getting this to work:
> >
> >  $ /opt/bin/inigo -profile dv_pal_wide -producer slowmotion:avi_0019.avi
> >  speed=0.8342 -consumer avformat:0019.dv progress=1
> >
> >  Turns out, the command line parsing in inigo can be tricked to loop
> (some more
> >  info below).
> >
> >  This command works (I have still to experiment further):
> >
> >  $ /opt/bin/inigo -profile dv_pal_wide -consumer avformat:0019.dv
> progress=1
> >  slowmotion:avi_0019.avi speed=0.8342
> >
> >  The "-producer" is from me misreading the cli syntax of inigo. My bad.
> But
> >  still, I suspect there is a loop in inigo command line parsing. A quick
> look
> >  with gdb seems to indicate a never ending loop in scanning the command
> line
> >  arguments of the first try:
> >
> >  Program received signal SIGINT, Interrupt.
> >  [Switching to Thread -1210513216 (LWP 31948)]
> >  0xb6d02b13 in producer_inigo_init (profile=0x8091608,
> type=producer_type,
> >  id=0x804b8c7 "inigo", argv=0xbf9ffef8)
> >     at producer_inigo.c:157
> >  157                     else if ( !strcmp( argv[ i ], "-attach" ) ||
> >  (gdb) bt
> >  #0  0xb6d02b13 in producer_inigo_init (profile=0x8091608,
> type=producer_type,
> >  id=0x804b8c7 "inigo",
> >     argv=0xbf9ffef8) at producer_inigo.c:157
> >  #1  0xb7f591c2 in mlt_repository_create (this=0x8050e28,
> profile=0x8091608,
> >  type=producer_type,
> >     service=0x804b8c7 "inigo", input=0xbf9ffef8) at mlt_repository.c:171
> >  #2  0xb7f5884c in mlt_factory_producer (profile=0x8091608,
> >  service=0x804b8c7 "inigo", input=0xbf9ffef8)
> >     at mlt_factory.c:179
> >
> >  (gdb)
> >  145             for ( i = 0; argv[ i ] != NULL; i ++ )
> >  (gdb) p i
> >  $6 = 1
> >  (gdb) p argv[i]
> >  $7 = 0xbfa006a5 "dv_pal_wide"
> >  (gdb) n
> >  147                     if ( !strcmp( argv[ i ], "-group" ) )
> >  (gdb) p i
> >  $8 = 2
> >  (gdb) p argv[i]
> >  $9 = 0xbfa006b1 "-producer"
> >  (gdb) n
> >  157                     else if ( !strcmp( argv[ i ], "-attach" ) ||
> >  (gdb) n
> >  202                     else if ( !strcmp( argv[ i ], "-repeat" ) )
> >
> >  This continues, and never matches anything. At some point it hits a
> i--; - and
> >  loops. For ever AFAICT :-/
> >
> >
> >  > It's just that 0.8342 is an approximation, and I do not know how good
> >  > the results will be.
> >
> >  How did you get the 0.8342?
> >
> >  25/30
> >  .83333333333333333333
> >  25000/29999
> >  .83336111203706790226
> >
> >
> >
> >  > Sharing your experience would be valuable.
> >
> >  My first experience is this: I loose the sound, right?
> >
> >
> >  > There
> >  > is a trick to get kdenlive to do this for you without transcoding.
> You
> >  > can convert the above into a westley-based "virtual" clip and load
> the
> >  > .westley into kdenlive:
> >  >
> >  > $ inigo -profile dv_pal_wide slowmotion:some-ntsc.avi speed=0.8342
> >  > -consumer westley:some-ntsc.westley
> >
> >  Thanks - I have yet to test it out.
> >
> >  Now, that it actually works for me, I will test with some more clips,
> and see
> >  if I can figure out anything about the quality of the result, and so
> on.
> >
> >  Regards
> >
> >  Mads
> >
> >  --
> >  Mads Bondo Dydensborg   mads at dydensborg.dk
> http://www.madsdydensborg.dk/
> >
> >  Today, the record companies are saying MP3s are the biggest evil.
> Tomorrow
> >  they're going to say they're the greatest thing when they figure
> >  them out.
> >                                - Gene Kan, Gnutella developer
> >
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Register now and save $200. Hurry, offer ends at 11:59 p.m.,
> Monday, April 7! Use priority code J8TLD2.
>
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Kdenlive-devel mailing list
> Kdenlive-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kdenlive-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdenlive/attachments/20080407/32f44a3f/attachment.html>


More information about the Kdenlive mailing list