Re: [CinCV] Feature Films in Cinelerra
Ichthyostega wrote: Cinelerra can't capture the concept of two objects in the Session "belonging together". Moreover, all infrastructure to capture the "history" which led to a certain editing situation is lacking. Building either one of these things would IMHO be the prerequisite of solving that problem with audio-video sync properly. The model I suggested is by far simpler: If the EDL can be examined for bad sync, it can be done internally in Cinelerra. The suggested flow goes as follows, and it's run every time any change is made in any sound track: (1) Check if the current sound track has the "sync lock" flag set (an attribute to be added to each sound track). If not, quit at this point. (2) Scan through all video tracks, and check if any of them is based on the same asset. If not, quit. (3) Change the start attribute of the audio track to match the video track (some frame rate / sample rate adjustments apply) This simplistic flow doesn't say what happens if there's more than one video track found in (2), or even more complicated, if there are two segments of the same asset in the video track, both overlapping the audio segment (which is quite common, e.g. sound bridge). But the point is that this is an operation that depends only on information which is output to the EDL file, so there's no question about the feasibility. And if it's difficult to hook this on every change in the sound track, I'm sure we'll all be happy with a "sync this track" entry when right-clicking an audio track, or something like that. And I would love to find the time to dive into the Cinelerra sources myself. I never get to that. Eli -- Web: http://www.billauer.co.il ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] Feature Films in Cinelerra
Am 20.11.2011 23:09, schrieb Eli Billauer: > ... because I thought this issue will be solved within Cinelerra itself > pretty soon. > It seemed wrong to me, that the process would be a text application saying > "Channel X doesn't match channel Y by Z seconds at time T. Do you want to > correct?". It would be so much more sensible, that an attribute of the sound > track would indicate that when the sound is taken from a video track, it > should always be synced. Yes indeed. Actually the problem is that the "model" which Cinelerra uses internally was designed way too simplistic right from start. Cinelerra can't capture the concept of two objects in the Session "belonging together". Moreover, all infrastructure to capture the "history" which led to a certain editing situation is lacking. Building either one of these things would IMHO be the prerequisite of solving that problem with audio-video sync properly. Unfortunately Cinelerra is a very powerful and flexible tool. There is a lot of things you can do with video and audio data. Consequently it is absolutely impossible to tell if a given situation in a session is "out of sync". Well, without breaking or missing some important corner cases, that is. Personally I did larger projects, where the sound was captured separately and synchronised with a flap. I used a bunch of python scripts plus quite some manual bookkeeping plus some very specific conventions to add the proper audio tracks after the image edit was in place. Basically this and a lot of similar experiences finally led me to jump into the Lumiera project (which, as some as you may recall, started out as an general overhaul of the Cinelerra code base). Cheers, Hermann V ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] Feature Films in Cinelerra
The audio/video locking thing has bothered me in the past, since even an accidental move of either can cause a slight lack of sync, which is hard to spot and is nevertheless annoying in the final render. It's interesting that this issue isn't handled by Cinelerra itself. In the past I've thought about writing a script fixing this in Perl, which makes the necessary time calculations on the EDL file (directly) for spotting unsynced audio/video, issues warnings and suggests correcting these things. I never got to that, because I thought this issue will be solved within Cinelerra itself pretty soon. It seemed wrong to me, that the process would be a text application saying "Channel X doesn't match channel Y by Z seconds at time T. Do you want to correct?". It would be so much more sensible, that an attribute of the sound track would indicate that when the sound is taken from a video track, it should always be synced. Want to lock video and audio together? Then Cinelerra isn't the tool you want. -- Web: http://www.billauer.co.il ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] Feature Films in Cinelerra
On 11/20/2011 10:26 PM, feli wrote: Le 2011-11-20 11:27, Heikki Repo a écrit : 2011/11/20 Leandro Martins: Hi, I would like to know where I could find information about people editing feature films meant for theatrical release with Cinelerra. I'm ready for a little sweat when it comes to figure out and put together the best machine to run it on. What worries me, though is whether the software will be able to handle the task somehow easily. I try to use as much free software as possible not just for economic reasons but to back the philosophy behind it. I would love to add Cinelerra to my professional kit. Thanks a lot! Good work for you guys. Hi Leandro, What kind of workflow do you have? Are you shooting digital or film? Do you need to collaborate with post production houses? Separate offline and online edit? These questions are rather important, because I'm afraid to say that Cinelerra might not yet be there for heavy professional work. Why? The biggest problem I can see is the lack of support for good consistent handling of timecode. If, for example, you are going to do an offline edit with DV and later recapture footage from HDCAM according to an EDL in a post production house, it won't be too easy. Some other things to consider: - Cinelerra can be somewhat fickle when doing cuts. It isn't too difficult to get black frames between cuts if one isn't very careful. - You'll probably have to do quite many saves and backups. A LOT of saves and backups. - Codecs and file formats: Linux video does support many formats, at least decode them. How efficient it is when doing it is another question. - The UI doesn't really have too many guides for moving video around. Want to know how many frames you are dragging a clip forward or backwards? Want to lock video and audio together? Then Cinelerra isn't the tool you want. To sum it up: it can be done, but it won't be too enjoyable trip, at least if one has gotten used to many small but useful features present in professional software. Cinelerra is certainly at the moment the best Linux editing software, but unfortunately it doesn't mean that it would be the tool I'd select for important work. If you want to edit on Linux, you might be interested of Lightworks, which should be released as beta for Linux next month. Sorry to offer such a depressing view on Cinelerra -- I'm very much for open source movement and use linux as my main operating system, but at the moment it just isn't yet there if professional editing work is concerned. Best regards Heikk ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra Hi Leandro, At onset, I must admit that I share some of the views of Heikki with regard to using Cinelerra for editing lengthy films. However let me share my experience, I've been making short films since 2004, short films that I presented at our local kino club (kino Montréal being the first one of these clubs, http://www.kino00.com/), I moved to Linux some time in 2008, because I learn about Cinelerra and believed that It could match other professional editing software. The learning curved has been steep and had it fair share of frustration and lengthy problem/resolution processes. I think that the worst of them resulted from the lack of audio/video lock. It is frustrating to realize after multiples edit steps on your time line, that an audio and a video sequences that you had alined together are off by some keyframe because the audio or video track was still "armed" while you where editing an other track. I supposed that now that I'm comfortable with Cinelerra, after 3 or 4 years of editing 5 to 20 minutes short films, I would find it interesting to tackle a full length production. Recently I've put up a render farm of 8 cores and I'm been editing footage in 1080p successfully. I use ffmpeg (an essential tool) to convert AVC video (.MOV) from my cannon camera to Mjpeg and edit the Mjpeg in Cinelerra. I export the final edit to raw YUV files that I convert to what ever final format with ffmpeg. I use 4 hard drive in a raid 0 configuration to hold the very large video files. Some time I find it useful to devide a project in a coupled of smaller projects, which export's are united later in the production process. In such a work flow, a feature film of 120 minutes would require some very large hard drive to hold all the intermediate raw or Mjpeg footage. I also read some where (correct me if I'm wrong) that the render engine as no limits as to the size of the project. I've editing a few short films in 2k and made some test (not exhaustive or anything) in a 4k project. Editing 4k footage, albeit requirering a massive render farm would seem to be an advantage of Cinelerra over some professional video editing software. Hence to sum up, I think that Cinelerra could be use for professional work if you master its secrets, divide your project is sm
Re: [CinCV] Feature Films in Cinelerra
Le 2011-11-20 11:27, Heikki Repo a écrit : 2011/11/20 Leandro Martins: Hi, I would like to know where I could find information about people editing feature films meant for theatrical release with Cinelerra. I'm ready for a little sweat when it comes to figure out and put together the best machine to run it on. What worries me, though is whether the software will be able to handle the task somehow easily. I try to use as much free software as possible not just for economic reasons but to back the philosophy behind it. I would love to add Cinelerra to my professional kit. Thanks a lot! Good work for you guys. Hi Leandro, What kind of workflow do you have? Are you shooting digital or film? Do you need to collaborate with post production houses? Separate offline and online edit? These questions are rather important, because I'm afraid to say that Cinelerra might not yet be there for heavy professional work. Why? The biggest problem I can see is the lack of support for good consistent handling of timecode. If, for example, you are going to do an offline edit with DV and later recapture footage from HDCAM according to an EDL in a post production house, it won't be too easy. Some other things to consider: - Cinelerra can be somewhat fickle when doing cuts. It isn't too difficult to get black frames between cuts if one isn't very careful. - You'll probably have to do quite many saves and backups. A LOT of saves and backups. - Codecs and file formats: Linux video does support many formats, at least decode them. How efficient it is when doing it is another question. - The UI doesn't really have too many guides for moving video around. Want to know how many frames you are dragging a clip forward or backwards? Want to lock video and audio together? Then Cinelerra isn't the tool you want. To sum it up: it can be done, but it won't be too enjoyable trip, at least if one has gotten used to many small but useful features present in professional software. Cinelerra is certainly at the moment the best Linux editing software, but unfortunately it doesn't mean that it would be the tool I'd select for important work. If you want to edit on Linux, you might be interested of Lightworks, which should be released as beta for Linux next month. Sorry to offer such a depressing view on Cinelerra -- I'm very much for open source movement and use linux as my main operating system, but at the moment it just isn't yet there if professional editing work is concerned. Best regards Heikk ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra Hi Leandro, At onset, I must admit that I share some of the views of Heikki with regard to using Cinelerra for editing lengthy films. However let me share my experience, I've been making short films since 2004, short films that I presented at our local kino club (kino Montréal being the first one of these clubs, http://www.kino00.com/), I moved to Linux some time in 2008, because I learn about Cinelerra and believed that It could match other professional editing software. The learning curved has been steep and had it fair share of frustration and lengthy problem/resolution processes. I think that the worst of them resulted from the lack of audio/video lock. It is frustrating to realize after multiples edit steps on your time line, that an audio and a video sequences that you had alined together are off by some keyframe because the audio or video track was still "armed" while you where editing an other track. I supposed that now that I'm comfortable with Cinelerra, after 3 or 4 years of editing 5 to 20 minutes short films, I would find it interesting to tackle a full length production. Recently I've put up a render farm of 8 cores and I'm been editing footage in 1080p successfully. I use ffmpeg (an essential tool) to convert AVC video (.MOV) from my cannon camera to Mjpeg and edit the Mjpeg in Cinelerra. I export the final edit to raw YUV files that I convert to what ever final format with ffmpeg. I use 4 hard drive in a raid 0 configuration to hold the very large video files. Some time I find it useful to devide a project in a coupled of smaller projects, which export's are united later in the production process. In such a work flow, a feature film of 120 minutes would require some very large hard drive to hold all the intermediate raw or Mjpeg footage. I also read some where (correct me if I'm wrong) that the render engine as no limits as to the size of the project. I've editing a few short films in 2k and made some test (not exhaustive or anything) in a 4k project. Editing 4k footage, albeit requirering a massive render farm would seem to be an advantage of Cinelerra over some professional video editing software. Hence to sum up, I think that Cinelerra could be use for professional work if you master its secrets, divide your project is sm
Re: [CinCV] Blur keyframing : flickering
Am 20.11.2011 14:53, schrieb Michal Fapso: > Hi Hannes, I am really confused now. I tried to isolate the problem, > Here is the full output of the compiled test: > > blur: frame=2 p.vert=1 n.vert=1 p.hori=1 n.hori=1 psc=0.971831 nsc=0.028169 > prev_frame=0 next_frame=71 > intp_vert=1.00e+00 > (int)intp_vert=1 > (prev.vertical * prev_scale + next.vertical * next_scale) > 0 > (prev.vertical * prev_scale + next.vertical * next_scale) > 1 > intp_vert_double > 0 > intp_vert_double == 1 > next_scale_prev_scale = > 2.7375520730013886982903288168017752468585968017578125e-02 > next_scale * prev_scale = > 2.7375520730013886982903288168017752468585968017578125e-02 > next_scale_prev_scale < next_scale * prev_scale > typeid(next_scale_prev_scale) = d > typeid(next_scale * prev_scale) = d > > > blur: frame=3 p.vert=1 n.vert=1 p.hori=1 n.hori=1 psc=0.957746 nsc=0.0422535 > prev_frame=0 next_frame=71 > intp_vert=1.00e+00 > (int)intp_vert=0 > (prev.vertical * prev_scale + next.vertical * next_scale) > 0 > (prev.vertical * prev_scale + next.vertical * next_scale) < 1 I see. The problem is that this sum is sometimes slightly smaller than 1 due to floatingpoint rounding when the exact result should be 1. So, your suggested fix to just copy the prev.vertical and prev.horizontal is the right thing to do. -- Hannes ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] Blur keyframing : flickering
Thanks for your explanation, Einar. Michal On 20 November 2011 17:24, Einar Rünkaru wrote: > On Sun, Nov 20, 2011 at 3:53 PM, Michal Fapso wrote: >> Hi Hannes, I am really confused now. I tried to isolate the problem, >> so I created a small C test program (it is attached to this mail). It >> simulates the interpolation between frames 0 and 71 for only 2 frames >> (#2 which works fine and #3 which shows the rounding error). The main >> problem seems to come from this: >> >> double next_scale_prev_scale = next_scale * prev_scale; >> >> ...but then, interestingly (next_scale_prev_scale != next_scale * >> prev_scale). Can someone explain that? Maybe I am missing something >> obvious here. >> > Floating point calculation is not exact. This means if you try to > compare to fp variables the result of == and != is not what you > expect. If you use exact comparision in a program it is a bug. > > Regarding > ext_scale_prev_scale != next_scale * prev_scale: > > FP processor calculates some bits more, than stored in memory. The > exessive bits are thown away while storing. Immediatly after > mutiplication there are some bits more than in result stored somwhere. > If these bits are not zero the memory variant is not equal to just > calculated result. > > Einar > > ___ > Cinelerra mailing list > Cinelerra@skolelinux.no > https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra > ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] Feature Films in Cinelerra
2011/11/20 Leandro Martins : > Hi, > > I would like to know where I could find information about people editing > feature films meant for theatrical release with Cinelerra. > > I'm ready for a little sweat when it comes to figure out and put together > the best machine to run it on. What worries me, though is whether the > software will be able to handle the task somehow easily. > > I try to use as much free software as possible not just for economic reasons > but to back the philosophy behind it. I would love to add Cinelerra to my > professional kit. > > Thanks a lot! > > Good work for you guys. > Hi Leandro, What kind of workflow do you have? Are you shooting digital or film? Do you need to collaborate with post production houses? Separate offline and online edit? These questions are rather important, because I'm afraid to say that Cinelerra might not yet be there for heavy professional work. Why? The biggest problem I can see is the lack of support for good consistent handling of timecode. If, for example, you are going to do an offline edit with DV and later recapture footage from HDCAM according to an EDL in a post production house, it won't be too easy. Some other things to consider: - Cinelerra can be somewhat fickle when doing cuts. It isn't too difficult to get black frames between cuts if one isn't very careful. - You'll probably have to do quite many saves and backups. A LOT of saves and backups. - Codecs and file formats: Linux video does support many formats, at least decode them. How efficient it is when doing it is another question. - The UI doesn't really have too many guides for moving video around. Want to know how many frames you are dragging a clip forward or backwards? Want to lock video and audio together? Then Cinelerra isn't the tool you want. To sum it up: it can be done, but it won't be too enjoyable trip, at least if one has gotten used to many small but useful features present in professional software. Cinelerra is certainly at the moment the best Linux editing software, but unfortunately it doesn't mean that it would be the tool I'd select for important work. If you want to edit on Linux, you might be interested of Lightworks, which should be released as beta for Linux next month. Sorry to offer such a depressing view on Cinelerra -- I'm very much for open source movement and use linux as my main operating system, but at the moment it just isn't yet there if professional editing work is concerned. Best regards Heikk ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] Blur keyframing : flickering
On Sun, Nov 20, 2011 at 3:53 PM, Michal Fapso wrote: > Hi Hannes, I am really confused now. I tried to isolate the problem, > so I created a small C test program (it is attached to this mail). It > simulates the interpolation between frames 0 and 71 for only 2 frames > (#2 which works fine and #3 which shows the rounding error). The main > problem seems to come from this: > > double next_scale_prev_scale = next_scale * prev_scale; > > ...but then, interestingly (next_scale_prev_scale != next_scale * > prev_scale). Can someone explain that? Maybe I am missing something > obvious here. > Floating point calculation is not exact. This means if you try to compare to fp variables the result of == and != is not what you expect. If you use exact comparision in a program it is a bug. Regarding ext_scale_prev_scale != next_scale * prev_scale: FP processor calculates some bits more, than stored in memory. The exessive bits are thown away while storing. Immediatly after mutiplication there are some bits more than in result stored somwhere. If these bits are not zero the memory variant is not equal to just calculated result. Einar ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
[CinCV] Re: Your message to Cinelerra awaits moderator approval
På Sun, 20 Nov 2011 15:56:01 +0100, skrev Leandro Martins : How do I add myself to the list? If it's just a matter of asking through this e-mail, please add me. Thanks a lot! You can subscribe yourself through the mailing list's web interface: https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra You don't have to re-post your question about feature films edited in Cinelerra; I let that one through now. -- Herman Robak ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
[CinCV] Feature Films in Cinelerra
Hi, I would like to know where I could find information about people editing feature films meant for theatrical release with Cinelerra. I'm ready for a little sweat when it comes to figure out and put together the best machine to run it on. What worries me, though is whether the software will be able to handle the task somehow easily. I try to use as much free software as possible not just for economic reasons but to back the philosophy behind it. I would love to add Cinelerra to my professional kit. Thanks a lot! Good work for you guys.
Fwd: [CinCV] [PATCH] Fix compilation on Ubuntu Oneiric (11.10)
-- Forwarded message -- From: Einar Rünkaru Date: Sun, Nov 20, 2011 at 5:25 PM Subject: Re: [CinCV] [PATCH] Fix compilation on Ubuntu Oneiric (11.10) To: cinelerra@skolelinux.no Hi > > PS: I still have the wrong font in the interface. > There is nothig to do. The font heuristics finds the best suitable font. The font found depends on the fonts available in the system. So it can be different on different systems. Try to install more fonts. Found at last: Cinelerra searches Helvetica by name. If your system has not Helvetica fonts some replacement will be used. Einar ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] [PATCH] Fix compilation on Ubuntu Oneiric (11.10)
Hi On Sun, Nov 20, 2011 at 4:51 PM, Raffaella Traniello wrote: > On 11/20/2011 03:22 PM, Einar Rünkaru wrote: >> >> git am [path_to]0001-Fix-compilation-on-Ubuntu-Oneiric-11.10.patch > > That worked. :-) Good to hear. I shall push it to master. Should I push it to rev2.2.0 branch too? > > PS: I still have the wrong font in the interface. > There is nothig to do. The font heuristics finds the best suitable font. The font found depends on the fonts available in the system. So it can be different on different systems. Try to install more fonts. Einar ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] problem with your repository
Hi Tom! On 11/16/2011 08:58 PM, Tom Tucker wrote: I tried to access your deb file at: http://repository.akirad.net/pool/main-hardy/cinelerra-swtc_0.1akirad1_all.deb Thanks for the notification. You found the link on the transitions and themes page, right? http://cinelerra.org/transitions.php Ciao! Raffaella ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] [PATCH] Fix compilation on Ubuntu Oneiric (11.10)
On 11/20/2011 03:22 PM, Einar Rünkaru wrote: git am [path_to]0001-Fix-compilation-on-Ubuntu-Oneiric-11.10.patch That worked. :-) I was able to compile Cin 2.2 just with the usual configure commands: ./configure --with-buildinfo=git/recompile --enable-mmx --without-pic Thank you very much. Ciao Raffaella PS: I still have the wrong font in the interface. ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] [PATCH] Fix compilation on Ubuntu Oneiric (11.10)
Hi On Sun, Nov 20, 2011 at 4:12 PM, Raffaella Traniello wrote: > Hi Einar! > >> Can anyone test attached patch on real Ubuntu Oneiric? > > Sorry I'm not expert on patches. > > I downloaded your patch in my home folder. This patch is intended to use with git Use the command (from cinelerra root) git am [path_to]0001-Fix-compilation-on-Ubuntu-Oneiric-11.10.patch Einar ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] [PATCH] Fix compilation on Ubuntu Oneiric (11.10)
Hi Einar! Can anyone test attached patch on real Ubuntu Oneiric? Sorry I'm not expert on patches. I downloaded your patch in my home folder. I gave the command: patch -p0 < 0001-Fix-compilation-on-Ubuntu-Oneiric-11.10.patch but I got: can't find file to patch at input line 14 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |From ca4a98da959a6f81d17f9687ad3c557353abc2bd Mon Sep 17 00:00:00 2001 |From: =?UTF-8?q?Einar=20R=C3=BCnkaru?= |Date: Mon, 14 Nov 2011 20:35:21 +0200 |Subject: [PATCH] Fix compilation on Ubuntu Oneiric (11.10) | |--- | cinelerra/Makefile.am |2 ++ | 1 files changed, 2 insertions(+), 0 deletions(-) | |diff --git a/cinelerra/Makefile.am b/cinelerra/Makefile.am |index c09cbba..e5237f6 100644 |--- a/cinelerra/Makefile.am |+++ b/cinelerra/Makefile.am -- File to patch: What am I doing wrong? Ciao Raffaella ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] Blur keyframing : flickering
Hi Hannes, I am really confused now. I tried to isolate the problem, so I created a small C test program (it is attached to this mail). It simulates the interpolation between frames 0 and 71 for only 2 frames (#2 which works fine and #3 which shows the rounding error). The main problem seems to come from this: double next_scale_prev_scale = next_scale * prev_scale; ...but then, interestingly (next_scale_prev_scale != next_scale * prev_scale). Can someone explain that? Maybe I am missing something obvious here. For interpolating the vertical variable, look at these 2 lines in the output: FRAME #2: intp_vert=1.00e+00 (int)intp_vert=1 FRAME #3: intp_vert=1.00e+00 (int)intp_vert=0 ...the same thing happens for the horizontal variable, so frame 3 will have no blurring effect applied. Here is the full output of the compiled test: blur: frame=2 p.vert=1 n.vert=1 p.hori=1 n.hori=1 psc=0.971831 nsc=0.028169 prev_frame=0 next_frame=71 intp_vert=1.00e+00 (int)intp_vert=1 (prev.vertical * prev_scale + next.vertical * next_scale) > 0 (prev.vertical * prev_scale + next.vertical * next_scale) > 1 intp_vert_double > 0 intp_vert_double == 1 next_scale_prev_scale = 2.7375520730013886982903288168017752468585968017578125e-02 next_scale * prev_scale = 2.7375520730013886982903288168017752468585968017578125e-02 next_scale_prev_scale < next_scale * prev_scale typeid(next_scale_prev_scale) = d typeid(next_scale * prev_scale) = d blur: frame=3 p.vert=1 n.vert=1 p.hori=1 n.hori=1 psc=0.957746 nsc=0.0422535 prev_frame=0 next_frame=71 intp_vert=1.00e+00 (int)intp_vert=0 (prev.vertical * prev_scale + next.vertical * next_scale) > 0 (prev.vertical * prev_scale + next.vertical * next_scale) < 1 intp_vert_double > 0 intp_vert_double == 1 next_scale_prev_scale = 4.04681610791509591140702184475230751559138298034667968750e-02 next_scale * prev_scale = 4.04681610791509591140702184475230751559138298034667968750e-02 next_scale_prev_scale > next_scale * prev_scale typeid(next_scale_prev_scale) = d typeid(next_scale * prev_scale) = d I hope someone can explain that magic to me :o) Michal On 20 November 2011 10:47, Johannes Sixt wrote: > Am 19.11.2011 23:46, schrieb Michal Fapso: >> I had one keyframe at 0 sec (0 blur radius) and another one at 3 >> seconds (30 blur radius) at 24fps. I added few printf commands to the >> blur.C to see what is going on there. The radius variable was >> interpolated correctly and increased steadily towards 30, but the >> horizontal and vertical were in about half of the frames 0 and in >> another frames 1 (quite randomly). When both were 0, blurring was >> actually turned off for those frames. > > Interesting. Could you repeat the printf test and dump all variables > used in the expression, like so: > > printf("blur: p.vert=%d n.vert=%d psc=%g nsc=%g intp=%g\n", > prev.vertical,next.vertical,prev_scale,next_scale, > prev.vertical * prev_scale + next.vertical * next_scale); > > -- Hannes > #include #include #include using namespace std; struct BlurConfig { int vertical; int horizontal; }; #define PRINT_IF(expr) if (expr) { printf("%s\n", #expr); } int main() { BlurConfig prev; BlurConfig next; prev.vertical = prev.horizontal = next.vertical = next.horizontal = 1; int prev_frame = 0; int next_frame = 71; for (int current_frame=2; current_frame<=3; current_frame++) { double next_scale = (double)(current_frame - prev_frame) / (next_frame - prev_frame); double prev_scale = (double)(next_frame - current_frame) / (next_frame - prev_frame); double intp_vert_double = prev.vertical * prev_scale + next.vertical * next_scale; double intp_hori_double = prev.horizontal * prev_scale + next.horizontal * next_scale; double next_scale_prev_scale = next_scale * prev_scale; printf("\n\nblur: frame=%d p.vert=%d n.vert=%d p.hori=%d n.hori=%d psc=%g nsc=%g\n", (int)current_frame, prev.vertical,next.vertical, prev.horizontal,next.horizontal, prev_scale,next_scale); printf("prev_frame=%d next_frame=%d\n", (int)prev_frame, (int)next_frame); printf("intp_vert=%.50e\n", (prev.vertical * prev_scale + next.vertical * next_scale)); printf("(int)intp_vert=%d\n", (int)(prev.vertical * prev_scale + next.vertical * next_scale)); PRINT_IF ((prev.vertical * prev_scale + next.vertical * next_scale) == 0); PRINT_IF ((prev.vertical * prev_scale + next.vertical * next_scale) > 0); PRINT_IF ((prev.vertical * prev_scale + next.vertical * next_scale) < 1); PRINT_IF ((prev.vertical * prev_scale + next.vertical * next_scale) == 1); PRINT_IF ((prev.vertical * prev_scale + n
Re: [CinCV] Blur keyframing : flickering
Am 19.11.2011 23:46, schrieb Michal Fapso: > I had one keyframe at 0 sec (0 blur radius) and another one at 3 > seconds (30 blur radius) at 24fps. I added few printf commands to the > blur.C to see what is going on there. The radius variable was > interpolated correctly and increased steadily towards 30, but the > horizontal and vertical were in about half of the frames 0 and in > another frames 1 (quite randomly). When both were 0, blurring was > actually turned off for those frames. Interesting. Could you repeat the printf test and dump all variables used in the expression, like so: printf("blur: p.vert=%d n.vert=%d psc=%g nsc=%g intp=%g\n", prev.vertical,next.vertical,prev_scale,next_scale, prev.vertical * prev_scale + next.vertical * next_scale); -- Hannes ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra