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

Mads Bondo Dydensborg mads at dydensborg.dk
Sat Apr 5 21:10:57 UTC 2008

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 
> >  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, 
    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

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?


> 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.



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

More information about the Kdenlive mailing list