Wrong video length

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
matclou
Posts: 6
Joined: Wed Aug 28, 2019 2:06 pm

Wrong video length

Post by matclou » Wed Aug 28, 2019 2:15 pm

Description of problem or question:
Hi, I have a little problem with the video length. I have a TS-File whith the following attributes:

length: 04:06:45
width: 1280
height: 720
fps: 50
size: 14,6 GB (15.708.663.924 Bytes)

There are also no problems when I play this video with VLC.

If I load the video into handbrake, everything is recognized perfectly, but the length is reduced to 03:56:22 - so i can't encode the last 10 minutes of the video.

Does anybody have an idea what could be the cause of this problem?


Steps to reproduce the problem (If Applicable):
Difficult to say. Transfering a 14,6-GB-Video is not that easy and I also don't why this problem occurred now. I transferred other TS-Files before without problems.

HandBrake version (e.g., 1.0.0):
1.2.2



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



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

Code: Select all

HandBrake 1.2.2 (2019022300)
OS: Microsoft Windows NT 10.0.18362.0
CPU: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Ram: 8107 MB, 
GPU Information:
  Intel(R) UHD Graphics 620 - 25.20.100.6373
Screen: 1920x1080
Temp Dir: C:\Users\Mathias\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\Mathias\AppData\Roaming\HandBrake

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

Cannot load nvEncodeAPI64.dll
[16:00:01] hb_init: starting libhb thread

 # Starting Scan ...

[16:00:01] CPU: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
[16:00:01]  - Intel microarchitecture Kaby Lake
[16:00:01]  - logical processor count: 8
[16:00:01] Intel Quick Sync Video support: yes
[16:00:01]  - Intel Media SDK hardware: API 1.27 (minimum: 1.3)
[16:00:01]  - H.264 encoder: yes
[16:00:01]     - preferred implementation: hardware (any) via D3D11
[16:00:01]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[16:00:01]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[16:00:01]     - preferred implementation: hardware (any) via D3D11
[16:00:01]     - capabilities (hardware):  bpyramid icq vsinfo opt1
[16:00:01] hb_scan: path=C:\Users\xxxxxx\Desktop\xxxxxxxxx.ts, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image C:\Users\XXXXXX\Desktop\XXXX.ts
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
[16:00:01] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
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
[16:00:01] dvd: not a dvd - trying as a stream/file instead
[16:00:01] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[16:00:01] Found the following PIDS
[16:00:01]     Video PIDS :
[16:00:01]       0x201 type H.264 (0x1b) (PCR)
[16:00:01]     Audio PIDS :
[16:00:01]       0x202 type MPEG1 (0x3)
[16:00:01]       0x203 type MPEG1 (0x3)
[16:00:01]     Subtitle PIDS :
[16:00:01]     Other PIDS :
[16:00:01]       0x206 type DVB Teletext (0x0)
[16:00:01]       0x5f1 type DVB Subtitling (0x0)
[16:00:01]       0x5f2 type DVB Subtitling (0x0)
[16:00:01] stream id 0x202 (type 0x3 substream 0x0) audio 0x202
[16:00:01] stream id 0x203 (type 0x3 substream 0x0) audio 0x203
[16:00:02] scan: decoding previews for title 1
[16:00:02] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[16:00:02] scan: audio 0x202: mp2, rate=48000Hz, bitrate=128000 Deutsch (MPEG) (2.0 ch)
[16:00:02] scan: audio 0x203: mp2, rate=48000Hz, bitrate=128000 Francais (MPEG) (2.0 ch)
[16:00:02] stream: 25 good frames, 0 errors (0%)
[16:00:02] scan: 10 previews, 1280x720, 50.000 fps, autocrop = 0/0/0/2, aspect 16:9, PAR 1:1
[16:00:02] scan: supported video decoders: avcodec qsv
[16:00:02] libhb: scan thread found 1 valid title(s)

 # Processing Scan Information ...

[swscaler @ 0000021a59a0c9c0] Warning: data is not aligned! This can lead to a speed loss

 # Scan Finished ...

Woodstock
Veteran User
Posts: 3266
Joined: Tue Aug 27, 2013 6:39 am

Re: Wrong video length

Post by Woodstock » Wed Aug 28, 2019 3:52 pm

You've got the scan log, but we really need to see the encode log. Can you post that, too, please?

matclou
Posts: 6
Joined: Wed Aug 28, 2019 2:06 pm

Re: Wrong video length

Post by matclou » Wed Aug 28, 2019 4:30 pm

Okay, i'll do so! I hope it's okay to encode last the last two seconds of the video! :?:

mduell
Veteran User
Posts: 6721
Joined: Sat Apr 21, 2007 8:54 pm

Re: Wrong video length

Post by mduell » Wed Aug 28, 2019 4:37 pm

We need the log from the encode with the actual length problem.

https://handbrake.fr/docs/en/latest/hel ... y-log.html

matclou
Posts: 6
Joined: Wed Aug 28, 2019 2:06 pm

Re: Wrong video length

Post by matclou » Wed Aug 28, 2019 4:56 pm

Hi, okay!

Here the code from the encode process.

You should maybe note, that the problem does not appear during the encoding process, but before when I load the source into the program: The correct length does not appear and I can't encode everything between 3:56:22 and the actual end of the video.

Code: Select all

HandBrake 1.2.2 (2019022300)
OS: Microsoft Windows NT 10.0.18362.0
CPU: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Ram: 8107 MB, 
GPU Information:
  Intel(R) UHD Graphics 620 - 25.20.100.6373
Screen: 1920x1080
Temp Dir: C:\Users\XXXX\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\XXXX\AppData\Roaming\HandBrake

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


# Starting Encode ...

[18:23:40] hb_init: starting libhb thread
[18:23:40] 1 job(s) to process
[18:23:40] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": "av_aac",
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": true,
    "File": "C:\\Users\\XXXXX\\Desktop\\test.m4v",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "mp4"
  },
  "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": "2",
          "crop-top": "0",
          "height": "720",
          "width": "1278"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "2",
          "rate": "27000000/900000"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "time",
      "Start": 1276200000,
      "End": 1276380000
    },
    "Title": 1,
    "Path": "C:\\Users\\XXXXX\\Desktop\\xxxxxxx.ts"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x264",
    "Level": "4.0",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "fast",
    "Profile": "main",
    "Quality": 22.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[18:23:40] CPU: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
[18:23:40]  - Intel microarchitecture Kaby Lake
[18:23:40]  - logical processor count: 8
[18:23:40] Intel Quick Sync Video support: yes
[18:23:40]  - Intel Media SDK hardware: API 1.27 (minimum: 1.3)
[18:23:40]  - H.264 encoder: yes
[18:23:40]     - preferred implementation: hardware (any) via D3D11
[18:23:40]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[18:23:40]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[18:23:40]     - preferred implementation: hardware (any) via D3D11
[18:23:40]     - capabilities (hardware):  bpyramid icq vsinfo opt1
[18:23:40] hb_scan: path=C:\Users\XXXXX\Desktop\XXX.ts, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image C:\Users\XXXXX\Desktop\XXXXX.ts
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
[18:23:40] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
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
[18:23:40] dvd: not a dvd - trying as a stream/file instead
[18:23:40] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[18:23:40] Found the following PIDS
[18:23:40]     Video PIDS :
[18:23:40]       0x201 type H.264 (0x1b) (PCR)
[18:23:40]     Audio PIDS :
[18:23:40]       0x202 type MPEG1 (0x3)
[18:23:40]       0x203 type MPEG1 (0x3)
[18:23:40]     Subtitle PIDS :
[18:23:40]     Other PIDS :
[18:23:40]       0x206 type DVB Teletext (0x0)
[18:23:40]       0x5f1 type DVB Subtitling (0x0)
[18:23:40]       0x5f2 type DVB Subtitling (0x0)
[18:23:40] stream id 0x202 (type 0x3 substream 0x0) audio 0x202
[18:23:40] stream id 0x203 (type 0x3 substream 0x0) audio 0x203
[18:23:40] scan: decoding previews for title 1
[18:23:40] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[18:23:40] scan: audio 0x202: mp2, rate=48000Hz, bitrate=128000 Deutsch (MPEG) (2.0 ch)
[18:23:40] scan: audio 0x203: mp2, rate=48000Hz, bitrate=128000 Francais (MPEG) (2.0 ch)
[18:23:40] stream: 25 good frames, 0 errors (0%)
[18:23:40] scan: 10 previews, 1280x720, 50.000 fps, autocrop = 0/0/0/2, aspect 16:9, PAR 1:1
[18:23:40] scan: supported video decoders: avcodec qsv
[18:23:40] libhb: scan thread found 1 valid title(s)
[18:23:40] Skipping subtitle scan.  No suitable subtitle tracks.
[18:23:40] starting job
[18:23:40] decomb filter thread started for segment 0
[18:23:40] decomb filter thread started for segment 1
[18:23:40] decomb filter thread started for segment 2
[18:23:40] decomb filter thread started for segment 3
[18:23:40] decomb filter thread started for segment 4
[18:23:40] decomb filter thread started for segment 5
[18:23:40] decomb filter thread started for segment 6
[18:23:40] decomb filter thread started for segment 7
[18:23:40] decomb check thread started for segment 0
[18:23:40] decomb check thread started for segment 1
[18:23:40] decomb check thread started for segment 2
[18:23:40] work: only 1 chapter, disabling chapter markers
[18:23:40] job configuration:
[18:23:40]  * source
[18:23:40]    + C:\Users\XXX\Desktop\xxxx.ts
[18:23:40]    + title 1, start 03:56:20.00 stop 03:56:22.00
[18:23:40]  * destination
[18:23:40]    + C:\Users\XXXXX\Desktop\test.m4v
[18:23:40]    + container: MPEG-4 (libavformat)
[18:23:40]      + align initial A/V stream timestamps
[18:23:40]  * video track
[18:23:40]    + decoder: h264
[18:23:40]      + bitrate 200 kbps
[18:23:40]    + filters
[18:23:40] decomb check thread started for segment 3
[18:23:40]      + 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)
[18:23:40]      + Decomb (mode=39)
[18:23:40]      + Framerate Shaper (mode=2:rate=27000000/900000)
[18:23:40]        + frame rate: 50.000 fps -> peak rate limited to 30.000 fps
[18:23:40]      + Crop and Scale (width=1278:height=720:crop-top=0:crop-bottom=0:crop-left=0:crop-right=2)
[18:23:40]        + source: 1280 * 720, crop (0/0/0/2): 1278 * 720, scale: 1278 * 720
[18:23:40] decomb check thread started for segment 4
[18:23:40]    + Output geometry
[18:23:40]      + storage dimensions: 1278 x 720
[18:23:40]      + pixel aspect ratio: 1 : 1
[18:23:40]      + display dimensions: 1278 x 720
[18:23:40]    + encoder: H.264 (libx264)
[18:23:40]      + preset:  fast
[18:23:40]      + profile: main
[18:23:40]      + level:   4.0
[18:23:40]      + quality: 22.00 (RF)
[18:23:40]      + color profile: 1-1-1
[18:23:40]  * audio track 1
[18:23:40]    + decoder: Deutsch (MPEG) (2.0 ch) (track 1, id 0x202)
[18:23:40]      + bitrate: 128 kbps, samplerate: 48000 Hz
[18:23:40]    + mixdown: Stereo
[18:23:40]    + dither: none
[18:23:40]    + encoder: AAC (libavcodec)
[18:23:40]      + bitrate: 160 kbps, samplerate: 48000 Hz
[18:23:40] decomb check thread started for segment 5
[18:23:40] decomb check thread started for segment 6
[18:23:40] file is MPEG Transport Stream with 188 byte packets offset 0 bytes
[18:23:40] decomb check thread started for segment 7
[18:23:40] mask filter thread started for segment 0
[18:23:40] mask filter thread started for segment 1
[18:23:40] mask filter thread started for segment 2
[18:23:40] mask filter thread started for segment 3
[18:23:40] mask filter thread started for segment 4
[18:23:40] sync: expecting 150 video frames
[18:23:40] mask filter thread started for segment 5
[18:23:40] mask filter thread started for segment 6
[18:23:40] mask filter thread started for segment 7
[18:23:40] mask erode thread started for segment 0
[18:23:40] mask erode thread started for segment 1
[18:23:40] mask erode thread started for segment 2
[18:23:40] mask erode thread started for segment 4
[18:23:40] mask erode thread started for segment 5
[18:23:40] mask erode thread started for segment 3
[18:23:40] mask erode thread started for segment 6
[18:23:40] mask erode thread started for segment 7
[18:23:40] mask dilate thread started for segment 0
[18:23:40] encx264: min-keyint: 30, keyint: 300
[18:23:40] encx264: encoding at constant RF 22.000000
[18:23:40] mask dilate thread started for segment 1
[18:23:40] 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
[18:23:40] mask dilate thread started for segment 2
[18:23:40] mask dilate thread started for segment 4
[18:23:40] mask dilate thread started for segment 3
[18:23:40] mask dilate thread started for segment 5
[18:23:40] mask dilate thread started for segment 6
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[18:23:40] mask dilate thread started for segment 7
[18:23:40] yadif thread started for segment 1
[18:23:40] yadif thread started for segment 0
[18:23:40] yadif thread started for segment 2
[18:23:40] yadif thread started for segment 3
[18:23:40] yadif thread started for segment 4
[18:23:40] yadif thread started for segment 5
[18:23:40] yadif thread started for segment 6
[18:23:40] yadif thread started for segment 7
x264 [info]: profile Main, level 4.0, 4:2:0, 8-bit
[18:25:03] stream: error near frame 44743: packet error bit set
[18:25:32] stream: error near frame 60204: packet error bit set
[18:25:53] stream: error near frame 72083: continuity error: got 5 expected 11
[18:25:56] stream: error near frame 73910: continuity error: got 8 expected 0
[18:26:38] stream: error near frame 91569: continuity error: got 7 expected 3
[18:27:23] stream: error near frame 111406: packet error bit set
[18:27:35] stream: error near frame 117003: continuity error: got 0 expected 9
[18:29:06] stream: error near frame 160478: continuity error: got 4 expected 13
[18:29:10] stream: error near frame 162670: continuity error: got 2 expected 12
[18:30:05] stream: error near frame 190035: continuity error: got 14 expected 12
[18:30:10] stream: error near frame 192273: continuity error: got 8 expected 3
[18:30:19] stream: error near frame 196029: continuity error: got 5 expected 15
[18:30:31] stream: error near frame 201951: continuity error: got 8 expected 7
[18:30:41] stream: error near frame 207165: continuity error: got 9 expected 2
[18:30:49] stream: error near frame 210853: continuity error: got 8 expected 15
[mp2 @ 000001c1b59517c0] Header missing
[18:31:08] stream: error near frame 218162: continuity error: got 12 expected 14
[18:31:17] stream: error near frame 222999: continuity error: got 1 expected 3
[18:31:34] stream: error near frame 231619: packet error bit set
[18:31:53] stream: 18 new errors (0%) up to frame 238226: continuity error: got 13 expected 0
[18:32:14] stream: error near frame 246226: continuity error: got 11 expected 4
[18:32:26] stream: error near frame 249944: continuity error: got 14 expected 5
[18:32:33] stream: error near frame 252833: continuity error: got 15 expected 14
[18:32:41] stream: error near frame 256085: continuity error: got 0 expected 14
[18:32:48] stream: error near frame 258735: continuity error: got 6 expected 5
[18:32:53] stream: error near frame 260560: continuity error: got 8 expected 6
[18:33:21] stream: 12 new errors (0%) up to frame 272276: packet error bit set
[18:33:48] stream: error near frame 279959: continuity error: got 8 expected 6
[18:34:36] stream: error near frame 300522: continuity error: got 9 expected 4
[18:34:50] stream: error near frame 306838: continuity error: got 12 expected 0
[18:35:12] stream: error near frame 317613: continuity error: got 1 expected 5
[18:35:25] stream: error near frame 323026: continuity error: got 7 expected 10
[18:35:46] stream: error near frame 331266: continuity error: got 12 expected 1
[18:36:00] stream: error near frame 336043: continuity error: got 8 expected 3
[18:36:04] stream: error near frame 338115: continuity error: got 13 expected 1
[18:36:14] stream: error near frame 343503: continuity error: got 7 expected 2
[18:36:34] stream: error near frame 352873: continuity error: got 11 expected 6
[18:36:50] stream: error near frame 360880: continuity error: got 2 expected 4
[18:37:32] stream: error near frame 383485: continuity error: got 14 expected 4
[18:37:52] stream: error near frame 392259: continuity error: got 15 expected 10
[18:38:13] stream: error near frame 403309: continuity error: got 10 expected 15
[18:38:26] stream: error near frame 411840: continuity error: got 8 expected 1
[18:38:55] stream: error near frame 428728: continuity error: got 8 expected 14
[18:40:00] stream: error near frame 459637: continuity error: got 4 expected 10
[18:40:08] stream: error near frame 463942: continuity error: got 13 expected 7
[18:40:17] stream: error near frame 468464: continuity error: got 2 expected 1
[18:40:21] stream: error near frame 470339: continuity error: got 2 expected 4
[18:40:37] stream: error near frame 478129: continuity error: got 14 expected 4
[18:40:48] stream: error near frame 483517: continuity error: got 4 expected 10
[18:40:58] stream: error near frame 488066: continuity error: got 11 expected 13
[18:41:03] stream: error near frame 490821: continuity error: got 8 expected 7
[18:41:40] stream: error near frame 508573: continuity error: got 7 expected 6
[18:41:59] stream: error near frame 517443: continuity error: got 2 expected 12
[18:42:23] stream: error near frame 529148: continuity error: got 6 expected 12
[18:42:52] stream: error near frame 542967: continuity error: got 10 expected 1
[18:43:00] stream: error near frame 547185: continuity error: got 7 expected 10
[18:43:08] stream: error near frame 551115: continuity error: got 0 expected 15
[18:43:57] stream: error near frame 576435: continuity error: got 8 expected 15
[18:45:03] stream: error near frame 607979: continuity error: got 8 expected 4
[18:45:21] stream: error near frame 616809: continuity error: got 9 expected 14
[18:46:26] stream: error near frame 647488: continuity error: got 6 expected 9
[18:46:39] stream: error near frame 653542: continuity error: got 8 expected 11
[mp2 @ 000001c1b59517c0] Header missing
[18:47:04] stream: error near frame 661826: continuity error: got 0 expected 8
[18:47:21] stream: error near frame 668083: continuity error: got 11 expected 13
[18:47:37] stream: error near frame 675100: continuity error: got 15 expected 13
[18:47:44] stream: error near frame 678060: continuity error: got 6 expected 14
[18:48:03] stream: error near frame 686825: continuity error: got 15 expected 14
[18:48:08] stream: error near frame 689604: continuity error: got 15 expected 2
[18:48:21] stream: error near frame 696692: continuity error: got 15 expected 9
[18:48:44] stream: error near frame 706801: continuity error: got 4 expected 10
[18:48:49] sync: first pts video is 0
[18:48:49] sync: first pts audio 0x202 is 0
[18:48:49] sync: reached video pts 180000, exiting early
[18:48:49] sync: reached audio 0x202 pts 181813, exiting early
[18:48:51] work: average encoding speed for job is 0.000000 fps
[18:48:51] comb detect: heavy 0 | light 0 | uncombed 100 | total 100
[18:48:51] decomb: deinterlaced 0 | blended 0 | unfiltered 100 | total 100
[18:48:51] vfr: 61 frames output, 39 dropped and 0 duped for CFR/PFR
[18:48:51] vfr: lost time: 0 (0 frames)
[18:48:51] vfr: gained time: 0 (0 frames) (0 not accounted for)
[18:48:51] stream: 709487 good frames, 228 errors (0%)
[18:48:51] mp2-decoder done: 591115 frames, 0 decoder errors
[18:48:51] h264-decoder done: 709460 frames, 0 decoder errors
[18:48:51] sync: got 100 frames, 150 expected
[18:48:51] sync: framerate min 50.000 fps, max 50.000 fps, avg 50.000 fps
[aac @ 000001c192067780] Qavg: 217.887
x264 [info]: frame I:1     Avg QP:23.66  size: 41481
x264 [info]: frame P:17    Avg QP:22.98  size: 16342
x264 [info]: frame B:43    Avg QP:23.98  size:  5655
x264 [info]: consecutive B-frames:  1.6%  9.8%  9.8% 78.7%
x264 [info]: mb I  I16..4: 33.9%  0.0% 66.1%
x264 [info]: mb P  I16..4:  5.9%  0.0%  2.1%  P16..4: 49.1% 13.7%  9.8%  0.0%  0.0%    skip:19.5%
x264 [info]: mb B  I16..4:  4.6%  0.0%  0.0%  B16..8: 19.6%  3.0%  0.0%  direct:17.6%  skip:55.2%  L0:50.0% L1:44.4% BI: 5.6%
x264 [info]: coded y,uvDC,uvAC intra: 75.6% 53.5% 4.6% inter: 14.4% 21.3% 0.0%
x264 [info]: i16 v,h,dc,p: 31%  6% 42% 20%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 11% 25%  7%  9%  8%  6%  6%  4%
x264 [info]: i8c dc,h,v,p: 59% 16% 24%  2%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: ref P L0: 57.6% 42.4%
x264 [info]: ref B L0: 74.4% 25.6%
x264 [info]: ref B L1: 96.2%  3.8%
x264 [info]: kb/s:2212.93
[18:48:51] mux: track 0, 61 frames, 562413 bytes, 2177.08 kbps, fifo 64
[18:48:51] mux: track 1, 95 frames, 40406 bytes, 156.41 kbps, fifo 128
[18:48:51] libhb: work result = 0

# Encode Completed ...

Woodstock
Veteran User
Posts: 3266
Joined: Tue Aug 27, 2013 6:39 am

Re: Wrong video length

Post by Woodstock » Wed Aug 28, 2019 6:00 pm

Was this a recording of an over-the-air transmission? The source has a LOT of continuity errors.

When you watch the output, is the the end actually missing, or does it occur earlier than it should?

User avatar
JohnAStebbins
HandBrake Team
Posts: 5469
Joined: Sat Feb 09, 2008 7:21 pm

Re: Wrong video length

Post by JohnAStebbins » Wed Aug 28, 2019 6:03 pm

Code: Select all

[18:23:40]    + title 1, start 03:56:20.00 stop 03:56:22.00
You told it to exit early. So that log doesn't show what happens at the end where you claim it is truncating the file

User avatar
JohnAStebbins
HandBrake Team
Posts: 5469
Joined: Sat Feb 09, 2008 7:21 pm

Re: Wrong video length

Post by JohnAStebbins » Wed Aug 28, 2019 6:14 pm

If you are using point-to-point encoding, i.e. setting "Range" to "Seconds", HandBrake is going to default the end time to what it thinks is the duration of the video. I'm not sure what the behaviour on the windows gui is, but the linux gui will let you manually extend that to up to twice the detected duration.

So, why is this happening? Transport streams are notoriously difficult to estimate the duration of. They do not have continuous timestamps, so you can't just compute duration = last_timestamp - first_timestamp. HandBrake samples several timestamps throughout the file and does an estimate based on what it sees at those samples. It is often off by a significant amount.

matclou
Posts: 6
Joined: Wed Aug 28, 2019 2:06 pm

Re: Wrong video length

Post by matclou » Wed Aug 28, 2019 6:22 pm

Woodstock wrote:
Wed Aug 28, 2019 6:00 pm
Was this a recording of an over-the-air transmission? The source has a LOT of continuity errors.
No, it was cable tv. Maybe adapter is not the best. But it's not too bad, when you watch it. It's also a 4-hour-stream, so there are many opportunities for errors ;-)
Woodstock wrote:
Wed Aug 28, 2019 6:00 pm
When you watch the output, is the the end actually missing, or does it occur earlier than it should?
No, it's exactly as long (2 seconds) as expected.
JohnAStebbins wrote:
Wed Aug 28, 2019 6:03 pm

Code: Select all

[18:23:40]    + title 1, start 03:56:20.00 stop 03:56:22.00
You told it to exit early. So that log doesn't show what happens at the end where you claim it is truncating the file
Okay, but how can I not tell the program not to exit early, when the total length of the video is calculated wrongly?

This is how the program window looks like for me:

Image

I can't extend the ending time to the actual end of the video.
JohnAStebbins wrote:
Wed Aug 28, 2019 6:14 pm
Transport streams are notoriously difficult to estimate the duration of. They do not have continuous timestamps, so you can't just compute duration = last_timestamp - first_timestamp. HandBrake samples several timestamps throughout the file and does an estimate based on what it sees at those samples. It is often off by a significant amount.
Ah, I see! This is an explanation! Is there an solution for this? Maybe encode the whole ts file into mp4 and then cut the mp4 file?

matclou
Posts: 6
Joined: Wed Aug 28, 2019 2:06 pm

Re: Wrong video length

Post by matclou » Wed Aug 28, 2019 6:25 pm

...sorry, here the correct link to the screenshot: https://ibb.co/BCJR4JW

User avatar
JohnAStebbins
HandBrake Team
Posts: 5469
Joined: Sat Feb 09, 2008 7:21 pm

Re: Wrong video length

Post by JohnAStebbins » Wed Aug 28, 2019 6:30 pm

Ah, I see! This is an explanation! Is there an solution for this? Maybe encode the whole ts file into mp4 and then cut the mp4 file?
Yes, that would be one way. I'm pretty sure ffmpeg would be able to simply cut and remux the mp4 file after encoding, but I don't know the exact command line to do so. There are also tools that can clean up transport streams to make them easier to process, but I've not personally used these.

matclou
Posts: 6
Joined: Wed Aug 28, 2019 2:06 pm

Re: Wrong video length

Post by matclou » Wed Aug 28, 2019 6:35 pm

But can I encode the whole ts file with Handbrake? Because there is no option to say "encode the whole file" in it. You always have the time frame 0:00:00 to 03:56:22 and can't waive it ... Or am i wrong?

User avatar
JohnAStebbins
HandBrake Team
Posts: 5469
Joined: Sat Feb 09, 2008 7:21 pm

Re: Wrong video length

Post by JohnAStebbins » Wed Aug 28, 2019 6:48 pm

Don't modify the "Range" option. Leave it set to "Chapters". Should result in the entire video getting encoded.

Post Reply