RandomEngy / VidCoder

A Blu-ray, DVD and video file transcoder for Windows.
http://vidcoder.net
GNU General Public License v2.0
704 stars 42 forks source link

When convert to AAC and then run through ffmpeg get 'Non monotonically increasing dts to muxer' errors #1129

Closed QGtKMlLz closed 1 year ago

QGtKMlLz commented 1 year ago

Problem Description

I am running 8.25 stable, and I have been starting to use vmaf but when I come across videos I reencode and have also convert to AAC I get this error: [null @ 000002a7747d9040] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 177 >= 177

I tried changing aac settings to default and no difference. Here is the errors from FFmpeg VMAF: vmaf output for converted aac file.txt

Here is the log from vidcoder for that file: 2023-03-30 14.47.49 Encode Escape Room - Tournament of Champions.extended - 0.35.44-0.36.44.mkv-succeeded.txt

Here is an good example converting ac3 -> ac3 then run through ffmpeg vmaf, no errors: 2023-03-30 14.44.37 Encode Escape Room - Tournament of Champions.extended - 0.35.44-0.36.44.mkv-succeeded---AC3 to AC3 no issue when ffmpeg vmaf.txt

What version of VidCoder are you running?

8.25

Encode Log

# VidCoder 8.25
# Starting job 1/39
#   Source path: U:\!.Blu-Ray Final\Escape Room - Tournament of Champions.extended.mkv
#   Destination path: C:\AC3-Output\Escape Room - Tournament of Champions.extended - 0.35.44-0.36.44.mkv
#   Title: 1
#   Seconds: 2144-2204
#   Preset: Restored from Queue
# Worker ready: Pipe 'VidCoderWorker.1bacd29a-b2a9-4196-8837-5f65babd178d' is open
# Connecting to process 11176 on pipe VidCoderWorker.1bacd29a-b2a9-4196-8837-5f65babd178d
[14:47:51] CPU: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
[14:47:51]  - Intel microarchitecture Kaby Lake
[14:47:51]  - logical processor count: 12
[14:47:51] Intel Quick Sync Video support: yes, gpu list: 1
[14:47:51] Intel Quick Sync Video integrated adapter with index 1
[14:47:51] Impl mfxhw64 library path: C:\WINDOWS\System32\DriverStore\FileRepository\igdlh64.inf_amd64_9671054d3bbcb1b5\libmfxhw64.dll
[14:47:51]  - Intel Media SDK hardware: API 1.35 (minimum: 1.3)
[14:47:51]  - Decode support:  h264 hevc (8bit: yes, 10bit: yes)
[14:47:51]  - H.264 encoder: yes
[14:47:51]     - preferred implementation: hardware (2) via D3D11
[14:47:51]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo chromalocinfo opt1 opt2+mbbrc+extbrc+trellis+repeatpps+ib_adapt+nmpslice
[14:47:51]  - H.265 encoder: yes (8bit: yes, 10bit: yes)
[14:47:51]     - preferred implementation: hardware (2) via D3D11
[14:47:51]     - capabilities (hardware):  bpyramid icq vsinfo masteringinfo cllinfo opt1
[14:47:51]  - AV1 encoder: no
[14:47:51] hb_scan: path=U:\!.Blu-Ray Final\Escape Room - Tournament of Champions.extended.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:333: failed opening UDF image U:\!.Blu-Ray Final\Escape Room - Tournament of Champions.extended.mkv
src/libbluray/disc/disc.c:437: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:437: error opening file BDMV\BACKUP\index.bdmv
[14:47: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
[14:47:51] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'U:\!.Blu-Ray Final\Escape Room - Tournament of Champions.extended.mkv':
  Metadata:
    title           : Escape Room: Tournament of Champions (2021)
    ENCODER         : Lavf58.74.100
  Duration: 01:35:45.76, start: 0.000000, bitrate: 11530 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 1146.771000
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 1146.771000, end 1527.568000
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 1527.568000, end 1842.883000
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 1842.883000, end 2013.887000
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 2013.887000, end 2330.203000
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 2330.203000, end 2478.434000
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 2478.434000, end 2598.346000
      Metadata:
        title           : Chapter 07
    Chapter #0:7: start 2598.346000, end 2908.114000
      Metadata:
        title           : Chapter 08
    Chapter #0:8: start 2908.114000, end 3107.313000
      Metadata:
        title           : Chapter 09
    Chapter #0:9: start 3107.313000, end 3271.310000
      Metadata:
        title           : Chapter 10
    Chapter #0:10: start 3271.310000, end 3602.599000
      Metadata:
        title           : Chapter 11
    Chapter #0:11: start 3602.599000, end 3875.497000
      Metadata:
        title           : Chapter 12
    Chapter #0:12: start 3875.497000, end 4167.121000
      Metadata:
        title           : Chapter 13
    Chapter #0:13: start 4167.121000, end 4267.555000
      Metadata:
        title           : Chapter 14
    Chapter #0:14: start 4267.555000, end 4505.918000
      Metadata:
        title           : Chapter 15
    Chapter #0:15: start 4505.918000, end 5435.430000
      Metadata:
        title           : Chapter 16
    Chapter #0:16: start 5435.430000, end 5745.740000
      Metadata:
        title           : Chapter 17
  Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709/unknown/unknown, progressive), 1920x804 [SAR 1:1 DAR 160:67], 23.98 fps, 23.98 tbr, 1k tbn (default)
    Metadata:
      BPS             : 10886804
      NUMBER_OF_FRAMES: 137760
      NUMBER_OF_BYTES : 7819093471
      _STATISTICS_WRITING_APP: mkvmerge v57.0.0 ('Till The End') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION        : 01:35:45.744000000
  Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
    Metadata:
      BPS             : 2343571
      NUMBER_OF_FRAMES: 538663
      NUMBER_OF_BYTES : 1683193852
      _STATISTICS_WRITING_APP: mkvmerge v57.0.0 ('Till The End') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      ENCODER         : Lavc58.131.100 ac3
      DURATION        : 01:35:45.760000000
  Stream #0:2(eng): Subtitle: subrip (default)
    Metadata:
      title           : English (SRT)
      BPS             : 67
      NUMBER_OF_FRAMES: 1328
      NUMBER_OF_BYTES : 44604
      _STATISTICS_WRITING_APP: mkvmerge v57.0.0 ('Till The End') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION        : 01:29:19.193000000
[14:47:51] scan: decoding previews for title 1
[14:47:51] scan: audio 0x1: ac3, rate=48000Hz, bitrate=640000 English (AC3) (5.1 ch) (640 kbps)
[14:47:52] scan: 10 previews, 1920x804, 23.976 fps, autocrop = 0/0/0/0, aspect 2.39:1, PAR 1:1, color profile: 1-1-1, chroma location: left
[14:47:52] scan: supported video decoders: avcodec qsv nvdec
[14:47:52] libhb: scan thread found 1 valid title(s)
[14:47:52] Starting work at: Thu Mar 30 14:47:52 2023
[14:47:52] 1 job(s) to process
[14:47:52] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 0,
        "DRC": 0,
        "Encoder": "av_aac",
        "Gain": 2,
        "Mixdown": 6,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:eac3",
      "copy:truehd",
      "copy:dts",
      "copy:dtshd",
      "copy:mp2",
      "copy:mp3",
      "copy:flac",
      "copy:opus"
    ]
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      },
      {
        "Name": "Chapter 2"
      },
      {
        "Name": "Chapter 3"
      },
      {
        "Name": "Chapter 4"
      },
      {
        "Name": "Chapter 5"
      },
      {
        "Name": "Chapter 6"
      },
      {
        "Name": "Chapter 7"
      },
      {
        "Name": "Chapter 8"
      },
      {
        "Name": "Chapter 9"
      },
      {
        "Name": "Chapter 10"
      },
      {
        "Name": "Chapter 11"
      },
      {
        "Name": "Chapter 12"
      },
      {
        "Name": "Chapter 13"
      },
      {
        "Name": "Chapter 14"
      },
      {
        "Name": "Chapter 15"
      },
      {
        "Name": "Chapter 16"
      },
      {
        "Name": "Chapter 17"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": true,
    "File": "C:\\AC3-Output\\Escape Room - Tournament of Champions.extended - 0.35.44-0.36.44.part.mkv",
    "Mp4Options": {
      "IpodAtom": true,
      "Mp4Optimize": false
    },
    "Mux": "av_mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 2,
        "Settings": {
          "plane": "0",
          "skip-bottom": "4",
          "skip-left": "1",
          "skip-right": "1",
          "skip-top": "4"
        }
      },
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 3,
        "Settings": {
          "block-height": "16",
          "block-thresh": "80",
          "block-width": "16",
          "filter-mode": "1",
          "mode": "0",
          "motion-thresh": "2",
          "spatial-metric": "2",
          "spatial-thresh": "3"
        }
      },
      {
        "ID": 9,
        "Settings": {
          "cb-spatial": "1",
          "cb-temporal": "3",
          "cr-spatial": "1",
          "cr-temporal": "3",
          "y-spatial": "2",
          "y-temporal": "2"
        }
      },
      {
        "ID": 14,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "804",
          "width": "1920"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {
    "Name": "Escape Room: Tournament of Champions (2021)"
  },
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "time",
      "Start": 192960000,
      "End": 198360000
    },
    "Title": 1,
    "Path": "U:\\!.Blu-Ray Final\\Escape Room - Tournament of Champions.extended.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "qsv_h265",
    "Level": "auto",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "speed",
    "Profile": "auto",
    "Quality": 19,
    "QSV": {
      "Decode": false
    },
    "HardwareDecode": 0
  }
}
[14:47:52] qsv: integrated qsv adapter with index 1 has been selected
[14:47:52] Starting Task: Encoding Pass
[14:47:52] Skipping crop/scale filter
[14:47:52] work: bitrate not specified, track 1 setting bitrate 160 Kbps
[14:47:52] work: track 1, dithering not supported by codec
[14:47:52] job configuration:
[14:47:52]  * source
[14:47:52]    + U:\!.Blu-Ray Final\Escape Room - Tournament of Champions.extended.mkv
[14:47:52]    + title 1, start 00:35:44.00 stop 00:36:44.00
[14:47:52]    + container: matroska,webm
[14:47:52]    + data rate: 11530 kbps
[14:47:52]  * destination
[14:47:52]    + C:\AC3-Output\Escape Room - Tournament of Champions.extended - 0.35.44-0.36.44.part.mkv
[14:47:52]    + container: Matroska (libavformat)
[14:47:52]      + align initial A/V stream timestamps
[14:47:52]      + chapter markers
[14:47:52]  * video track
[14:47:52]    + decoder: h264 8-bit (yuv420p)
[14:47:52]    + filters
[14:47:52]      + Detelecine (pullup) (skip-left=1:skip-right=1:skip-top=4:skip-bottom=4:plane=0)
[14:47:52]      + Comb Detect (mode=0:spatial-metric=2:motion-thresh=2:spatial-thresh=3:filter-mode=1:block-thresh=80:block-width=16:block-height=16)
[14:47:52]      + Decomb (mode=39)
[14:47:52]      + Denoise (hqdn3d) (y-spatial=2:cb-spatial=1:cr-spatial=1:y-temporal=2:cb-temporal=3:cr-temporal=3)
[14:47:52]      + Format (format=nv12)
[14:47:52]    + Output geometry
[14:47:52]      + storage dimensions: 1920 x 804
[14:47:52]      + pixel aspect ratio: 1 : 1
[14:47:52]      + display dimensions: 1920 x 804
[14:47:52]    + encoder: H.265 (Intel Media SDK)
[14:47:52]      + preset:  speed
[14:47:52]      + profile: auto
[14:47:52]      + level:   auto
[14:47:52]      + quality: 19.00 (ICQ)
[14:47:52]      + color profile: 1-1-1
[14:47:52]      + chroma location: left
[14:47:52]  * audio track 1
[14:47:52]    + decoder: English (AC3) (5.1 ch) (640 kbps) (track 1, id 0x1)
[14:47:52]      + bitrate: 640 kbps, samplerate: 48000 Hz
[14:47:52]    + mixdown: Dolby Pro Logic II
[14:47:52]    + gain: 2dB
[14:47:52]    + encoder: AAC (libavcodec)
[14:47:52]      + bitrate: 160 kbps, samplerate: 48000 Hz
[14:47:52] sync: expecting 1462 video frames
[14:47:52] encqsvInit: using encode-only path
[14:47:52] encqsvInit: H.265/HEVC Main profile @ level (null)
[14:47:52] encqsvInit: TargetUsage 7 AsyncDepth 4
[14:47:52] encqsvInit: GopRefDist 4 GopPicSize 24 NumRefFrame 3 IdrInterval 0
[14:47:52] encqsvInit: BFramesMax 3 BRefType pyramid
[14:47:52] encqsvInit: RateControlMethod ICQ ICQQuality 19
[14:47:53] sync: first pts audio 0x1 is 0
[14:47:53] sync: first pts video is 0
[14:47:53] qsv_enc_init: using 'hardware (2) via D3D11' implementation, API: 1.35
[14:48:05] sync: reached audio 0x1 pts 5400000, exiting early
[14:48:05] sync: reached video pts 5401646, exiting early
[14:48:05] work: average encoding speed for job is 114.615128 fps
[14:48:05] comb detect: heavy 0 | light 15 | uncombed 1423 | total 1438
[14:48:06] decomb: deinterlaced 0 | blended 15 | unfiltered 1423 | total 1438
[14:48:06] ac3-decoder done: 2401 frames, 0 decoder errors
[14:48:06] h264-decoder done: 1820 frames, 0 decoder errors
[14:48:06] sync: got 1439 frames, 1462 expected
[14:48:06] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
[14:48:06] mux: track 0, 1438 frames, 50714152 bytes, 6759.83 kbps, fifo 512
[14:48:06] mux: track 1, 2813 frames, 1221182 bytes, 162.77 kbps, fifo 1024
[14:48:06] Finished work at: Thu Mar 30 14:48:06 2023
[14:48:06] libhb: work result = 0
# Job completed (Elapsed Time: 16s)
RandomEngy commented 1 year ago

VidCoder uses HandBrake for the core encoding engine; they might be able to help with this one.