Resulting conversion horribly out of sync

HandBrake for Windows 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
AceMcCrank
New User
Posts: 1
Joined: Tue Jan 30, 2018 8:13 pm

Resulting conversion horribly out of sync

Post by AceMcCrank »

When converting this video from MPEG-1 to any format, despite setting framerate to "same as source" and no matter what format I export to, my 47-minute video ends up being 1 hour 12 minutes. The audio remains the same length, resulting in 25 minutes of audio-free footage with the video itself not syncing up with the audio at all.


HandBrake version 1.0.7


Windows 10 build 16299.192
Screenshot https://imgur.com/fIbjPgY
Image

HandBrake Activity Log

Code: Select all

HandBrake 1.0.7 (2017040900) - 64bit
OS: Microsoft Windows NT 10.0.16299.0 - 64bit
CPU: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz
Ram: 12241 MB, 
GPU Information:
  NVIDIA GeForce GTX 550 Ti - 23.21.13.9065
Screen: 1680x1050
Temp Dir: C:\Users\Aaron\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Aaron\AppData\Roaming\HandBrake Team\HandBrake\1.0.7.0

-------------------------------------------


# Starting Encode ...

[12:10:59] hb_init: starting libhb thread
[12:10:59] 1 job(s) to process
[12:10:59] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": 65536,
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "File": "D:\\Documents\\Newb1-1-attempt-2.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": true
    },
    "Mux": 131072
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 3,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "720",
          "width": "1280"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "0"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "D:\\Documents\\Newb1.mpg"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": 65536,
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "fast",
    "Profile": "auto",
    "Quality": 24.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[12:10:59] CPU: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz
[12:10:59]  - Intel microarchitecture Sandy Bridge
[12:10:59]  - logical processor count: 4
[12:10:59] Intel Quick Sync Video support: no
[12:10:59] hb_scan: path=D:\Documents\Newb1.mpg, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image D:\Documents\Newb1.mpg
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[12:10:59] 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:10:59] dvd: not a dvd - trying as a stream/file instead
[12:10:59] file is MPEG Program Stream
[12:10:59] Probing 1 unknown stream
[12:10:59]     Probe: Found stream mpeg2video. stream id 0xe0-0x0
[12:10:59] Found the following streams
[12:10:59]     Video Streams :
[12:10:59]       0xe0-0x0 type MPEG2 (0x2)
[12:10:59]     Audio Streams :
[12:10:59]       0xc0-0x0 type MPEG2 (0x4)
[12:10:59]     Subtitle Streams :
[12:10:59]     Other Streams :
[12:10:59] stream id 0xc0 (type 0x4 substream 0x0) audio 0xc0
[12:10:59] scan: decoding previews for title 1
[12:10:59] file is MPEG Program Stream
[12:10:59] Probing 1 unknown stream
[12:10:59]     Probe: Found stream mpeg2video. stream id 0xe0-0x0
[12:10:59] scan: audio 0xc0: mp2, rate=48000Hz, bitrate=200000 Unknown (MPEG) (2.0 ch)
[12:10:59] stream: 63 good frames, 0 errors (0%)
[12:10:59] scan: 10 previews, 1280x720, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[12:11:00] libhb: scan thread found 1 valid title(s)
[12:11:00] Skipping subtitle scan.  No suitable subtitle tracks.
[12:11:00] starting job
[12:11:00] decomb filter thread started for segment 0
[12:11:00] decomb filter thread started for segment 2
[12:11:00] decomb filter thread started for segment 1
[12:11:00] decomb filter thread started for segment 3
[12:11:00] decomb check thread started for segment 0
[12:11:00] decomb check thread started for segment 1
[12:11:00] decomb check thread started for segment 2
[12:11:00] decomb check thread started for segment 3
[12:11:00] mask filter thread started for segment 0
[12:11:00] mask filter thread started for segment 1
[12:11:00] mask filter thread started for segment 2
[12:11:00] mask filter thread started for segment 3
[12:11:00] mask erode thread started for segment 0
[12:11:00] mask erode thread started for segment 1
[12:11:00] mask erode thread started for segment 2
[12:11:00] mask erode thread started for segment 3
[12:11:00] mask dilate thread started for segment 0
[12:11:00] mask dilate thread started for segment 1
[12:11:00] mask dilate thread started for segment 2
[12:11:00] mask dilate thread started for segment 3
[12:11:00] yadif thread started for segment 0
[12:11:00] yadif thread started for segment 1
[12:11:00] yadif thread started for segment 2
[12:11:00] yadif thread started for segment 3
[12:11:00] work: track 1, dithering not supported by codec
[12:11:00] work: only 1 chapter, disabling chapter markers
[12:11:00] job configuration:
[12:11:00]  * source
[12:11:00]    + D:\Documents\Newb1.mpg
[12:11:00]    + title 1, chapter(s) 1 to 1
[12:11:00]  * destination
[12:11:00]    + D:\Documents\Newb1-1-attempt-2.mp4
[12:11:00]    + container: MPEG-4 (libavformat)
[12:11:00]      + optimized for HTTP streaming (fast start)
[12:11:00]  * video track
[12:11:00]    + decoder: mpeg2video
[12:11:00]      + bitrate 104857 kbps
[12:11:00]    + filters
[12:11:00]      + 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)
[12:11:00]      + Decomb (mode=39)
[12:11:00]      + Framerate Shaper (mode=0)
[12:11:00]        + frame rate: same as source (around 29.970 fps)
[12:11:00]      + Crop and Scale (width=1280:height=720:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[12:11:00]        + source: 1280 * 720, crop (0/0/0/0): 1280 * 720, scale: 1280 * 720
[12:11:00]    + Output geometry
[12:11:00]      + storage dimensions: 1280 x 720
[12:11:00]      + pixel aspect ratio: 1 : 1
[12:11:00]      + display dimensions: 1280 x 720
[12:11:00]    + encoder: H.264 (libx264)
[12:11:00]      + preset:  fast
[12:11:00]      + profile: auto
[12:11:00]      + level:   auto
[12:11:00]      + quality: 24.00 (RF)
[12:11:00]  * audio track 1
[12:11:00]    + decoder: Unknown (MPEG) (2.0 ch) (track 1, id 0xc0)
[12:11:00]      + bitrate: 200 kbps, samplerate: 48000 Hz
[12:11:00]    + mixdown: Stereo
[12:11:00]    + encoder: AAC (libavcodec)
[12:11:00]      + bitrate: 160 kbps, samplerate: 48000 Hz
[12:11:00] file is MPEG Program Stream
[12:11:00] Probing 1 unknown stream
[12:11:00]     Probe: Found stream mpeg2video. stream id 0xe0-0x0
[12:11:00] sync: expecting 77597 video frames
[12:11:00] encx264: min-keyint: 30, keyint: 300
[12:11:00] encx264: encoding at constant RF 24.000000
[12:11:00] encx264: unparsed options: ref=2:weightp=1:subme=6:rc-lookahead=30
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile High, level 3.1
[12:11:00] sync: first pts audio 0xc0 is 0
[12:11:00] sync: first pts video is 902
[12:17:04] sync: video time went backwards 3670 ms, dropped 110 frames. PTS 205323246
[12:27:12] sync: video time went backwards 33 ms, dropped 1 frames. PTS 299791620
[12:27:12] sync: video time went backwards 100 ms, dropped 3 frames. PTS 299794623
[12:27:12] sync: video time went backwards 166 ms, dropped 5 frames. PTS 299803632
[12:27:12] sync: video time went backwards 233 ms, dropped 7 frames. PTS 299818647
[12:27:12] sync: video time went backwards 300 ms, dropped 9 frames. PTS 299839668
[12:27:12] sync: video time went backwards 367 ms, dropped 11 frames. PTS 299866695
[12:27:12] sync: video time went backwards 233 ms, dropped 7 frames. PTS 299899728
[12:27:55] hb_init: starting libhb thread
[12:35:56] reader: done. 15716 scr changes
[12:35:57] work: average encoding speed for job is 55.104916 fps
[12:35:57] comb detect: heavy 533 | light 3413 | uncombed 78600 | total 82546
[12:35:57] decomb: deinterlaced 533 | blended 3413 | unfiltered 78600 | total 82546
[12:35:57] vfr: lost time: 0 (0 frames)
[12:35:57] vfr: gained time: 0 (0 frames) (0 not accounted for)
[12:35:57] stream: 1043115 good frames, 0 errors (0%)
[12:35:57] mp2-decoder done: 114954 frames, 0 decoder errors
[12:35:57] mpeg2video-decoder done: 82699 frames, 0 decoder errors
[12:35:57] sync: got 82546 frames, 77597 expected
[12:35:57] sync: framerate min 0.001 fps, max 29.970 fps, avg 18.977 fps
x264 [info]: frame I:543   Avg QP:20.93  size: 60077
x264 [info]: frame P:34559 Avg QP:23.62  size: 13289
x264 [info]: frame B:47444 Avg QP:23.99  size:  2970
x264 [info]: consecutive B-frames: 17.6% 13.1% 13.0% 56.3%
x264 [info]: mb I  I16..4: 12.8% 73.1% 14.1%
x264 [info]: mb P  I16..4:  2.9% 15.9%  1.6%  P16..4: 21.7%  6.8%  3.0%  0.0%  0.0%    skip:48.2%
x264 [info]: mb B  I16..4:  1.3%  3.8%  0.3%  B16..8:  9.7%  2.6%  0.2%  direct: 2.9%  skip:79.3%  L0:47.8% L1:48.1% BI: 4.1%
x264 [info]: 8x8 transform intra:76.0% inter:70.4%
x264 [info]: coded y,uvDC,uvAC intra: 53.1% 53.5% 15.0% inter: 6.5% 7.4% 0.6%
x264 [info]: i16 v,h,dc,p: 34% 40% 20%  6%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 24% 30%  4%  4%  4%  5%  4%  6%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 28% 14%  5%  6%  6%  6%  4%  5%
x264 [info]: i8c dc,h,v,p: 54% 25% 18%  3%
x264 [info]: Weighted P-Frames: Y:0.1% UV:0.1%
x264 [info]: ref P L0: 82.6% 17.4%
x264 [info]: ref B L0: 85.3% 14.7%
x264 [info]: ref B L1: 96.6%  3.4%
x264 [info]: kb/s:1163.89
[mp4 @ 000001b89d8152c0] Starting second pass: moving the moov atom to the beginning of the file
[12:35:58] mux: track 0, 82546 frames, 632797953 bytes, 1163.84 kbps, fifo 4096
[12:35:58] mux: track 1, 129324 frames, 55328203 bytes, 101.76 kbps, fifo 32768
[12:35:58] libhb: work result = 0

# Encode Completed ...


[code][/i]
Woodstock
Veteran User
Posts: 4619
Joined: Tue Aug 27, 2013 6:39 am

Re: Resulting conversion horribly out of sync

Post by Woodstock »

There are a number of problems with that video. Time codes move backwards, the frame rate jumps around... And it looks like it was telecined to 29.97fps, so the detelecine filter might help.

Have you tried a nightly build on it yet?

The nightly builds are much more tolerant of sync problems, but I'm not sure if all the backwards-moving time codes can be smoothed out properly.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Resulting conversion horribly out of sync

Post by BradleyS »

Also seems like a possible candidate for something like Video ReDo’s stream fixing abilities.
Post Reply