Detelecine original 24p content that is 29.97 back to 24p

HandBrake for Mac support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
RockyVegas
Posts: 3
Joined: Wed Mar 16, 2022 3:21 pm

Detelecine original 24p content that is 29.97 back to 24p

Post by RockyVegas »

Description of problem or question:
So I have full length movies that were shot on the Panasonic DVX100. They were shot on 24p but output to 29.97 from original edit because software back in the early 2000s didn't edit 24p. 24p in Panasonic lingo is 29.97 fps, with 2:3:2:3 pulldown added to footage that was originally 24 fps. So long story short, I'm using Handbrake with Detelecine at Default, leaving everything else alone.The footage that I got back looks fantastic! The interlacing is gone! I have my original 24p footage. The only issue is an occasional ghost of two frames combined, and occasional meaning every 3 to 5 minutes. It's is usually just a single frame. I will attach examples. What do you think is causing this? I'm assuming the Detelecine is working like it's supposed to, removing the 2:3 pulldown and giving me the original 24p footage. I've tried to select both, 23.97 and 24 as the Framerate on video (fps) but they both have the issue. Any help/input would be greatly appreciated. It would save me the time of having to watch several 90 minute movies, frame by frame finding these ghost images and having to edit them out. They are so sporadic/spaced out that I sometimes miss them until several edits and re-watches late, only to have to go back and edit them out.

Image
Image
Image
https://drive.google.com/file/d/1aIYk9n ... sp=sharing
https://drive.google.com/file/d/1lsDKtZ ... sp=sharing
https://drive.google.com/file/d/1zHB6xa ... sp=sharing

Steps to reproduce the problem (If Applicable):
Using Detelecine/Default to remove the pulldown on 29.97 interlaced footage that was originally 24p.



HandBrake version (e.g., 1.0.0):
Version 1.5.1



Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Mac Mojave



HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all

Roadtrip 40%
Hr40 promotion $179 plus fees total $239.86
con# 347-215-28[16:44:34] macgui: Handbrake Version: 1.5.1 (2022011000)
[16:44:34] Compile-time hardening features are enabled
[16:44:34] hb_init: starting libhb thread
[16:44:51] macgui: ScanCore scanning titles with a duration of 10 seconds or more
[16:44:51] CPU: Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz
[16:44:51]  - Intel microarchitecture Kaby Lake
[16:44:51]  - logical processor count: 6
[16:44:51] hb_scan: path=/Volumes/Masters/Movies/-/Trailer_Orig.mov, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:333: failed opening UDF image /Volumes/Masters/Movies/-/Trailer_Orig.mov
disc.c:437: error opening file BDMV/index.bdmv
disc.c:437: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2646: nav_get_title_list(/Volumes/Masters/Movies/-/Trailer_Orig.mov/) failed
[16:44:51] bd: not a bd - trying as a stream/file instead
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[16:44:51] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/Masters/Movies/-/Trailer_Orig.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2014-07-07T01:07:30.000000Z
    com.apple.quicktime.keywords: Extras
    com.apple.quicktime.description: This video is about Trailer_Orig
    com.apple.quicktime.author: Rock
    com.apple.quicktime.displayname: Trailer_Orig
    com.apple.quicktime.title: Trailer_Orig
  Duration: 00:01:58.49, start: 0.000000, bitrate: 43507 kb/s
  Stream #0:0(und): Video: prores (Standard) (apcn / 0x6E637061), yuv422p10le(tv, smpte170m/smpte170m/bt709, bottom coded first (swapped)), 720x480, 41152 kb/s, SAR 10:11 DAR 15:11, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
    Metadata:
      creation_time   : 2014-07-07T01:07:30.000000Z
      handler_name    : Core Media Video
      vendor_id       : appl
      encoder         : Apple ProRes 422
      timecode        : 00:00:00;00
  Stream #0:1(und): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
    Metadata:
      creation_time   : 2014-07-07T01:07:30.000000Z
      handler_name    : Core Media Audio
      vendor_id       : [0][0][0][0]
  Stream #0:2(und): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2014-07-07T01:07:30.000000Z
      handler_name    : Core Media Time Code
      timecode        : 00:00:00;00
[16:44:51] scan: decoding previews for title 1
[16:44:51] scan: audio 0x1: pcm_s24le, rate=48000Hz, bitrate=2304000 Unknown (pcm_s24le) (2.0 ch) (2304 kbps)
[16:44:51] scan: 10 previews, 720x480, 29.970 fps, autocrop = 0/0/0/4, aspect 4:3, PAR 10:11, color profile: 6-1-6, chroma location: unspecified
[16:44:51] libhb: scan thread found 1 valid title(s)
[16:44:51] macgui: ScanCore scan done
[16:44:51] decomb: deinterlaced 1 | blended 0 | unfiltered 0 | total 1
[16:46:14] Compile-time hardening features are enabled
[16:46:14] hb_init: starting libhb thread
[16:46:14] macgui: fr.handbrake.HandBrakeXPCService scanning specifically for title: 1
[16:46:14] CPU: Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz
[16:46:14]  - Intel microarchitecture Kaby Lake
[16:46:14]  - logical processor count: 6
[16:46:14] hb_scan: path=/Volumes/Masters/Movies/-/Trailer_Orig.mov, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:333: failed opening UDF image /Volumes/Masters/Movies/-/Trailer_Orig.mov
disc.c:437: error opening file BDMV/index.bdmv
disc.c:437: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2646: nav_get_title_list(/Volumes/Masters/Movies/-/Trailer_Orig.mov/) failed
[16:46:14] bd: not a bd - trying as a stream/file instead
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[16:46:14] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/Masters/Movies/-/Trailer_Orig.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2014-07-07T01:07:30.000000Z
    com.apple.quicktime.keywords: Extras
    com.apple.quicktime.description: This video is about Trailer_Orig
    com.apple.quicktime.author: Rock
    com.apple.quicktime.displayname: Trailer_Orig
    com.apple.quicktime.title: Trailer_Orig
  Duration: 00:01:58.49, start: 0.000000, bitrate: 43507 kb/s
  Stream #0:0(und): Video: prores (Standard) (apcn / 0x6E637061), yuv422p10le(tv, smpte170m/smpte170m/bt709, bottom coded first (swapped)), 720x480, 41152 kb/s, SAR 10:11 DAR 15:11, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
    Metadata:
      creation_time   : 2014-07-07T01:07:30.000000Z
      handler_name    : Core Media Video
      vendor_id       : appl
      encoder         : Apple ProRes 422
      timecode        : 00:00:00;00
  Stream #0:1(und): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
    Metadata:
      creation_time   : 2014-07-07T01:07:30.000000Z
      handler_name    : Core Media Audio
      vendor_id       : [0][0][0][0]
  Stream #0:2(und): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2014-07-07T01:07:30.000000Z
      handler_name    : Core Media Time Code
      timecode        : 00:00:00;00
[16:46:15] scan: decoding previews for title 1
[16:46:15] scan: audio 0x1: pcm_s24le, rate=48000Hz, bitrate=2304000 Unknown (pcm_s24le) (2.0 ch) (2304 kbps)
[16:46:15] scan: 10 previews, 720x480, 29.970 fps, autocrop = 0/0/0/4, aspect 4:3, PAR 10:11, color profile: 6-1-6, chroma location: unspecified
[16:46:15] libhb: scan thread found 1 valid title(s)
[16:46:15] macgui: fr.handbrake.HandBrakeXPCService scan done
[16:46:15] macgui: fr.handbrake.HandBrakeXPCService started encoding Trailer_Orig.mp4
[16:46:15] macgui: fr.handbrake.HandBrakeXPCService with preset Production Max (Modified)
[16:46:15] Starting work at: Wed Jun 22 16:46:15 2022

[16:46:15] 1 job(s) to process
[16:46:15] Starting Task: Encoding Pass
[16:46:15] work: only 1 chapter, disabling chapter markers
[16:46:15] job configuration:
[16:46:15]  * source
[16:46:15]    + /Volumes/Masters/Movies/-/Trailer_Orig.mov
[16:46:15]    + title 1, chapter(s) 1 to 1
[16:46:15]    + container: mov,mp4,m4a,3gp,3g2,mj2
[16:46:15]    + data rate: 43507 kbps
[16:46:15]  * destination
[16:46:15]    + /Volumes/RALF 6TB/Trailer_Orig.mp4
[16:46:15]    + container: MPEG-4 (libavformat)
[16:46:15]  * video track
[16:46:15]    + decoder: prores 8-bit (yuv420p)
[16:46:15]      + bitrate 41152 kbps
[16:46:15]    + filters
[16:46:15]      + Detelecine (pullup) (skip-left=1:skip-right=1:skip-top=4:skip-bottom=4:plane=0)
[16:46:15]      + Framerate Shaper (mode=1:rate=27000000/1126125)
[16:46:15]        + frame rate: 29.970 fps -> constant 23.976 fps
[16:46:15]      + Crop and Scale (width=3840:height=2160:crop-top=0:crop-bottom=0:crop-left=2:crop-right=4)
[16:46:15]        + source: 720 * 480, crop (0/0/2/4): 714 * 480, scale: 3840 * 2160
[16:46:15]      + Colorspace (primaries=bt709:transfer=bt709:matrix=bt709:tonemap=hable:desat=0)
[16:46:15]    + Output geometry
[16:46:15]      + storage dimensions: 3840 x 2160
[16:46:15]      + pixel aspect ratio: 1071 : 1408
[16:46:15]      + display dimensions: 2920 x 2160
[16:46:15]    + encoder: H.264 (libx264)
[16:46:15]      + preset:  fast
[16:46:15]      + options: keyint=12:min-keyint=1:ref=1:bframes=0:qcomp=0.8:aq-strength=0.5:dct-decimate=0:fast-pskip=0:deblock=-2,-2
[16:46:15]      + profile: high
[16:46:15]      + level:   auto
[16:46:15]      + quality: 0.00 (RF)
[16:46:15]      + color profile: 1-1-1
[16:46:15]      + chroma location: unspecified
[16:46:15]  * audio track 1
[16:46:15]    + decoder: Unknown (pcm_s24le) (2.0 ch) (2304 kbps) (track 1, id 0x1)
[16:46:15]      + bitrate: 2304 kbps, samplerate: 48000 Hz
[16:46:15]    + mixdown: Stereo
[16:46:15]    + encoder: AAC (Apple AudioToolbox)
[16:46:15]      + bitrate: 320 kbps, samplerate: 48000 Hz
[16:46:15] sync: expecting 3550 video frames
[16:46:15] encx264: min-keyint: 1, keyint: 12
[16:46:15] encx264: encoding at constant RF 0.000000
[16:46:15] apply_h264_profile [warning]: lossless requires high444 profile, disabling
[16:46:15] encx264: unparsed options: keyint=12:keyint-min=1:ref=1:bframes=0:qcomp=0.8:aq-strength=0.5:dct-decimate=0:fast-pskip=0:deblock=-2,-2:weightp=1:subme=6:rc-lookahead=30
x264 [info]: using SAR=1071/1408
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High, level 5.1, 4:2:0, 8-bit
[16:46:15] sync: first pts video is 0
[16:46:15] sync: "Chapter 1" (1) at frame 1 time 0
[16:46:15] sync: first pts audio 0x1 is 0
[16:52:43] reader: done. 1 scr changes
[16:52:59] work: average encoding speed for job is 8.955826 fps
[16:52:59] vfr: 2841 frames output, 132 dropped and 10 duped for CFR/PFR
[16:52:59] vfr: lost time: 1786785 (0 frames)
[16:52:59] vfr: gained time: 1786785 (2332 frames) (0 not accounted for)
[16:53:00] pcm_s24le-decoder done: 5564 frames, 0 decoder errors
[16:53:00] prores-decoder done: 3551 frames, 0 decoder errors
[16:53:00] sync: got 3551 frames, 3550 expected
[16:53:00] sync: framerate min 29.970 fps, max 29.970 fps, avg 29.970 fps
x264 [info]: frame I:838   Avg QP: 0.73  size:2028142
x264 [info]: frame P:2003  Avg QP: 1.46  size:1976121
x264 [info]: mb I  I16..4: 16.2% 28.8% 55.0%
x264 [info]: mb P  I16..4: 11.4% 25.6% 50.7%  P16..4:  3.3%  3.5%  2.1%  0.0%  0.0%    skip: 3.5%
x264 [info]: 8x8 transform intra:29.1% inter:22.4%
x264 [info]: coded y,uvDC,uvAC intra: 98.0% 88.6% 88.3% inter: 67.0% 66.6% 66.2%
x264 [info]: i16 v,h,dc,p: 21% 26% 29% 24%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 30% 15%  5%  6%  4%  6%  5%  8%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 28%  8%  7% 11%  6%  8%  5%  6%
x264 [info]: i8c dc,h,v,p: 46% 33% 14%  7%
x264 [info]: Weighted P-Frames: Y:3.3% UV:3.3%
x264 [info]: kb/s:381979.31
[16:53:00] mux: track 0, 2841 frames, 5657714505 bytes, 381842.36 kbps, fifo 128
[16:53:00] mux: track 1, 5557 frames, 4971681 bytes, 335.54 kbps, fifo 256
[16:53:00] Finished work at: Wed Jun 22 16:53:00 2022

[16:53:00] libhb: work result = 0
[16:53:00] macgui: Queue Done, there are no more pending encodes
[16:53:00] macgui: fr.handbrake.HandBrakeXPCService work done
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Detelecine original 24p content that is 29.97 back to 24p

Post by JohnAStebbins »

Unfortunately, HandBrake's detelecine filter doesn't have any logging that could tell us more about what might be happening. I really should add a verbose logging option so we can see if there are any breaks in the 2-3 pulldown pattern. But that looks like what is happening.

If you are really interested in nailing down the cause, find a video player that will let you single step through the video. In the original source video, start single stepping a little bit before the ghosting frame and take note of the pattern you see to interlaced vs non-interlaced frames. For 4 original 24p frames (A, B, C, D), you should see A-non-interlaced, B-non-interlaced, B/C-interlaced, C/D-interlaced, D-non-interlaced (and then repeats with next 4 24p frames). I.e. you should see a repeating pattern of 5 frames with 2 of them interlaced and 3 of them non-interlaced.

I suspect that where the ghosting is happening, that pattern has a hiccough in it.
Lostless
Bright Spark User
Posts: 155
Joined: Thu May 24, 2007 7:55 pm

Re: Detelecine original 24p content that is 29.97 back to 24p

Post by Lostless »

Well the video 2:3 cadence would get changed at every cut since it was edited with the 2:3 pulldown in a 29.97 time line. It does look like that the detelecine is confused on the cadence and merging the wrong frames at times. Which makes sense. Looks like a what needs to happen is check for interlacing after the detelecine and decomb what it finds.
Lostless
Bright Spark User
Posts: 155
Joined: Thu May 24, 2007 7:55 pm

Re: Detelecine original 24p content that is 29.97 back to 24p

Post by Lostless »

Expanding on my replay. In a 2:3 pulldown video, one film frame in that cadence does not exist entirely on one full video frame, but is split between 2 video frames. That’s why we are getting the combing. The filter is operating correctly, just too many cuts in succession is messing up the cadence. Still I say do a decomb check after the the detelecine.
RockyVegas
Posts: 3
Joined: Wed Mar 16, 2022 3:21 pm

Re: Detelecine original 24p content that is 29.97 back to 24p

Post by RockyVegas »

Thank you both for your input. What you suspect is right, the hiccups occur during scene cuts. So more than likely, the detelecine filter is confused on the cadence when the cut scene happens. So my question now is, will running it through a second time with combing, after detelecine, cause a loss of resolution or only the frames with combing would be affected? My whole point of using the detelecine was to remove the interlacing but keep the resolution becasue deinterlace/combing cuts the resolution in half right? Thanks again.
Lostless
Bright Spark User
Posts: 155
Joined: Thu May 24, 2007 7:55 pm

Re: Detelecine original 24p content that is 29.97 back to 24p

Post by Lostless »

The decomb filter does output half resolution, but only on frames that it decombs. But I think it does a pretty good job of smoothing it out that it’s really not that noticeable.
But back to solving this. First of all each encode causes quality loss. To minimize, use A preset like production to feed into the decomb run. Second of all, is there any reason you are upscaling to 4k? It won’t give you any more quality. I’m a just saying Cause a second round will not detect combing in a 4k render.
Third of all, you might get some color errors on those few frames that are deinterlaced because the color resolution is 1/4 of the black and white so I don’t know I’m how the color was made with 2 frames in 1. You might get some color bleed for 1 frame into the other.
RockyVegas
Posts: 3
Joined: Wed Mar 16, 2022 3:21 pm

Re: Detelecine original 24p content that is 29.97 back to 24p

Post by RockyVegas »

From experience (previously used Decomb along with Detelecine) the quality drops significantly. I guess I have to settle with having to replace frames here and there. I'd rather have the qaulity. As far as Uprezing, well, unless it's a placebo effect, it definitly looks like the image is much cleaner and clearer than the SD version. And I always use production max to make sure I get te best image possible. Also, you are right about the color bleeding, check the attached links below for examples, detelecine is really bad with REDs, usually when in action or panning shots. Even on SD without uprez there is still bleeding, though not as bad, but still there. I wonder why? First three links are the uprez HD, second three links are SD, no uprez.
HD:
https://drive.google.com/file/d/18mp1SC ... sp=sharing
https://drive.google.com/file/d/1zn3Itl ... sp=sharing
https://drive.google.com/file/d/1vbp555 ... sp=sharing

SD:
https://drive.google.com/file/d/1vbp555 ... sp=sharing
https://drive.google.com/file/d/1p39rzJ ... sp=sharing
https://drive.google.com/file/d/1T6vYzr ... sp=sharing
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Detelecine original 24p content that is 29.97 back to 24p

Post by JohnAStebbins »

HandBrake has a convenient "Interlace Detection" filter that may help in this scenario. When this filter is enabled, it looks for combing artefacts in the incoming frames and marks the combed frames. The information about which frames have combing is fed through to the "Deinterlace" filter which will only apply the deinterlacer to those combed frames. So you can do everything in one pass. The Detelecine filter is applied first, any frames that still have combing will be detected afterwards by Interlace Detection and Deinterlace should take care of those.

FYI, Interlace Detection can have both false positive and false negative detections. The number of total detections is printed to the log. So I recommend trying it out before committing to using it on everything.
Post Reply