VideoHelp Forum
+ Reply to Thread
Results 1 to 22 of 22
Thread
  1. Member
    Join Date
    Oct 2018
    Location
    Switzerland
    Search Comp PM
    Hello Videohelp

    I was editing a video in Davinci Resolve and imported some .mts video from several HD camcorders. All the clips were interlaced. One camcorder recorded in 1440 x 1080i and I cropped the video to get rid of the black bars. Later on I stared just stretching the clips of that specific camcorder, and so only the first clip of that specific camcorder was cropped. I then exported the video and deinterlaced it afterwards in handbrake before publishing. When I checked the final product that came out of handbrake all was fine only that specific clip had worse interlacing artifacts than before deinterlacing.

    Now I only have access to the interlaced output and I can't go back to the original Davinci Resolve project to just change from cropping to stretching but the video needs to get published. Is there a solution I can use to fix that video without having to get access to the original Davinci Resolve project?

    Best wishes
    Quote Quote  
  2. Originally Posted by cyberflow View Post
    Is there a solution I can use to fix that video without having to get access to the original Davinci Resolve project?
    Not really, no. You can halve the vertical resolution followed by upscaling it to the original resolution. The end result will be a blurry version, but it should look better than the mess you have now.

    Stretching? You purposely screwed up the aspect ratio of the rest?
    Quote Quote  
  3. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    You really need to post pictures or maybe short video clips, cyberflow. If you want to have any shot of getting advice.
    Quote Quote  
  4. Member
    Join Date
    Oct 2018
    Location
    Switzerland
    Search Comp PM
    Thanks for your reply's manono and KarMa !

    1. Halving the resolution and up scaling sounds OK, and I can live with some loss in resolution as it is just a very short clip and the camcorders used anyway don't have the highest of resolution and the lighting is not great either (I just edited the video, the clips where recorded by other people). But which software would you recommend to resize to half the resolution correctly. Would Avidemux be the right software?

    2. The stretching is actually fixing the aspect ratio. The camcorder somehow screwed up the aspect ratio. If played without stretching everything looks much taller than it actually is. I attached the clip also so that you can have a look at it. I did not re-encoded it, I just used Avidemux to cut it and remove the sound without re-encoding so technically it is the original clip straight from the camcorder SD card just shortened a bit for size.

    3. You can also find the final interlaced output in a shortened version and with the audio removed for copyright reasons. I found that it is actually progressively encoded but contains interlaced frames. So technically its not 1080i but handbrake can deinterlace it with no problem.
    Image Attached Files
    Quote Quote  
  5. You should not crop 1440x1080i video to match 1920x1080. They are both 16:9, but 1440x1080 has a different pixel aspect ratio. I shoot all the time with my old Sony FX1, which is 1440x1080, and intermix that with 1920x1080 video shot on my newer cameras (BTW, my FX1 still blows the others away because of its optics and electronics, despite the slightly fewer number of pixels.)

    So, apply a PAR adjustment, and don't crop. I've been doing this for a long, long time and this is the correct way to do it.
    Last edited by johnmeyer; 3rd Oct 2018 at 11:33. Reason: typo
    Quote Quote  
  6. Member
    Join Date
    Oct 2018
    Location
    Switzerland
    Search Comp PM
    Originally Posted by johnmeyer View Post
    So, apply a PAR adjustment, and don't crop. I've been doing this for a long, long time and this is the correct way to do it.
    Thanks for the advice, could you tell me how I can apply such a PAR adjustment in Davinci Resolve or what software could be used to perform the task externally?
    Quote Quote  
  7. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    See if this helps (result from a quick Google search)

    https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=48735
    Quote Quote  
  8. Originally Posted by cyberflow View Post
    Thanks for the advice, could you tell me how I can apply such a PAR adjustment in Davinci Resolve
    I don't know that software but the general idea is simply to stretch the video horizontally from 1440x1080 to 1920x1080 (that's what a player does when it plays at 16:9 DAR). Then deinterlace if necessary.
    Quote Quote  
  9. The correct Pixel Aspect Ratio (PAR) for HDV (1440x1080 interlaced) video is 1.33333. Look for either the name or the acronym (PAR) in the Resolve help file and I'm sure you'll find it. You should get absolutely perfect 16:9 video, once you change from square to rectangular pixels (which is what this does) and will not have to crop or alter anything.
    Quote Quote  
  10. I see what you're saying, the 1440x1080i camera footage has more AR problems than a simple 16:9 stretch. The dominos are too are essentially too "short" so you've disproportionately stretched it to match the other footage (essentially zoomed in and reframed the shot slightly)

    The problem comes from resizing vertically (when you zoomed in) , while the video is still interlaced as fields. You cannot perform a progressive resize on interlaced content - otherwise you get those notching artifacts

    So what you would do if you had access to the native 1440x1080i camera footage - is just replace those sections in the exported Resolve video. If you wanted the same zoom level fix, you'd need to double rate deinterlace so it's progressive first, then apply the transform. Then reinterlace. Then you can replace those sections

    For example, the mp4 has frames 14-83, 172-198 derived from the 1440x1080i footage, you would splice in and replace those frames (and any affected) with the correct replacement . Your 00032.mts contains the frames from 14-83, but not from the 172-198 section . You'd need that corresponding section

    But yes you can do it without Resolve, but you incur more generation loss (you have to re-encode at least some frames, and then again if you deinterlace with handbrake and re-encode. Basically you have avoidable quality loss a few times)

    If it were me, and I no longer had the Resolve project, I would do it in avisynth and avoid handbrake completely. If you were going to deinterlace, I would do it there as well, so you incur fewer losses since just have re-encode once. If it were me I'd actually leave it as 1080p50 (but I guess it depends what your destination goals were)

    (BTW you have overbrights that you didn't correct in Resolve, it looks like you just clipped it, and the shots don't quite match color wise)
    Quote Quote  
  11. Member
    Join Date
    Oct 2018
    Location
    Switzerland
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by cyberflow View Post
    Thanks for the advice, could you tell me how I can apply such a PAR adjustment in Davinci Resolve
    I don't know that software but the general idea is simply to stretch the video horizontally from 1440x1080 to 1920x1080 (that's what a player does when it plays at 16:9 DAR). Then deinterlace if necessary.
    Yes that's what I did pretty much, I just stretched the video in Davinci Resolve and that worked fine. Only with one clip I forgot to stretch and cropped instead, which now causes problems since you're not supposed to crop interlaced video.
    Quote Quote  
  12. Originally Posted by cyberflow View Post
    Originally Posted by jagabo View Post
    Originally Posted by cyberflow View Post
    Thanks for the advice, could you tell me how I can apply such a PAR adjustment in Davinci Resolve
    I don't know that software but the general idea is simply to stretch the video horizontally from 1440x1080 to 1920x1080 (that's what a player does when it plays at 16:9 DAR). Then deinterlace if necessary.
    Yes that's what I did pretty much, I just stretched the video in Davinci Resolve and that worked fine. Only with one clip I forgot to stretch and cropped instead, which now causes problems since you're not supposed to crop interlaced video.
    No, you're not supposed to resize interlaced video vertically or the two fields are co-mingled and can no longer be deinterlaced. Cropping itself isn't a problem but by doing so you inadvertently caused the program to resize vertically and horizontally in order to generate a 1920x1080 frame.

    Note that the downscale/upscale method will reduce the combing but it will leave you with what looks like double exposures. Downscaled to 1920x420, then back up to 1920x1080:

    Click image for larger version

Name:	420.jpg
Views:	161
Size:	124.5 KB
ID:	46818
    Last edited by jagabo; 3rd Oct 2018 at 18:24.
    Quote Quote  
  13. Member
    Join Date
    Oct 2018
    Location
    Switzerland
    Search Comp PM
    Originally Posted by poisondeathray View Post
    I see what you're saying, the 1440x1080i camera footage has more AR problems than a simple 16:9 stretch. The dominos are too are essentially too "short" so you've disproportionately stretched it to match the other footage (essentially zoomed in and reframed the shot slightly)

    The problem comes from resizing vertically (when you zoomed in) , while the video is still interlaced as fields. You cannot perform a progressive resize on interlaced content - otherwise you get those notching artifacts

    So what you would do if you had access to the native 1440x1080i camera footage - is just replace those sections in the exported Resolve video. If you wanted the same zoom level fix, you'd need to double rate deinterlace so it's progressive first, then apply the transform. Then reinterlace. Then you can replace those sections

    For example, the mp4 has frames 14-83, 172-198 derived from the 1440x1080i footage, you would splice in and replace those frames (and any affected) with the correct replacement . Your 00032.mts contains the frames from 14-83, but not from the 172-198 section . You'd need that corresponding section

    But yes you can do it without Resolve, but you incur more generation loss (you have to re-encode at least some frames, and then again if you deinterlace with handbrake and re-encode. Basically you have avoidable quality loss a few times)

    If it were me, and I no longer had the Resolve project, I would do it in avisynth and avoid handbrake completely. If you were going to deinterlace, I would do it there as well, so you incur fewer losses since just have re-encode once. If it were me I'd actually leave it as 1080p50 (but I guess it depends what your destination goals were)

    (BTW you have overbrights that you didn't correct in Resolve, it looks like you just clipped it, and the shots don't quite match color wise)
    Thanks for your comprehensive reply. Yes that's pretty much what happened as far as i know from google search. Apparently you're not supposed to resize interlaced video. But stretching it is fine since it only scales horizontally and not vertically, as can be seen with the other clips.

    The only thing I don't have access to anymore is the project because I'm away from my main computer and only have my laptop. The raw footage and the end result all are on a storage server so i can get all of those only the project which is inside the resolve database can't be accessed and backups are older versions.

    So I'll have to cut out part of the original mp4 and replace those with none scaled but stretched interlaced footage, export it again and then deinterlace it with avisynth?

    Or is there a way it can be fixed without that much work, maybe the way "manono" recommended but what software would be used to do so?
    Quote Quote  
  14. AviSynth script used above:

    Code:
    LSMASHVideoSource("1080i_publish_part.mp4") 
    src = last # remember the original
    Spline36Resize(width,420).Spline36Resize(width,height)
    ReplaceFramesSimple(src, last, mappings="[14 83]")
    The best veritcal size for the downscale was determined experimentally:

    Code:
    function DownUp(clip c, int height)
    {
       height = (height / 2) * 2 # force mod2
    
       Spline36Resize(c, c.width, height)
       Spline36Resize(c.width, c.height)
       Subtitle(String(height))
    }
    
    LSMASHVideoSource("1080i_publish_part.mp4") 
    Trim(83,83) # last interlaced frame
    Loop(256,0,0)
    Animate(0, 256, "DownUp", last,1080, last,120)
    Quote Quote  
  15. I put the footage into Vegas, used the HDV PAL project settings. It displays as a perfect 16:9 HD aspect ratio.

    I then rendered it to 1920x1080 interlaced, using 10 Mbps MP4 container. The resulting 1.0 PAR should be what you want. You can deinterlace, if you want, but I've already given my opinion on that.

    I've attached the result.
    Image Attached Files
    Quote Quote  
  16. My understanding is that he has a finalized version, and access to the assets (videos) but not the project file

    So I would just replace the bad segments in the finalized version; just cover them up/replace them . (eg. frames 14 - 83 in the MP4 correspond with 32 -101 in the MTS) . If all you wanted to do was resize horizontally to make it 16:9 1920x1080 (none of the zooming or reframing), then there is no need to deinterlace at that point because then you're not resizing vertically

    But you mentioned "deinterlaced it afterwards in handbrake before publishing" - so that implies some progressive destination target
    Quote Quote  
  17. Since you have the original unmolested source for the bad part you can reprocess it and replace that section of the "publish" video:

    Code:
    LSMASHVideoSource("1080i_publish_part.mp4")
    
    p1 = Trim(0,13)
    p2 = LWLibavVideoSource("00032.mts").Trim(32,32+69).Spline36Resize(1920,1080).QTGMC().SelectEven()
    p3 = Trim(84,0)
    
    p1+p2+p3
    I noticed there's a second section of the publish video that has the same problem, frames 172 to 198.
    Image Attached Files
    Quote Quote  
  18. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    You'd think with all the highfalootin' DaVinci, Vegas, etc., etc., that the shots, color grading, levels matching, and pacing and whatnot could be smoother. It was a bitch matching the color balance and black levels, I just had to rework the whole thing to try to keep the sequence from looking like 5 different videos on 5 different days on 5 different sets thru 5 different cameras several months or years apart. In the original shots the dominoes, the floor, and the lighting change colors 3 times or more. Not as easy as it looks. It's a shame the brights are clipped. Maybe a bigger selection of shots and slower pacing would look entirely different.

    Avisynth and VirtualDub: 1080i.mp4 attached.

    For the .mts segment I used QTGMC at "super fast" to deinterlace, Spline36 to resize, then reinterlaced. All the other segments remained interlaced as-is except for some color and levels corrections with ColorYUV and VirtualDub.

    [EDIT] Replying to a PM: script for 1440i_to_1080i (attached mp4):

    Code:
    FFVideoSource("00032.mts")
    ColorMatrix(mode="Rec.709->Rec.601")
    ColorYUV(off_y=-6,gain_v=5)
    Levels(24,0.90,255,16,240,dither=true,coring=false)
    
    AssumeTFF()
    QTGMC(preset="super fast")
    Spline36Resize(1920,height)
    SeparateFields().SelectEvery(4,0,3).Weave()
    
    LoadVirtualDubPlugin("D:\VirtualDub\plugins\ColorMill.vdf", "ColorMill", 1)
    ConvertToRGB32(interlaced=true,matrix="Rec601")
    ColorMill(25700, 25451, 25706, 25709, 25697, 25700, 25700, \
              25700, 25700, 25700, 25444, 25700, 25700, 1124, 5)
    ConvertToYV12(interlaced=true) 
    ColorMatrix(mode="Rec.601->Rec.709")
    Image Attached Files
    Last edited by LMotlow; 4th Oct 2018 at 05:42.
    - My sister Ann's brother
    Quote Quote  
  19. Member
    Join Date
    Oct 2018
    Location
    Switzerland
    Search Comp PM
    Originally Posted by jagabo View Post
    Since you have the original unmolested source for the bad part you can reprocess it and replace that section of the "publish" video:

    Code:
    LSMASHVideoSource("1080i_publish_part.mp4")
    
    p1 = Trim(0,13)
    p2 = LWLibavVideoSource("00032.mts").Trim(32,32+69).Spline36Resize(1920,1080).QTGMC().SelectEven()
    p3 = Trim(84,0)
    
    p1+p2+p3
    I noticed there's a second section of the publish video that has the same problem, frames 172 to 198.
    How did you find which frames are the same in the MTS and the MP4? Did you just compare visually or is this something which can be done in avisynth aswell?
    Last edited by cyberflow; 4th Oct 2018 at 09:49. Reason: typo
    Quote Quote  
  20. To sync the two clips I compared visually.
    Quote Quote  
  21. Member
    Join Date
    Oct 2018
    Location
    Switzerland
    Search Comp PM
    Which deinterlacer would you recommend? This website http://www.100fps.com/ says that SmoothDeinterlacer (https://www.guthspot.se/video/AVSPorts/SmoothDeinterlacer/) is the best. But this site is quite old. Is there anything better than SmoothDeinterlacer which gives me 50p and the full resoultion? How about Yadif (BOB) and Decomb (EEDI2/EEDI2BOB/BOB)? And QTGMC or HICON32 (does this still exist)?
    Last edited by cyberflow; 5th Oct 2018 at 04:42. Reason: typo
    Quote Quote  
  22. The best deinterlacer by far is QTGMC. A very distant second is Yadif.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!