Excess frames after converting mov to mp4

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
FirstDm
Posts: 4
Joined: Tue Nov 27, 2018 5:41 am

Excess frames after converting mov to mp4

Post by FirstDm »

I made a movie in After effects in h.264 and 30 frames per second, in mov, convert it through HandBrake to mp4, in the same resolution, with the same (and constant) frame rate. So at the end of the video there is added almost half a second of empty frames.
Why is this happening?
How did you solve the problem, if this happened?:

I have installed latest version but it does not help. (1.1.2)
iMac high sierra 10.13.6

Code: Select all

[12:46:29] macgui: Handbrake Version: 0.10.2 x86_64 (2015061100)
[12:46:29] hb_init: starting libhb thread
[12:46:29] hb_init: starting libhb thread
[12:46:29] macgui: hbInstances path to this instance: /Applications/HandBrake.app
[12:46:29] macgui: hbInstance found instance pidnum: 914 at path: /Applications/HandBrake.app
[12:46:29] macgui: hbInstance MATCH FOUND, our pidnum is: 914
[12:46:29] macgui: Pid for this instance: 914
[12:46:29] macgui: HBQueueController : My Pidnum is 914
[12:49:01] macgui: trying to open video_ts folder (parent directory chosen)
[12:49:01] macgui: scanning titles with a duration of 10 seconds or more
[12:49:01] CPU: Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz
[12:49:01]  - Intel microarchitecture Haswell
[12:49:01]  - logical processor count: 4
[12:49:01] OpenCL device #1: NVIDIA GeForce GT 755M
[12:49:01]  - OpenCL version: 1.2 
[12:49:01]  - driver version: 10.32.0 355.11.10.10.40.102
[12:49:01]  - device type:    GPU
[12:49:01]  - supported:      no
[12:49:01] hb_scan: path=/myFile.mov, title_index=0
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /myFile.mov/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /myFile.mov/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(myFile.mov) failed
[12:49:01] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.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
[12:49:01] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/myFile.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2018-11-23 13:05:54
  Duration: 00:00:10.16, start: 0.000000, bitrate: 56626 kb/s
    Stream #0.0(eng): Video: h264 (Main), yuv420p, 1080x1920, 55941 kb/s, PAR 1080:1080 DAR 9:16, 30 fps, 30 tbn (default)
    Metadata:
      creation_time   : 2018-11-23 13:05:54
    Stream #0.1(eng): Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s (default)
    Metadata:
      creation_time   : 2018-11-23 13:05:54
    Stream #0.2(eng): Data: tmcd / 0x64636D74, 0 kb/s (default)
    Metadata:
      creation_time   : 2018-11-23 13:06:21
[12:49:01] scan: decoding previews for title 1
[12:49:01] scan: audio 0x1: pcm_s16le, rate=44100Hz, bitrate=1411200 English (pcm_s16le) (2.0 ch)
[12:49:02] scan: 10 previews, 1080x1920, 30.000 fps, autocrop = 0/0/0/0, aspect 1:0.56, PAR 1080:1080
[12:49:03] libhb: scan thread found 1 valid title(s)
[12:49:03] macgui: ScanDone state received from fHandle
[12:49:03] macgui: showNewScan: This is a new source item scan
[12:49:28] macgui: Rip: Pending queue count is 0
[12:49:28] macgui: getNextPendingQueueIndex next pending encode index is:0
[12:49:28] macgui: scanning specifically for title: 1
[12:49:28] CPU: Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz
[12:49:28]  - Intel microarchitecture Haswell
[12:49:28]  - logical processor count: 4
[12:49:28] OpenCL device #1: NVIDIA GeForce GT 755M
[12:49:28]  - OpenCL version: 1.2 
[12:49:28]  - driver version: 10.32.0 355.11.10.10.40.102
[12:49:28]  - device type:    GPU
[12:49:28]  - supported:      no
[12:49:28] hb_scan: path=/myFile.mov, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /myFile.mov/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /myFile.mov/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(/myFile.mov) failed
[12:49:28] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.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
[12:49:28] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/myFile.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2018-11-23 13:05:54
  Duration: 00:00:10.16, start: 0.000000, bitrate: 56626 kb/s
    Stream #0.0(eng): Video: h264 (Main), yuv420p, 1080x1920, 55941 kb/s, PAR 1080:1080 DAR 9:16, 30 fps, 30 tbn (default)
    Metadata:
      creation_time   : 2018-11-23 13:05:54
    Stream #0.1(eng): Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s (default)
    Metadata:
      creation_time   : 2018-11-23 13:05:54
    Stream #0.2(eng): Data: tmcd / 0x64636D74, 0 kb/s (default)
    Metadata:
      creation_time   : 2018-11-23 13:06:21
[12:49:28] scan: decoding previews for title 1
[12:49:28] scan: audio 0x1: pcm_s16le, rate=44100Hz, bitrate=1411200 English (pcm_s16le) (2.0 ch)
[12:49:29] scan: 10 previews, 1080x1920, 30.000 fps, autocrop = 0/0/0/0, aspect 1:0.56, PAR 1080:1080
[12:49:29] libhb: scan thread found 1 valid title(s)
[12:49:29] macgui: ScanDone state received from fQueueEncodeLibhb
[12:49:29] macgui: Preset: Custom
[12:49:29] macgui: processNewQueueEncode number of passes expected is: 1
[12:49:29] macgui: Start / Stop set to chapters
[12:49:29] macgui: prepareJob exiting
[12:49:29] 1 job(s) to process
[12:49:29] starting job
[12:49:29] sync: expecting 305 video frames
[12:49:29] job configuration:
[12:49:29]  * source
[12:49:29]    + /myFile.mov
[12:49:29]    + title 1, chapter(s) 1 to 1
[12:49:29]    + container: mov,mp4,m4a,3gp,3g2,mj2
[12:49:29]    + data rate: 56626 kbps
[12:49:29]  * destination
[12:49:29]    + /myFile.mp4
[12:49:29]    + container: MPEG-4 (libavformat)
[12:49:29]  * video track
[12:49:29]    + decoder: h264
[12:49:29]      + bitrate 55941 kbps
[12:49:29]    + filters
[12:49:29]      + Framerate Shaper (1:27000000:900000)
[12:49:29]        + frame rate: 30.000 fps -> constant 30.000 fps
[12:49:29]      + Crop and Scale (1080:1920:0:0:0:0)
[12:49:29]        + source: 1080 * 1920, crop (0/0/0/0): 1080 * 1920, scale: 1080 * 1920
[12:49:29]    + loose anamorphic
[12:49:29]      + storage dimensions: 1080 * 1920, mod 2
[12:49:29]      + pixel aspect ratio: 1 / 1
[12:49:29]      + display dimensions: 1080 * 1920
[12:49:29]    + encoder: H.264 (libx264)
[12:49:29]      + preset:  veryfast
[12:49:29]      + profile: main
[12:49:29]      + level:   4.0
[12:49:29]      + quality: 20.00 (RF)
[12:49:29]  * audio track 1
[12:49:29]    + decoder: English (pcm_s16le) (2.0 ch) (track 1, id 0x1)
[12:49:29]      + bitrate: 1411 kbps, samplerate: 44100 Hz
[12:49:29]    + mixdown: Stereo
[12:49:29]    + encoder: AAC (Apple AudioToolbox)
[12:49:29]      + bitrate: 160 kbps, samplerate: 44100 Hz
[12:49:29] reader: first SCR 0 id 0x0 DTS 0
[12:49:29] encx264: min-keyint: 30, keyint: 300
[12:49:29] encx264: encoding at constant RF 20.000000
[12:49:29] encx264: unparsed options: level=4.0:ref=1:8x8dct=0:weightp=1:subme=2:mixed-refs=0:trellis=0:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=10
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
x264 [info]: profile Main, level 4.0
[12:49:33] reader: done. 1 scr changes
[12:49:33] work: average encoding speed for job is 68.731850 fps
[12:49:33] sync: got 301 frames, 305 expected
[12:49:33] render: 301 frames output, 0 dropped and 0 duped for CFR/PFR
[12:49:33] render: lost time: 0 (0 frames)
[12:49:33] render: gained time: 0 (0 frames) (0 not accounted for)
[12:49:33] h264-decoder done: 301 frames, 0 decoder errors, 0 drops
x264 [info]: frame I:6     Avg QP:16.74  size: 73165
x264 [info]: frame P:190   Avg QP:19.18  size: 28421
x264 [info]: frame B:105   Avg QP:20.65  size:  6582
x264 [info]: consecutive B-frames: 48.5% 14.0%  3.0% 34.6%
x264 [info]: mb I  I16..4: 56.2%  0.0% 43.8%
x264 [info]: mb P  I16..4: 24.1%  0.0%  3.5%  P16..4: 20.2%  9.0%  4.0%  0.0%  0.0%    skip:39.3%
x264 [info]: mb B  I16..4:  0.8%  0.0%  0.1%  B16..8:  3.8%  1.9%  0.7%  direct: 2.0%  skip:90.7%  L0:35.8% L1:48.3% BI:15.9%
x264 [info]: coded y,uvDC,uvAC intra: 20.1% 37.3% 7.3% inter: 8.3% 11.4% 0.7%
x264 [info]: i16 v,h,dc,p: 42% 34% 19%  5%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 38% 20%  4%  4%  4%  4%  3%  5%
x264 [info]: i8c dc,h,v,p: 59% 23% 16%  2%
x264 [info]: Weighted P-Frames: Y:1.1% UV:0.0%
x264 [info]: kb/s:5206.68
[12:49:34] pcm_s16le-decoder done: 0 frames, 0 decoder errors, 0 drops
[12:49:34] mux: track 0, 301 frames, 6529798 bytes, 5138.20 kbps, fifo 512
[12:49:34] mux: track 1, 438 frames, 194257 bytes, 152.86 kbps, fifo 512
[12:49:34] libhb: work result = 0
[12:49:34] macgui: incrementQueueItemDone there are no more pending encodes
Last edited by FirstDm on Tue Nov 27, 2018 12:35 pm, edited 2 times in total.
rollin_eng
Veteran User
Posts: 4859
Joined: Wed May 04, 2011 11:06 pm

Re: Excess frames after converting mov to mp4

Post by rollin_eng »

Try it with the latest version or a nightly build.
FirstDm
Posts: 4
Joined: Tue Nov 27, 2018 5:41 am

Re: Excess frames after converting mov to mp4

Post by FirstDm »

rollin_eng wrote: Tue Nov 27, 2018 11:44 am latest version
Does not help.
rollin_eng
Veteran User
Posts: 4859
Joined: Wed May 04, 2011 11:06 pm

Re: Excess frames after converting mov to mp4

Post by rollin_eng »

Try the nightly build and then post your log.
Woodstock
Veteran User
Posts: 4623
Joined: Tue Aug 27, 2013 6:39 am

Re: Excess frames after converting mov to mp4

Post by Woodstock »

Frame count is the same, however, I recall mention that MOV files could have "start/stop" instructions embedded, that tell a player to ignore frames outside a certain range, and the release versions of handbrake do not pass those through.
FirstDm
Posts: 4
Joined: Tue Nov 27, 2018 5:41 am

Re: Excess frames after converting mov to mp4

Post by FirstDm »

Woodstock wrote: Tue Nov 27, 2018 1:47 pm MOV files could have "start/stop" instructions embedded,
handbrake do not pass those through.
should i just encode videos in other formats or is there some ways to change options in Handbrake to prevent the problem?
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Excess frames after converting mov to mp4

Post by mduell »

Use the start/stop frame options in HB to set to your desired clip.
FirstDm
Posts: 4
Joined: Tue Nov 27, 2018 5:41 am

Re: Excess frames after converting mov to mp4

Post by FirstDm »

mduell wrote: Wed Nov 28, 2018 6:11 am Use the start/stop frame options in HB to set to your desired clip.
I tried to set range to 0-300 frames now but it does not help((
rollin_eng
Veteran User
Posts: 4859
Joined: Wed May 04, 2011 11:06 pm

Re: Excess frames after converting mov to mp4

Post by rollin_eng »

Can you post your logs.
Woodstock
Veteran User
Posts: 4623
Joined: Tue Aug 27, 2013 6:39 am

Re: Excess frames after converting mov to mp4

Post by Woodstock »

The video is 301 frames long; if there is a half second of empty frames at the end, at 30fps, you would need to take 15 frames off the end, not 1. You usually won't notice the difference of 14 blank frames vs. 15. :)
Deleted User 13735

Re: Excess frames after converting mov to mp4

Post by Deleted User 13735 »

Those are probably sync frames; leave 'em alone.
Post Reply