MKV to MP4 Help Needed

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
tangerines
Posts: 2
Joined: Thu Jul 06, 2017 9:22 am

MKV to MP4 Help Needed

Post by tangerines »

Hi all! I've been wanting to make GIFs of a certain anime, but Photoshop cannot open MKV files. I downloaded HandBrake today and I've been trying to convert my video file from MKV to MP4, but I've been encountering some errors. I'm on Windows 10 and using version 1.0.7 of HandBrake. Below is the Activity Log. I'm a noob when it comes to video encoding and HandBrake, so please bear with me. Thanks for the help!

Code: Select all

# Starting Encode ...

[02:19:56] hb_init: starting libhb thread
[02:19:56] 1 job(s) to process
[02:19:56] 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": "C:\\Users\\nikki\\Downloads\\cheese.mp4",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 131072
  },
  "Filters": {
    "FilterList": [
      {
        "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": 11,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1080",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "2",
          "rate": "27000000/900000"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "C:\\Users\\nikki\\Downloads\\[HorribleSubs] Koi to Uso - 01 [1080p].mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": 65536,
    "Level": "4.0",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "veryfast",
    "Profile": "main",
    "Quality": 24.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[02:19:56] CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
[02:19:56]  - Intel microarchitecture Skylake
[02:19:56]  - logical processor count: 8
[02:19:56] Intel Quick Sync Video support: yes
[02:19:56]  - Intel Media SDK hardware: API 1.19 (minimum: 1.3)
[02:19:56]  - H.264 encoder: yes
[02:19:56]     - preferred implementation: hardware (any)
[02:19:56]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[02:19:56]  - H.265 encoder: yes
[02:19:56]     - preferred implementation: hardware (any)
[02:19:56]     - capabilities (hardware):  bpyramid vsinfo opt1
[02:19:56] hb_scan: path=C:\Users\nikki\Downloads\[HorribleSubs] Koi to Uso - 01 [1080p].mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image C:\Users\nikki\Downloads\[HorribleSubs] Koi to Uso - 01 [1080p].mkv
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
[02:19:56] bd: not a bd - trying as a stream/file instead
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.BUP.
[02:19:56] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'C:\Users\nikki\Downloads\[HorribleSubs] Koi to Uso - 01 [1080p].mkv':
  Duration: 00:23:59.44, start: 0.000000, bitrate: 718 kb/s
    Stream #0:0: Video: h264 (High)
      yuv420p, tv, bt709/bt709/bt709
      1920x1080 [PAR 1:1 DAR 16:9], PAR 1:1 DAR 16:9
      23.98 fps, 1k tbn (default)
    Stream #0:1: Audio: aac (LC)
      48000 Hz, stereo, fltp (default)
    Stream #0:2(jpn): Audio: eac3
      48000 Hz, stereo, fltp, 224 kb/s
    Metadata:
      title           : EAC3
    Stream #0:3(eng): Subtitle: ssa (default)
    Stream #0:4: Attachment: [0][0][0][0] / 0x0000
    Metadata:
      filename        : OpenSans-Semibold.ttf
      mimetype        : application/x-truetype-font
[02:19:56] scan: decoding previews for title 1
[02:19:56] scan: audio 0x1: aac, rate=48000Hz, bitrate=1 Unknown (AAC) (2.0 ch)
[02:19:56] scan: audio 0x2: eac3, rate=48000Hz, bitrate=224000 ??? (E-AC3) (2.0 ch)
[02:19:56] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[02:19:56] scan: supported video decoders: avcodec qsv
[02:19:56] libhb: scan thread found 1 valid title(s)
[02:19:56] Skipping subtitle scan.  No suitable subtitle tracks.
[02:19:56] starting job
[02:19:56] decomb filter thread started for segment 0
[02:19:56] decomb filter thread started for segment 4
[02:19:56] decomb check thread started for segment 2
[02:19:56] decomb check thread started for segment 3
[02:19:56] decomb check thread started for segment 7
[02:19:56] decomb filter thread started for segment 6
[02:19:56] yadif thread started for segment 3
[02:19:56] yadif thread started for segment 4
[02:19:56] decomb check thread started for segment 0
[02:19:56] decomb check thread started for segment 1
[02:19:56] work: track 1, dithering not supported by codec
[02:19:56] decomb filter thread started for segment 2
[02:19:56] work: only 1 chapter, disabling chapter markers
[02:19:56] job configuration:
[02:19:56]  * source
[02:19:56]    + C:\Users\nikki\Downloads\[HorribleSubs] Koi to Uso - 01 [1080p].mkv
[02:19:56]    + title 1, chapter(s) 1 to 1
[02:19:56]    + container: matroska,webm
[02:19:56] decomb check thread started for segment 5
[02:19:56]    + data rate: 718 kbps
[02:19:56]  * destination
[02:19:56]    + C:\Users\nikki\Downloads\cheese.mp4
[02:19:56]    + container: MPEG-4 (libavformat)
[02:19:56]  * video track
[02:19:56]    + decoder: h264
[02:19:56]    + filters
[02:19:56]      + 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)
[02:19:56] decomb check thread started for segment 6
[02:19:56]      + Decomb (mode=39)
[02:19:56] decomb filter thread started for segment 3
[02:19:56]      + Framerate Shaper (mode=2:rate=27000000/900000)
[02:19:56]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[02:19:56]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[02:19:56]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[02:19:56]    + Output geometry
[02:19:56]      + storage dimensions: 1920 x 1080
[02:19:56]      + pixel aspect ratio: 1 : 1
[02:19:56]      + display dimensions: 1920 x 1080
[02:19:56]    + encoder: H.264 (libx264)
[02:19:56] decomb filter thread started for segment 5
[02:19:56]      + preset:  veryfast
[02:19:56]      + profile: main
[02:19:56]      + level:   4.0
[02:19:56]      + quality: 24.00 (RF)
[02:19:56]  * audio track 1
[02:19:56]    + decoder: Unknown (AAC) (2.0 ch) (track 1, id 0x1)
[02:19:56]      + samplerate: 48000 Hz
[02:19:56]    + mixdown: Stereo
[02:19:56]    + encoder: AAC (libavcodec)
[02:19:56]      + bitrate: 160 kbps, samplerate: 48000 Hz
[02:19:56] decomb check thread started for segment 4
[02:19:56] yadif thread started for segment 0
[02:19:56] yadif thread started for segment 1
[02:19:56] decomb filter thread started for segment 7
[02:19:56] yadif thread started for segment 2
[02:19:56] decomb filter thread started for segment 1
[02:19:56] yadif thread started for segment 5
[02:19:56] yadif thread started for segment 6
[02:19:56] yadif thread started for segment 7
[02:19:56] sync: expecting 34512 video frames
[02:19:56] encx264: min-keyint: 24, keyint: 240
[02:19:56] encx264: encoding at constant RF 24.000000
[02:19:56] encx264: unparsed options: level=4.0:ref=1:trellis=0:subme=2:8x8dct=0:vbv-bufsize=25000:weightp=1:mixed-refs=0:vbv-maxrate=20000:rc-lookahead=10
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
x264 [info]: profile Main, level 4.0
[02:19:56] sync: first pts video is 0
[02:19:56] sync: "Chapter 1" (1) at frame 1 time 0
[02:19:56] sync: first pts audio 0x1 is 0
[02:20:48] reader: done. 1 scr changes
[02:20:49] work: average encoding speed for job is 91.905533 fps
[02:20:49] comb detect: heavy 1 | light 35 | uncombed 4777 | total 4813
[02:20:49] decomb: deinterlaced 1 | blended 35 | unfiltered 4777 | total 4813
[02:20:49] vfr: 4813 frames output, 0 dropped and 0 duped for CFR/PFR
[02:20:49] vfr: lost time: 0 (0 frames)
[02:20:49] vfr: gained time: 0 (0 frames) (0 not accounted for)
[02:20:49] aac-decoder done: 9410 frames, 0 decoder errors
[02:20:49] h264-decoder done: 4813 frames, 0 decoder errors
[02:20:49] sync: got 4813 frames, 34512 expected
[02:20:49] sync: framerate min 23.981 fps, max 23.981 fps, avg 23.976 fps
x264 [info]: frame I:80    Avg QP:16.63  size: 75899
x264 [info]: frame P:1585  Avg QP:21.61  size: 17333
x264 [info]: frame B:3148  Avg QP:23.21  size:  3341
x264 [info]: consecutive B-frames:  5.7% 19.6%  4.9% 69.8%
x264 [info]: mb I  I16..4: 66.2%  0.0% 33.8%
x264 [info]: mb P  I16..4: 17.9%  0.0%  2.4%  P16..4: 15.5%  6.0%  2.4%  0.0%  0.0%    skip:55.8%
x264 [info]: mb B  I16..4:  1.9%  0.0%  0.1%  B16..8:  6.6%  1.6%  0.1%  direct: 3.7%  skip:86.0%  L0:46.3% L1:47.9% BI: 5.8%
x264 [info]: coded y,uvDC,uvAC intra: 19.1% 44.5% 14.7% inter: 2.4% 7.5% 0.5%
x264 [info]: i16 v,h,dc,p: 48% 35% 11%  7%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 23% 22%  5%  5%  5%  5%  5%  4%
x264 [info]: i8c dc,h,v,p: 50% 28% 18%  4%
x264 [info]: Weighted P-Frames: Y:3.8% UV:2.5%
x264 [info]: kb/s:1755.92
[02:20:49] mux: track 0, 4813 frames, 44058498 bytes, 1755.46 kbps, fifo 2048
[02:20:49] mux: track 1, 9410 frames, 3966395 bytes, 158.04 kbps, fifo 4096
[02:20:49] libhb: work result = 0

# Encode Completed ...
Deleted User 11865

Re: MKV to MP4 Help Needed

Post by Deleted User 11865 »

tangerines wrote: Thu Jul 06, 2017 9:31 amI downloaded HandBrake today and I've been trying to convert my video file from MKV to MP4, but I've been encountering some errors.
Thanks for the log, but there are no errors in it that I can see, so you'll have to be more specific about your issues please.
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: MKV to MP4 Help Needed

Post by rollin_eng »

[02:20:49] sync: got 4813 frames, 34512 expected

I suspect this might be an issue, your source may have errors in it, can you re-acquire it?
tangerines
Posts: 2
Joined: Thu Jul 06, 2017 9:22 am

Re: MKV to MP4 Help Needed

Post by tangerines »

Rodeo wrote: Thu Jul 06, 2017 6:04 pm
Thanks for the log, but there are no errors in it that I can see, so you'll have to be more specific about your issues please.
There are really no errors? I'm new to this, but it keeps telling me that 2 errors or cancellations have been found and it's been stopping the video at 3:20 rather than encoding the whole 23 minutes.
rollin_eng wrote: Thu Jul 06, 2017 6:38 pm [02:20:49] sync: got 4813 frames, 34512 expected

I suspect this might be an issue, your source may have errors in it, can you re-acquire it?
I'll see if I can find a different source and I'll update this thread if it works.
Deleted User 11865

Re: MKV to MP4 Help Needed

Post by Deleted User 11865 »

rollin_eng wrote: Thu Jul 06, 2017 6:38 pm

Code: Select all

[02:20:49] sync: got 4813 frames, 34512 expected
I suspect this might be an issue, your source may have errors in it, can you re-acquire it?
Good catch :) :oops:
andrewk89
Novice
Posts: 65
Joined: Thu Jun 13, 2013 4:29 pm

Re: MKV to MP4 Help Needed

Post by andrewk89 »

Barking up the wrong tree?

I have used imagemagick to convert video to animated gif. Not sure about the supported containers and codecs, though.
https://gist.github.com/CoolOppo/f54d86abe726bb7827e6

If all you need is to change the container without transcoding, then consider Avidemux. Note that the MP4 container supports fewer codecs than MKV, so a lossless container conversion may not always be possible. ADM is also nice to use if you want to losslessly cut your video before transcoding or converting to gif.
http://avidemux.sourceforge.net/
Post Reply