View Full Version : 30i to 24p Conversion Process Explained?
Acid_Reign
3rd May 2008, 19:46
Hi everyone,
I am currently working on a production that may require me to convert miniDV footage* into digital film**. The reason for this would be purely to achieve the proverbial "film-look," which is not something I would normally attempt (as I prefer to observe the original frame rate whenever possible), but it is for a competiton amongst other films where the judges' eyes will most likely be adjusted to that rate of motion, and even if the difference isn't noticeable enough, I'd still like to learn how to do it for future reference.
I have searched as much as I can on Google and this forum, and although I have found processes that set me in the right direction of potential solutions, I can't really make heads or tails of any of them. Most of the scenarios in other threads are either for "PAL" conversions (I'm "NTSC"), deal with functions that apparently no longer exist (mvfps), or talk about temporal blurring across interpolated frames, which I am unfamiliar with.
I know that I should shoot at 1/60 shutter speed in my situation to mimic the 1/2 frame rate exposure that film typically exhibits, but after import I'm lost from there. Would someone be so kind as to outline, step-by-step, what I would need to do to achieve the desired result? I want to try MVBob or MCBob (since I hear great things about them but haven't tried them yet), but is it really a necessity to deinterlace and convert the footage first, and then edit it, as I've read? Because the end result can only be 6 minutes long, so if I send all of the unedited footage (complete with outtakes, alternate shots, etc.) it will take forever to process. Are there specific advantages to leaving it untouched or am I misinterpreting that advice?
So, I will ingest using Premiere Pro CS3, save to DV-AVI (or lossless intermediate if editing first), import into VirtualDubMod through AVISynth, and use a script along these lines:
AVISource(...)
dvbob(...)
mvfps(...) # or equivalent, using some numbers to oversample and blur
resize() #, etc.
Is that correct? If so, some specifics would really help.
Thanks a lot!
* 525-line (720×480), 29.97 fps, 59.94 Hz, interlaced MPEG-2
** 525-line (720×480)***, 23.976 fps, [23.976, 47.952 Hz, or 48 Hz? Not sure on this], progressive MPEG-4 video
*** Master format; will be resizing to H.264-friendly web-sized delivery resolution upon render
Blue_MiSfit
3rd May 2008, 20:23
You came to the right place!
AviSynth with a good bobber and MVTools can do a fantastic job of 60i -> 24p!
Here's a sample script that will be hideously slow, but look fantastic!
You will want to use Cedocida as your DV decoder, with it outputting YUY2 so that no chroma information is lost.
AVISource("movie.avi")
AssumeBFF() #DV - so it should be BFF
MCBob() #Super awesome, super slow bobber (60i -> 60p)
#From the MVTools Documentation - modified:
#Assume progressive NTSC 60 fps source. Lets try convert it to 23.976
source=last
backward_vec = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1, search=3)
forward_vec = source.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1, search=3)
cropped = source.crop(4,4,-4,-4) # by half of block size 8
backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2, search=3)
forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2, search=3)
#Now do the conversion
source.MVFlowFps2(backward_vec, forward_vec, backward_vec2, forward_vec2, num=24000, den=1001, idx=1, idx2=2)
That's it. The whole pipeline should work in YUY2, so you can convert to YV12 at the end if your encoder accepts it. If you're going to MPEG-2 with CCE or ProCoder, leave it as YUY2, since they prefer that
Some of the popular video -> cine programs also apply some color correction to make your video more film-like. This can be accomplished as well, but I'm not sure how. I think it's possible to load Photoshop curves into AviSynth, but don't quote me on that...
Either way, you will get a pretty damned good result! This method isn't perfect, there may be some artifacts, but is usually looks great.
~MiSfit
Blue_MiSfit
3rd May 2008, 20:52
Oh, and regarding converting before / after editing
It all depends. Most likely you can edit first. If you're going to do a lot of effects, and multi-generational rendering all in DV, then I would at least render the DV to a lossless 60i YUY2 format - like Lagarith or HuffYVU. DV is good enough for 1-2 compression cycles, but beyond that it starts showing artifacts.
Rendering before editing is only really necessary with hard telecine IMO. Some editors can deal with it, but I dont trust that. The last thing you want is constant cadence pattern breaks at your edit points!
~MiSfit
Acid_Reign
4th May 2008, 02:00
Thanks for the reply! I haven't tested this method yet, but just so we're clear, do you mean 60i as in 59.94 fields/second or as in 59.94 frames/second? Because my original question was concerning the former (i.e., 29.97 frames/second interlaced).
I presume it's all the same if the bob outputs 59.94 progressive; just wondering if this little detail throws anything off.
Also, does this work the same way as SelectEvery(), in that I will not have to adjust the duration of the audio?
Output is H.264 MPEG-4, as mentioned in the OP, which I'd be doing through MeGUI. I forget what colorspace x264 prefers (at work right now), but that'd be it. Also want to keep it Mod16 for compressibility at >= 50 MB. I know that probably makes no difference once it's 24p, but for completeness' sake, that is the delivery format.
Concerning gamma curves, can anyone recommend some "standard" values (or Photoshop files/presets I can load or copy the values of) that produce attractive results?
Thanks!
Blue_MiSfit
4th May 2008, 02:25
Yes, I meant 59.94 fields per second :)
Bob deinterlacing interpolates each field to a frame, and compensates for the spatial shift.
The process will not change the length of the video, so the audio will not need to be adjusted.
For x264, you want to add ConvertToYV12() to the end of the script. You can resize however you want, but I would make the colorspace conversion the very last thing you do.
I've never messed with photoshop curves in AviSynth. I think it's possible, and IIRC the "Magic Bullet" program applies a slight red boost when going from DV to film. I'm really not sure, and wouldn't worry about it :) Get the frame rate conversion working first, then worry about the colors. I think you will be very impressed with the results.
Interestingly, the opposite (24p to 60i) can also look quite convincing!
~MiSfit
thetoof
4th May 2008, 07:31
For the colors, it depends a lot on your camera... I did something with a cheap miniDV and the red channel was fluctuating a LOT throughout the movie... so I had to use multiple trim+color correction to ajust it, which is a pain in the ***
If your camera was good and if you did the white balance every time before shooting, it should be fine.
Either way, could you upload some frames of at least 3 different scenes? 10 lossless frames of 3 scenes with very different exposures would be the best. I've become quite good at spotting color problems, so I could help you finding good settings. Nothing exists that'd be adapted to every source...
Acid_Reign
4th May 2008, 08:23
Yes, I meant 59.94 fields per second :)
Bob deinterlacing interpolates each field to a frame, and compensates for the spatial shift.
The process will not change the length of the video, so the audio will not need to be adjusted.
For x264, you want to add ConvertToYV12() to the end of the script. You can resize however you want, but I would make the colorspace conversion the very last thing you do.
I've never messed with photoshop curves in AviSynth. I think it's possible, and IIRC the "Magic Bullet" program applies a slight red boost when going from DV to film. I'm really not sure, and wouldn't worry about it :) Get the frame rate conversion working first, then worry about the colors. I think you will be very impressed with the results.
Interestingly, the opposite (24p to 60i) can also look quite convincing!
~MiSfit
Great; thanks a lot!
For the colors, it depends a lot on your camera... I did something with a cheap miniDV and the red channel was fluctuating a LOT throughout the movie... so I had to use multiple trim+color correction to ajust it, which is a pain in the ***
If your camera was good and if you did the white balance every time before shooting, it should be fine.
Either way, could you upload some frames of at least 3 different scenes? 10 lossless frames of 3 scenes with very different exposures would be the best. I've become quite good at spotting color problems, so I could help you finding good settings. Nothing exists that'd be adapted to every source...
I would, but I haven't actually shot the footage yet. This was merely a preemptive inquiry so I could determine my post-production workflow. However, I'd be happy to do so once I have it.
scharfis_brain
4th May 2008, 11:01
60i to 24p should be a pre-production thing.
converting 60i to 24p after cutting and inserting effects / overlays will yield into broken scene changes and sometimes weird other things.
Blue_MiSfit
4th May 2008, 11:46
That's a good point. I hadn't really thought about that.
thetoof
4th May 2008, 13:04
I think he meant "after filming" by using "post-production"... but yeah, good point, avisynth should be the "pre-production" of "post-production". ;)
Only thing, imo it's better to do all the other enhancements (such as denoise and color correction) before changing the framerate.
Acid_Reign
5th May 2008, 06:41
60i to 24p should be a pre-production thing.
converting 60i to 24p after cutting and inserting effects / overlays will yield into broken scene changes and sometimes weird other things.
Hm, okay, but then how do I avoid encoding for weeks (since I'd be using MCBob)? And processing a ton of footage that I ultimately won't end up using? What if I were to splice together the important parts, while discarding the rest, and adding in effects and overlays later?
I think he meant "after filming" by using "post-production"... but yeah, good point, avisynth should be the "pre-production" of "post-production". ;)
Yes, that is what I meant.
Only thing, imo it's better to do all the other enhancements (such as denoise and color correction) before changing the framerate.
So then, what order is the most preferable? Shoot, Capture, Splice (maybe), Color Correct, Change FPS, Edit, Encode?
thetoof
5th May 2008, 18:07
I'd say : Shoot, capture, post (give us a sample so we can help spotting the bugs, most common with miniDV are denoise, color correction, deshaking, sharpening and resizing (if you don't want to encode anamorphic... and it's easier to add other effects if you already have the "display resolution")), edit, encode.
During capture, use the type that outputs wav audio. (I don't remember if it's type 1 or 2 and I can't search atm)
What I usually do with DV is select only the footage I want to use later on before applying filters on it, cuz yeah, MCBob is damn slow.
avisource("DVfile.avi")
MCbob()
#other filters
Trim(start framex2, end framex2) # x2 because mcbob doubles the framerate
You can also do your montage in avisynth:
a=avisource("dvfile1.avi").mcbob.filters.trim
b=avisource("dvfile2.avi").mcbob.filters.trim
c
d
etc etc etc
a++b++c++d++etc etc etc
And there's a bunch of transition effects you can use in avisynth. Fade in, out, animate, overlay, dissolve and many others.
Then, change fps before doing other stuff in another program and encoding.
foxyshadis
7th May 2008, 10:34
Required link: film look thread (http://forum.doom9.org/showthread.php?t=87791) from 2005, where a lot of good info on the topic was discussed.
about the workflow, this is really generic and it should work only with some specific editors, but i would:
1. edit the native grabs in 24p project and don't worry about all the artifacts that will happen
2. consolidate the project with head/tails set to some resonable number (like 5 frames maybe?) - here you will have to check how the editor trims the material, no frameconversions should be made and stuff like that, just nice native trims.
3. do all the framerate conversion on consolidated clips
4. replace the consolidated clips with avisynth processed versions
4b. back to editor, now you can add overlays, text, whatever
5. and export your final cut.
test the entire chain 1st thought (sort of an off-line workflow).
2Bdecided
7th May 2008, 14:36
Either way, you will get a pretty damned good result! This method isn't perfect, there may be some artifacts, but is usually looks great.I wouldn't go that far.
Unless you light it properly, and move the camera like a film camera, it'll look awful.
Also, the 60>24 artefacts can be quite weird.
If the shutter wasn't ~1/50th, you need to add motion blur - which requires a painful mvflowfps2 up to 600fps or something similar, then blurring across these frames, and then a suitable select every. Something like this...
MVFlowFps2(backward_vec, forward_vec, backward_vec2, forward_vec2, num=600000, den=1001, idx=1, idx2=2)
temporalsoften(10,255,255,mode=1)
selectevery(25,0)
Much better to shoot in 1/50th to start with!
Cheers,
David.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.