Black frame at end of encode

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
danadiamond
Posts: 11
Joined: Mon Nov 23, 2020 10:36 pm

Black frame at end of encode

Post by danadiamond »

Description of problem or question:
After encoding and watching back in Quicktime, at 24 fps, there are always a few black frames at the end. It is not visible in normal playback; the last frame ends on picture - but it shows up when looping on Instagram, for example. You can see an example here:
https://www.dropbox.com/s/5z6cfpdlbceqz ... 4.mp4?dl=0


Steps to reproduce the problem (If Applicable):
It seems to happen with files where the original uncompressed master is 24 fps. i have matched that 24 fps frame rate (In the "Video" tab" of HandBrake) to that of the original uncompressed master.
Both "Peak Framerate" and "Constant Framerate" bring the same result.

This first happened in an earlier version; I upgraded to V.1.3.3 and it still occurs.



HandBrake version (e.g., 1.0.0):
V.1.3.3



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



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

Code: Select all

HandBrake Activity Log for Session: 2020-11-23T22:27:30Z
Handbrake Version: 1.3.3 (2020061300)
dog run loop4.mp4
Preset: Fast 1080p30 (Modified)
[23:27:30] macgui: QueueCore scanning specifically for title: 1
[23:27:30] CPU: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
[23:27:30]  - Intel microarchitecture Kaby Lake
[23:27:30]  - logical processor count: 12
[23:27:30] hb_scan: path=/Volumes/G-DRIVE SSD/WORK_ssd/dog run loop.mov, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /Volumes/G-DRIVE SSD/WORK_ssd/dog run loop.mov
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2585: nav_get_title_list(/Volumes/G-DRIVE SSD/WORK_ssd/dog run loop.mov/) failed
[23:27:30] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[23:27:30] dvd: not a dvd - trying as a stream/file instead
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7ff726813800] Referenced QT chapter track not found
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/G-DRIVE SSD/WORK_ssd/dog run loop.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2020-11-04T00:55:57.000000Z
  Duration: 00:00:02.33, start: 0.000000, bitrate: 72587 kb/s
    Stream #0:0(eng): Video: prores (LT) (apcs / 0x73637061), yuv422p10le(tv, bt709, progressive), 1080x1080, 67456 kb/s, SAR 1:1 DAR 1:1, 24 fps, 24 tbr, 24 tbn, 24 tbc (default)
    Metadata:
      creation_time   : 2020-11-04T00:55:57.000000Z
      handler_name    : Apple Video Media Handler
      encoder         : Apple ProRes 422 LT
      timecode        : 00:00:01:15
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2020-11-04T00:55:57.000000Z
      handler_name    : Apple Sound Media Handler
      timecode        : 00:00:01:15
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2020-11-04T00:55:57.000000Z
      handler_name    : Time Code Media Handler
      timecode        : 00:00:01:15
[23:27:30] scan: decoding previews for title 1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7ff72900fe00] Referenced QT chapter track not found
[23:27:30] scan: audio 0x1: pcm_s16le, rate=48000Hz, bitrate=1536000 English (pcm_s16le) (2.0 ch) (1536 kbps)
[23:27:30] scan: 10 previews, 1080x1080, 24.000 fps, autocrop = 0/0/0/0, aspect 1.00:1, PAR 1:1
[23:27:30] Title is likely interlaced or telecined (10 out of 10 previews). You should do something about that.
[23:27:30] libhb: scan thread found 1 valid title(s)
[23:27:30] macgui: QueueCore scan done
[23:27:30] macgui: QueueCore started encoding dog run loop4.mp4
[23:27:30] macgui: QueueCore with preset Fast 1080p30 (Modified)
[23:27:30] Starting work at: Mon Nov 23 23:27:30 2020

[23:27:30] 1 job(s) to process
[23:27:30] Starting Task: Encoding Pass
[23:27:30] Skipping crop/scale filter
[23:27:30] work: only 1 chapter, disabling chapter markers
[23:27:30] job configuration:
[23:27:30]  * source
[23:27:30]    + /Volumes/G-DRIVE SSD/WORK_ssd/dog run loop.mov
[23:27:30]    + title 1, chapter(s) 1 to 1
[23:27:30]    + container: mov,mp4,m4a,3gp,3g2,mj2
[23:27:30]    + data rate: 72587 kbps
[23:27:30]  * destination
[23:27:30]    + /Volumes/G-DRIVE SSD/WORK_ssd/MISC SOURCES_GFX/dog run loop4.mp4
[23:27:30]    + container: MPEG-4 (libavformat)
[23:27:30]      + align initial A/V stream timestamps
[23:27:30]  * video track
[23:27:30]    + decoder: prores
[23:27:30]      + bitrate 67456 kbps
[23:27:30]    + filters
[23:27:30]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[23:27:30]      + Decomb (mode=39)
[23:27:30]      + Framerate Shaper (mode=2:rate=27000000/1125000)
[23:27:30]        + frame rate: 24.000 fps -> peak rate limited to 24.000 fps
[23:27:30]    + Output geometry
[23:27:30]      + storage dimensions: 1080 x 1080
[23:27:30]      + pixel aspect ratio: 1 : 1
[23:27:30]      + display dimensions: 1080 x 1080
[23:27:30]    + encoder: H.264 (libx264)
[23:27:30]      + preset:  fast
[23:27:30]      + profile: main
[23:27:30]      + level:   4.0
[23:27:30]      + quality: 22.00 (RF)
[23:27:30]      + color profile: 1-1-1
[23:27:30]  * audio track 1
[23:27:30]    + decoder: English (pcm_s16le) (2.0 ch) (1536 kbps) (track 1, id 0x1)
[23:27:30]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[23:27:30]    + mixdown: Stereo
[23:27:30]    + dither: triangular
[23:27:30]    + encoder: AAC (Apple AudioToolbox)
[23:27:30]      + bitrate: 160 kbps, samplerate: 48000 Hz
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7ff726805400] Referenced QT chapter track not found
[23:27:30] sync: expecting 55 video frames
[23:27:30] encx264: min-keyint: 24, keyint: 240
[23:27:30] encx264: encoding at constant RF 22.000000
[23:27:30] encx264: unparsed options: level=4.0:ref=2:8x8dct=0:weightp=1:subme=6:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=30
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile Main, level 4.0, 4:2:0, 8-bit
[23:27:30] sync: first pts video is 0
[23:27:30] sync: "Chapter 1" (1) at frame 1 time 0
[23:27:30] sync: first pts audio 0x1 is 0
[23:27:30] reader: done. 1 scr changes
[23:27:31] work: average encoding speed for job is 0.000000 fps
[23:27:31] comb detect: heavy 0 | light 10 | uncombed 46 | total 56
[23:27:31] decomb: deinterlaced 0 | blended 10 | unfiltered 46 | total 56
[23:27:31] vfr: 56 frames output, 0 dropped and 0 duped for CFR/PFR
[23:27:31] vfr: lost time: 0 (0 frames)
[23:27:31] vfr: gained time: 0 (0 frames) (0 not accounted for)
[23:27:31] pcm_s16le-decoder done: 110 frames, 0 decoder errors
[23:27:31] prores-decoder done: 56 frames, 0 decoder errors
[23:27:31] sync: got 56 frames, 55 expected
[23:27:31] sync: framerate min 24.000 fps, max 24.000 fps, avg 24.000 fps
x264 [info]: frame I:2     Avg QP:23.48  size:204526
x264 [info]: frame P:42    Avg QP:26.39  size: 36910
x264 [info]: frame B:12    Avg QP:28.18  size: 12509
x264 [info]: consecutive B-frames: 64.3% 17.9% 10.7%  7.1%
x264 [info]: mb I  I16..4: 20.4%  0.0% 79.6%
x264 [info]: mb P  I16..4:  3.4%  0.0%  9.9%  P16..4: 34.3%  8.2%  8.3%  0.0%  0.0%    skip:35.9%
x264 [info]: mb B  I16..4:  1.5%  0.0%  2.3%  B16..8: 15.2%  7.1%  1.5%  direct:10.4%  skip:62.0%  L0:53.7% L1:39.2% BI: 7.1%
x264 [info]: coded y,uvDC,uvAC intra: 65.7% 36.4% 33.4% inter: 18.5% 6.2% 1.6%
x264 [info]: i16 v,h,dc,p: 82% 10%  8%  1%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 22% 19%  6% 10%  6% 13%  5% 10%
x264 [info]: i8c dc,h,v,p: 81%  9%  6%  4%
x264 [info]: Weighted P-Frames: Y:7.1% UV:0.0%
x264 [info]: ref P L0: 54.1% 45.9%
x264 [info]: ref B L0: 68.8% 31.2%
x264 [info]: ref B L1: 99.2%  0.8%
x264 [info]: kb/s:7232.21
[23:27:31] mux: track 0, 56 frames, 2109310 bytes, 7105.04 kbps, fifo 64
[23:27:31] mux: track 1, 112 frames, 672 bytes, 2.26 kbps, fifo 128
[23:27:31] Finished work at: Mon Nov 23 23:27:31 2020

[23:27:31] libhb: work result = 0

Deleted User 11865

Re: Black frame at end of encode

Post by Deleted User 11865 »

What if you disable the decomb and interlace detection filters?
danadiamond
Posts: 11
Joined: Mon Nov 23, 2020 10:36 pm

Re: Black frame at end of encode

Post by danadiamond »

That does help! I was sure I had those switched off, but I guess the log doesn't lie...
cheers :)
danadiamond
Posts: 11
Joined: Mon Nov 23, 2020 10:36 pm

Re: Black frame at end of encode

Post by danadiamond »

Hello,

I have found this issue to persist even when I disable the decomb and interlace detection filters. The issue seems to be when there is audio in the original file. An identical video file but with no audio comes out fine.

Perhaps I can run a test: one video w/ audio, the other without, and create logs for both? please advise how to best proceed.

Thank you!
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: Black frame at end of encode

Post by rollin_eng »

Yes, please post your logs.
danadiamond
Posts: 11
Joined: Mon Nov 23, 2020 10:36 pm

Re: Black frame at end of encode

Post by danadiamond »

Thanks. Here are a few thigns:
- the logs
- the after effects renders (Pro res)
- compressed versions.

you'll see the "no audio" version of the .mp4 has the black frames.

https://www.dropbox.com/sh/wjcnntilnrlv ... J1mWa?dl=0
danadiamond
Posts: 11
Joined: Mon Nov 23, 2020 10:36 pm

Re: Black frame at end of encode

Post by danadiamond »

My mistake - to see the issue, it's actually in the file called "LT dance w audio.mp4" w/ the black frames, not the one previously mentioned ("no audio").
You'll need to download these / click the playhead to the end to see the black frames. I can confirm the black always shows up on a loop on Instagram.

Many thanks : )
Post Reply