encoding input 4K video to chunks of size <4GB

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
manit123
Posts: 16
Joined: Thu Oct 25, 2012 12:30 pm

encoding input 4K video to chunks of size <4GB

Post by manit123 »

I am using handbrake 1.0.7 (2017040900) 64bit on desktop with windows 7 professional 4GB RAM .

So , I have a mkv with following characteristics
(1)hevc h.265 video , a52 aka ac3 audio
(2)3840x1632 resolution
(3)eng subtitle stream
(4)duration - 3 hours

Que 1) When I open that file in handbrake Picture tab shows width and height as 1920 and 1080 respectively.Can't handbrake encode video to mp4 of 4K resolution ?

Que 2) Actually I want to save this video on a fat32 USB disk . So , max file size of output video is limited to <4GB . I understand that - it would mean multiple files forming part of whole video (like three 1 hour videos) . When I select chapters only 1 appears , seems original video doesn't have multiple chapters.I can manually run encoding thrice specifying start and end time (in seconds). Is that the only way ? How can I tell handbrake to split a video into multiple files each of duration x seconds ?


Que 3)Here is the activity log with 1920p output video resolution . Output file size was 7.65GB (approx. 8x10^9 bytes) . Original file was 4.54GB (approx. 4.87X10^9 bytes) .

Code: Select all

HandBrake 1.0.7 (2017040900) - 64bit

OS: Microsoft Windows NT 6.1.7601 Service Pack 1 - 64bit

CPU: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz

Ram: 3983 MB, 

GPU Information:

  Intel(R) HD Graphics 4000 - 9.17.10.4229

Screen: 1366x768

Temp Dir: C:\Users\manit123\AppData\Local\Temp\

Install Dir: C:\Program Files\HandBrake

Data Dir: C:\Users\manit123\AppData\Roaming\HandBrake Team\HandBrake\1.0.7.0


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





# Starting Encode ...



[20:40:48] hb_init: starting libhb thread

[20:40:48] 1 job(s) to process

[20:40:48] json job:

{

  "Audio": {

    "AudioList": [

      {

        "Bitrate": 160,

        "DRC": 0.0,

        "Encoder": 65536,

        "Gain": 0.0,

        "Mixdown": 6,

        "NormalizeMixLevel": false,

        "Samplerate": 0,

        "Track": 0,

        "DitherMethod": 0

      }

    ],

    "CopyMask": [

      1073807360,

      1073743872,

      1074003968,

      1073750016,

      1090519040,

      1074790400,

      1074266112,

      1107296256

    ],

    "FallbackEncoder": 2048

  },

  "Destination": {

    "ChapterList": [],

    "ChapterMarkers": false,

    "File": "D:\\B'day_photos\\1920p.mp4",

    "Mp4Options": {

      "IpodAtom": false,

      "Mp4Optimize": false

    },

    "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": "1080",

          "width": "1920"

        }

      },

      {

        "ID": 6,

        "Settings": {

          "mode": "2",

          "rate": "27000000/900000"

        }

      }

    ]

  },

  "PAR": {

    "Num": 216,

    "Den": 163

  },

  "Metadata": {},

  "SequenceID": 0,

  "Source": {

    "Angle": 1,

    "Range": {

      "Type": "chapter",

      "Start": 1,

      "End": 1

    },

    "Title": 1,

    "Path": "D:\\4kvideo.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": "fast",

    "Profile": "main",

    "Quality": 22.0,

    "OpenCL": false,

    "HWDecode": false,

    "QSV": {

      "Decode": false,

      "AsyncDepth": 0

    }

  }

}

[20:40:48] CPU: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz

[20:40:48]  - Intel microarchitecture Ivy Bridge

[20:40:48]  - logical processor count: 8

[20:40:48] Intel Quick Sync Video support: yes

[20:40:48]  - Intel Media SDK hardware: API 1.4 (minimum: 1.3)

[20:40:48]  - H.264 encoder: yes

[20:40:48]     - preferred implementation: hardware (any)

[20:40:48]     - capabilities (hardware):  vsinfo opt1

[20:40:48]  - H.265 encoder: no

[20:40:48] hb_scan: path=D:\4kvideo.mkv, title_index=1

udfread ERROR: ECMA 167 Volume Recognition failed

src/libbluray/disc/disc.c:274: failed opening UDF image D:\4kvideo.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

[20:40:48] 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

[20:40:48] dvd: not a dvd - trying as a stream/file instead

Input #0, matroska,webm, from 'D:\4kvideo.mkv':

  Metadata:

    title           : www.ZippyMovieZ.EU

  Duration: 03:07:17.63, start: 0.000000, bitrate: N/A

    Stream #0:0: Video: hevc (Main)

      yuv420p, tv, 3840x1630, PAR 1:1 DAR 384:163

      23.98 fps, 1k tbn (default)

    Metadata:

      title           : www.ZippyMovieZ.EU

      BPS             : 2956790

      BPS-eng         : 2956790

      DURATION        : 03:07:17.602000000

      DURATION-eng    : 03:07:17.602000000

      NUMBER_OF_FRAMES: 269433

      NUMBER_OF_FRAMES-eng: 269433

      NUMBER_OF_BYTES : 4153403755

      NUMBER_OF_BYTES-eng: 4153403755

      _STATISTICS_WRITING_APP: mkvmerge v9.3.1 ('Mask Machine') 64bit

      _STATISTICS_WRITING_APP-eng: mkvmerge v9.3.1 ('Mask Machine') 64bit

      _STATISTICS_WRITING_DATE_UTC: 2016-09-13 15:55:49

      _STATISTICS_WRITING_DATE_UTC-eng: 2016-09-13 15:55:49

      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

    Stream #0:1(tam): Audio: ac3

      48000 Hz, 5.1, fltp, 512 kb/s (default)

    Metadata:

      title           : www.ZippyMovieZ.EU

      BPS             : 512000

      BPS-eng         : 512000

      DURATION        : 03:07:17.632000000

      DURATION-eng    : 03:07:17.632000000

      NUMBER_OF_FRAMES: 351176

      NUMBER_OF_FRAMES-eng: 351176

      NUMBER_OF_BYTES : 719208448

      NUMBER_OF_BYTES-eng: 719208448

      _STATISTICS_WRITING_APP: mkvmerge v9.3.1 ('Mask Machine') 64bit

      _STATISTICS_WRITING_APP-eng: mkvmerge v9.3.1 ('Mask Machine') 64bit

      _STATISTICS_WRITING_DATE_UTC: 2016-09-13 15:55:49

      _STATISTICS_WRITING_DATE_UTC-eng: 2016-09-13 15:55:49

      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

    Stream #0:2(eng): Subtitle: srt (default)

    Metadata:

      title           : www.ZippyMovieZ.EU

      BPS             : 49

      BPS-eng         : 49

      DURATION        : 03:04:58.541000000

      DURATION-eng    : 03:04:58.541000000

      NUMBER_OF_FRAMES: 2068

      NUMBER_OF_FRAMES-eng: 2068

      NUMBER_OF_BYTES : 69261

      NUMBER_OF_BYTES-eng: 69261

      _STATISTICS_WRITING_APP: mkvmerge v9.3.1 ('Mask Machine') 64bit

      _STATISTICS_WRITING_APP-eng: mkvmerge v9.3.1 ('Mask Machine') 64bit

      _STATISTICS_WRITING_DATE_UTC: 2016-09-13 15:55:49

      _STATISTICS_WRITING_DATE_UTC-eng: 2016-09-13 15:55:49

      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

[20:40:48] scan: decoding previews for title 1

[20:40:49] scan: audio 0x1: ac3, rate=48000Hz, bitrate=512000 ????? (AC3) (5.1 ch)

[20:40:52] scan: 10 previews, 3840x1630, 23.976 fps, autocrop = 0/0/0/0, aspect 2.36:1, PAR 1:1

[20:40:52] libhb: scan thread found 1 valid title(s)

[20:40:52] Skipping subtitle scan.  No suitable subtitle tracks.

[20:40:52] starting job

[20:40:52] decomb filter thread started for segment 0

[20:40:52] decomb filter thread started for segment 1

[20:40:52] decomb filter thread started for segment 2

[20:40:52] decomb filter thread started for segment 3

[20:40:52] decomb filter thread started for segment 4

[20:40:52] decomb filter thread started for segment 5

[20:40:52] decomb filter thread started for segment 6

[20:40:52] decomb filter thread started for segment 7

[20:40:52] decomb check thread started for segment 0

[20:40:52] decomb check thread started for segment 1

[20:40:52] decomb check thread started for segment 2

[20:40:52] decomb check thread started for segment 3

[20:40:52] decomb check thread started for segment 4

[20:40:52] decomb check thread started for segment 5

[20:40:52] decomb check thread started for segment 6

[20:40:52] decomb check thread started for segment 7

[20:40:52] mask filter thread started for segment 0

[20:40:52] mask filter thread started for segment 1

[20:40:52] mask filter thread started for segment 2

[20:40:52] mask filter thread started for segment 3

[20:40:52] mask filter thread started for segment 4

[20:40:52] mask filter thread started for segment 5

[20:40:52] mask filter thread started for segment 6

[20:40:52] mask filter thread started for segment 7

[20:40:52] mask erode thread started for segment 0

[20:40:52] mask erode thread started for segment 1

[20:40:52] mask erode thread started for segment 2

[20:40:52] mask erode thread started for segment 3

[20:40:52] mask erode thread started for segment 4

[20:40:52] mask erode thread started for segment 5

[20:40:52] mask erode thread started for segment 6

[20:40:52] mask erode thread started for segment 7

[20:40:52] mask dilate thread started for segment 0

[20:40:52] mask dilate thread started for segment 1

[20:40:52] mask dilate thread started for segment 2

[20:40:52] mask dilate thread started for segment 3

[20:40:52] mask dilate thread started for segment 4

[20:40:52] mask dilate thread started for segment 5

[20:40:52] mask dilate thread started for segment 6

[20:40:52] mask dilate thread started for segment 7

[20:40:52] yadif thread started for segment 0

[20:40:52] yadif thread started for segment 1

[20:40:52] yadif thread started for segment 2

[20:40:52] yadif thread started for segment 3

[20:40:52] yadif thread started for segment 4

[20:40:52] yadif thread started for segment 6

[20:40:52] yadif thread started for segment 5

[20:40:52] yadif thread started for segment 7

[20:40:52] work: track 1, dithering not supported by codec

[20:40:52] job configuration:

[20:40:52]  * source

[20:40:52]    + D:\4kvideo.mkv

[20:40:52]    + title 1, chapter(s) 1 to 1

[20:40:52]    + container: matroska,webm

[20:40:52]  * destination

[20:40:52]    + D:\B'day_photos\1920p.mp4

[20:40:52]    + container: MPEG-4 (libavformat)

[20:40:52]  * video track

[20:40:52]    + decoder: hevc

[20:40:52]    + filters

[20:40:52]      + 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)

[20:40:52]      + Decomb (mode=39)

[20:40:52]      + Framerate Shaper (mode=2:rate=27000000/900000)

[20:40:52]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps

[20:40:52]      + Crop and Scale (width=1920:height=1080:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)

[20:40:52]        + source: 3840 * 1630, crop (0/0/0/0): 3840 * 1630, scale: 1920 * 1080

[20:40:52]    + Output geometry

[20:40:52]      + storage dimensions: 1920 x 1080

[20:40:52]      + pixel aspect ratio: 216 : 163

[20:40:52]      + display dimensions: 2544 x 1080

[20:40:52]    + encoder: H.264 (libx264)

[20:40:52]      + preset:  fast

[20:40:52]      + profile: main

[20:40:52]      + level:   4.0

[20:40:52]      + quality: 22.00 (RF)

[20:40:52]  * audio track 1

[20:40:52]    + decoder: ????? (AC3) (5.1 ch) (track 1, id 0x1)

[20:40:52]      + bitrate: 512 kbps, samplerate: 48000 Hz

[20:40:52]    + mixdown: Dolby Pro Logic II

[20:40:52]    + encoder: AAC (libavcodec)

[20:40:52]      + bitrate: 160 kbps, samplerate: 48000 Hz

[20:40:52] sync: expecting 269433 video frames

[20:40:52] encx264: min-keyint: 24, keyint: 240

[20:40:52] encx264: encoding at constant RF 22.000000

[20:40:52] encx264: unparsed options: weightp=1:level=4.0:ref=2:8x8dct=0:vbv-bufsize=25000:subme=6:vbv-maxrate=20000:rc-lookahead=30

x264 [info]: using SAR=216/163

x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX

x264 [info]: profile Main, level 4.0

[20:40:52] sync: first pts video is 0

[20:40:52] sync: Chapter 1 at frame 1 time 0

[20:40:52] sync: first pts audio 0x1 is 0

[02:08:03] reader: done. 1 scr changes

[02:08:07] work: average encoding speed for job is 13.721666 fps

[02:08:07] comb detect: heavy 67425 | light 78981 | uncombed 123027 | total 269433

[02:08:07] decomb: deinterlaced 67425 | blended 78981 | unfiltered 123027 | total 269433

[02:08:07] vfr: 269433 frames output, 0 dropped and 0 duped for CFR/PFR

[02:08:07] vfr: lost time: 0 (0 frames)

[02:08:07] vfr: gained time: 0 (0 frames) (0 not accounted for)

[02:08:07] ac3-decoder done: 351176 frames, 0 decoder errors

[02:08:07] hevc-decoder done: 269433 frames, 0 decoder errors

[02:08:07] sync: got 269433 frames, 269433 expected

[02:08:07] sync: framerate min 23.981 fps, max 23.981 fps, avg 23.976 fps

x264 [info]: frame I:5970  Avg QP:18.77  size:146940

x264 [info]: frame P:83423 Avg QP:21.80  size: 48262

x264 [info]: frame B:180040 Avg QP:23.72  size: 17128

x264 [info]: consecutive B-frames:  7.7%  7.5%  6.6% 78.3%

x264 [info]: mb I  I16..4: 37.7%  0.0% 62.3%

x264 [info]: mb P  I16..4: 21.5%  0.0% 11.6%  P16..4: 33.5% 12.3%  5.2%  0.0%  0.0%    skip:16.0%

x264 [info]: mb B  I16..4:  6.3%  0.0%  1.5%  B16..8: 28.8%  6.8%  0.5%  direct:12.4%  skip:43.6%  L0:43.6% L1:47.9% BI: 8.5%

x264 [info]: coded y,uvDC,uvAC intra: 30.6% 69.7% 31.5% inter: 10.9% 28.7% 3.5%

x264 [info]: i16 v,h,dc,p: 48% 17% 12% 23%

x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 16% 17%  6%  7%  8%  5%  6%  4%

x264 [info]: i8c dc,h,v,p: 45% 15% 30% 10%

x264 [info]: Weighted P-Frames: Y:6.8% UV:2.7%

x264 [info]: ref P L0: 75.5% 24.5%

x264 [info]: ref B L0: 86.6% 13.4%

x264 [info]: ref B L1: 96.7%  3.3%

x264 [info]: kb/s:5686.04

[02:08:07] mux: track 0, 269433 frames, 7986973406 bytes, 5685.87 kbps, fifo 1024

[02:08:07] mux: track 1, 526764 frames, 224919209 bytes, 160.12 kbps, fifo 2048

[02:08:07] libhb: work result = 0



# Encode Completed ...




From your experience , what low 'quality' parameter will give good results ?
Woodstock
Veteran User
Posts: 4621
Joined: Tue Aug 27, 2013 6:39 am

Re: encoding input 4K video to chunks of size <4GB

Post by Woodstock »

There is no automatic way to have handbrake split by file size.

Maybe a different way to look at the problem is, "Is FAT32 really the only choice?"

Formatting your target storage as either exFAT or NTFS is a viable option with most devices that would know how to deal with h.265 video. Even modern Linux implementations CAN talk to exFAT, and both Windows and MacOS consider it to be a "native format".
whistlerz
Posts: 19
Joined: Sun Apr 17, 2016 10:15 pm

Re: encoding input 4K video to chunks of size <4GB

Post by whistlerz »

manit123 wrote: Fri Aug 18, 2017 3:29 pm
Que 1) When I open that file in handbrake Picture tab shows width and height as 1920 and 1080 respectively.Can't handbrake encode video to mp4 of 4K resolution ?
You probably have a 1080p preset selected. You'll want to choose a 4K preset (or create your own, but it's useful to start from one of the existing presets), as the maximum output picture size is set on the preset. If you like the settings of an existing preset, you can select it and then add a new preset, and you'll inherit the current settings (i.e. the ones set by that selected preset), but have the option to change the maximum resolution or change it to always use the source resolution.
Woodstock
Veteran User
Posts: 4621
Joined: Tue Aug 27, 2013 6:39 am

Re: encoding input 4K video to chunks of size <4GB

Post by Woodstock »

As for your third question, the site you downloaded the movie from has already compressed it significantly, probably with more aggressive settings than you're using for handbrake. They imply that with other rips of commercial movies they're posting.

Since handbrake is trying to save quality that isn't there, it will make a larger result.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: encoding input 4K video to chunks of size <4GB

Post by BradleyS »

Your original source is already encoded HEVC/H.265 which is generally supposed to provide more efficient compression than AVC/H.264. What you're trying to do in terms of file size isn't possible without reducing quality by quite a lot more than you've asked the encoder.
manit123
Posts: 16
Joined: Thu Oct 25, 2012 12:30 pm

Re: encoding input 4K video to chunks of size <4GB

Post by manit123 »

(1)yeah , when i open that mkv file in handbrake 'fast 1080p 30' preset is selected . Didn't find any preset with name '4k' .

(2)ok . got it . no automatic way to split input file into multiple output files of short duration.

(3)i am considering 'ntfs' . windows/linux can deal with it and my android can mount it read only.
Post Reply