How to batch resize?

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
jayjay000
Posts: 4
Joined: Fri Dec 08, 2017 7:00 am

How to batch resize?

Post by jayjay000 »

I cant seem to batch resize. What am I doing wrong? Iv posted the activity log below. I used 5 video files as example, only one file was converted with the correct size.


I open a source folder which contains 137 1minute clips, I have a preset to resize to 1280x1024. I add all to queue but only one file will be resized. I can use the "picture" tab to change size but only one at a time. I can use the add selected which will tell me "The selected titles will be added using the 1280x1024 (my custom preset) preset, but again only one file will be resized. All the other files will convert to original video file size. Even in the queue when hovering over the files it shows the original size except the one file. The one file that does resize is the file that is selected in the "Title" box.


1.0.7 (2017040900)


Win10


Error message text or screenshot (If Applicable)

Provide a URL from any image hosting site.

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

Use any pastebin website and provide the URL it generates
- or -

Code: Select all

HandBrake 1.0.7 (2017040900) - 64bit
OS: Microsoft Windows NT 10.0.14393.0 - 64bit
CPU: AMD FX(tm)-6300 Six-Core Processor             
Ram: 16350 MB, 
GPU Information:
  NVIDIA GeForce GTX 960 - 21.21.13.7653
Screen: 1024x768
Temp Dir: C:\Users\User\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\User\AppData\Roaming\HandBrake Team\HandBrake\1.0.7.0

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


# Starting Encode ...

[07:20:51] hb_init: starting libhb thread
[07:20:51] 1 job(s) to process
[07:20:51] 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\\User\\Desktop\\New folder (4)\\Borderlands.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": "720",
          "width": "1280"
        }
      },
      {
        "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": 5,
    "Path": "C:\\Users\\User\\Desktop\\Microsoft Xbox 360\\Theme\\Borderlands.mp4"
  },
  "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
    }
  }
}
[07:20:51] CPU:
[07:20:51]  - logical processor count: 6
[07:20:51] Intel Quick Sync Video support: no
[07:20:51] hb_scan: path=C:\Users\User\Desktop\Microsoft Xbox 360\Theme\Borderlands.mp4, title_index=5
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image C:\Users\User\Desktop\Microsoft Xbox 360\Theme\Borderlands.mp4
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
[07:20:51] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
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
[07:20:51] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\User\Desktop\Microsoft Xbox 360\Theme\Borderlands.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.19.100
  Duration: 00:00:31.04, start: 0.046440, bitrate: 3871 kb/s
    Stream #0:0(und): Video: h264 (High) [avc1 / 0x31637661]
      yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 3740 kb/s
      30 fps, 15360 tbn (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) [mp4a / 0x6134706D]
      44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[07:20:51] scan: decoding previews for title 5
[07:20:51] scan: audio 0x1: aac, rate=44100Hz, bitrate=128413 Unknown (AAC) (2.0 ch)
[07:20:51] scan: 10 previews, 1280x720, 30.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[07:20:51] scan: supported video decoders: avcodec qsv
[07:20:51] libhb: scan thread found 1 valid title(s)
[07:20:51] Skipping subtitle scan.  No suitable subtitle tracks.
[07:20:51] starting job
[07:20:51] decomb filter thread started for segment 0
[07:20:51] decomb filter thread started for segment 2
[07:20:51] decomb filter thread started for segment 1
[07:20:51] decomb filter thread started for segment 3
[07:20:51] decomb check thread started for segment 0
[07:20:51] decomb filter thread started for segment 5
[07:20:51] decomb check thread started for segment 1
[07:20:51] decomb filter thread started for segment 4
[07:20:51] decomb check thread started for segment 2
[07:20:51] decomb check thread started for segment 3
[07:20:51] decomb check thread started for segment 4
[07:20:51] decomb check thread started for segment 5
[07:20:51] mask filter thread started for segment 0
[07:20:51] mask filter thread started for segment 1
[07:20:51] mask filter thread started for segment 2
[07:20:51] mask filter thread started for segment 3
[07:20:51] mask filter thread started for segment 4
[07:20:51] mask filter thread started for segment 5
[07:20:51] mask erode thread started for segment 0
[07:20:51] mask erode thread started for segment 1
[07:20:51] mask erode thread started for segment 2
[07:20:51] mask erode thread started for segment 3
[07:20:51] mask erode thread started for segment 4
[07:20:51] mask erode thread started for segment 5
[07:20:51] mask dilate thread started for segment 0
[07:20:51] mask dilate thread started for segment 1
[07:20:51] mask dilate thread started for segment 2
[07:20:51] mask dilate thread started for segment 3
[07:20:51] mask dilate thread started for segment 4
[07:20:51] mask dilate thread started for segment 5
[07:20:51] yadif thread started for segment 0
[07:20:51] yadif thread started for segment 1
[07:20:51] yadif thread started for segment 2
[07:20:51] yadif thread started for segment 3
[07:20:51] yadif thread started for segment 4
[07:20:51] yadif thread started for segment 5
[07:20:51] work: track 1, dithering not supported by codec
[07:20:51] work: only 1 chapter, disabling chapter markers
[07:20:51] job configuration:
[07:20:51]  * source
[07:20:51]    + C:\Users\User\Desktop\Microsoft Xbox 360\Theme\Borderlands.mp4
[07:20:51]    + title 5, chapter(s) 1 to 1
[07:20:51]    + container: mov,mp4,m4a,3gp,3g2,mj2
[07:20:51]    + data rate: 3871 kbps
[07:20:51]  * destination
[07:20:51]    + C:\Users\User\Desktop\New folder (4)\Borderlands.mp4
[07:20:51]    + container: MPEG-4 (libavformat)
[07:20:51]  * video track
[07:20:51]    + decoder: h264
[07:20:51]      + bitrate 3740 kbps
[07:20:51]    + filters
[07:20:51]      + 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)
[07:20:51]      + Decomb (mode=39)
[07:20:51]      + Framerate Shaper (mode=2:rate=27000000/900000)
[07:20:51]        + frame rate: 30.000 fps -> peak rate limited to 30.000 fps
[07:20:51]      + Crop and Scale (width=1280:height=720:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[07:20:51]        + source: 1280 * 720, crop (0/0/0/0): 1280 * 720, scale: 1280 * 720
[07:20:51]    + Output geometry
[07:20:51]      + storage dimensions: 1280 x 720
[07:20:51]      + pixel aspect ratio: 1 : 1
[07:20:51]      + display dimensions: 1280 x 720
[07:20:51]    + encoder: H.264 (libx264)
[07:20:51]      + preset:  fast
[07:20:51]      + profile: main
[07:20:51]      + level:   4.0
[07:20:51]      + quality: 22.00 (RF)
[07:20:51]  * audio track 1
[07:20:51]    + decoder: Unknown (AAC) (2.0 ch) (track 1, id 0x1)
[07:20:51]      + bitrate: 128 kbps, samplerate: 44100 Hz
[07:20:51]    + mixdown: Stereo
[07:20:51]    + encoder: AAC (libavcodec)
[07:20:51]      + bitrate: 160 kbps, samplerate: 44100 Hz
[07:20:51] sync: expecting 931 video frames
[07:20:51] encx264: min-keyint: 30, keyint: 300
[07:20:51] encx264: encoding at constant RF 22.000000
[07:20:51] encx264: unparsed options: weightp=1:level=4.0:ref=2:rc-lookahead=30:8x8dct=0:subme=6:vbv-bufsize=25000:vbv-maxrate=20000
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX XOP FMA4 FMA3 LZCNT BMI1
x264 [info]: profile Main, level 4.0
[07:20:51] sync: first pts audio 0x1 is 0
[07:20:51] sync: first pts video is 4179
[07:20:51] sync: "Chapter 1" (1) at frame 1 time 4179
[07:21:10] reader: done. 1 scr changes
[07:21:13] work: average encoding speed for job is 46.604889 fps
[07:21:13] comb detect: heavy 12 | light 143 | uncombed 775 | total 930
[07:21:13] decomb: deinterlaced 12 | blended 143 | unfiltered 775 | total 930
[07:21:13] vfr: 930 frames output, 0 dropped and 0 duped for CFR/PFR
[07:21:13] vfr: lost time: 0 (0 frames)
[07:21:13] vfr: gained time: 0 (0 frames) (0 not accounted for)
[07:21:13] aac-decoder done: 1338 frames, 0 decoder errors
[07:21:13] h264-decoder done: 930 frames, 0 decoder errors
[07:21:13] sync: got 930 frames, 931 expected
[07:21:13] sync: framerate min 30.000 fps, max 30.000 fps, avg 30.000 fps
x264 [info]: frame I:7     Avg QP:21.91  size: 68110
x264 [info]: frame P:531   Avg QP:24.52  size: 22178
x264 [info]: frame B:392   Avg QP:26.90  size:  9281
x264 [info]: consecutive B-frames: 29.5% 39.4% 11.0% 20.2%
x264 [info]: mb I  I16..4: 12.1%  0.0% 87.9%
x264 [info]: mb P  I16..4: 12.3%  0.0% 15.2%  P16..4: 36.4% 14.6%  5.3%  0.0%  0.0%    skip:16.2%
x264 [info]: mb B  I16..4:  4.9%  0.0%  3.1%  B16..8: 34.3% 11.3%  0.9%  direct: 5.0%  skip:40.4%  L0:48.3% L1:45.6% BI: 6.0%
x264 [info]: coded y,uvDC,uvAC intra: 49.8% 43.1% 7.3% inter: 14.5% 13.9% 0.6%
x264 [info]: i16 v,h,dc,p: 37% 33% 17% 13%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 25% 18%  5%  5%  4%  5%  4%  4%
x264 [info]: i8c dc,h,v,p: 63% 18% 16%  3%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: ref P L0: 90.4%  9.6%
x264 [info]: ref B L0: 91.2%  8.8%
x264 [info]: ref B L1: 99.3%  0.7%
x264 [info]: kb/s:4094.89
[07:21:13] mux: track 0, 930 frames, 15891167 bytes, 4092.15 kbps, fifo 1024
[07:21:13] mux: track 1, 1338 frames, 627902 bytes, 161.69 kbps, fifo 2048
[07:21:13] libhb: work result = 0

# Encode Completed ...


# Encode Stopped
[code][/i]
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: How to batch resize?

Post by Woodstock »

What is the resolution of the original files?

Did you save the settings as a preset, then load that preset, before doing the batch queue? (release versions of handbrake only apply the values of a saved preset to the batch. the nightly build changes that behaviour)
jayjay000
Posts: 4
Joined: Fri Dec 08, 2017 7:00 am

Re: How to batch resize?

Post by jayjay000 »

Thanks for the reply.

The original size is 1280x720. Im using the handbrake version I downloaded under the Windows option. I didn't download any from the nightly section.

Here are the steps im using maybe you can notice something im doing wrong:

On the right panel, add preset, gave it a name, picture size custom 1280x1024, audio and sub left as default. Click add, Iv highlighted it, set it as default and iv tried restarting handbrake as well.

Open source folder, it scans and finds 97 titles.

On the right panel my 1280x1024 preset is selected (under the picture tab it still shows original resolution... source: 1280x720 par: 1/1. Output 1280x720 par: 1x1).

If I now add any file to queue, it will stay at 1280x720, I have to manually change under the picture tab, height and width and I have to do 1 file at a time.

Am I being stupid? Is there another way to load a preset (I have looked) because it seems my preset isn't changing the size even though if I use the "add selected" option it shows my preset is selcted. I can select other presets that reduce the resolution, they load fine but I cant select a preset that increases the resolution above the original.

If I manually change the size and add all. Only the one file that is selected in the "Title" box will be converted to 1280x1024. The rest will be converted to original size.

Also... When doing one at a time manually... When changing from title 1 to title 2 to title 3 and so on. It will block me from resizing any larger every time I change title. I have to change to another preset and change it back again, then resize it. My preset has "anamorphic" set to none and keep "aspect ratio" unchecked so its not that.

I hope I make sense, I always worry that I dont.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: How to batch resize?

Post by Woodstock »

In the release version, saving the preset is ALMOST where you need to be - after you save it, you need to load it, even if it is the default. It's a quirk that the nightly builds fixed a number of months ago.

However, if the source is 1280x720, the GUI does not normally allow you to expand that to 1280x1024... Upscaling is supposed to be blocked in the GUI. Upscaling IS allowed in the command line version, and you also have access to a "pad" filter to put black bars in for padding the image. It would be interesting to see the encode log for one of the files that it allowed you to upscale the height.

(personally, I find it far easier to use the command line for batches, for a variety of reasons)
WhatZit
Experienced
Posts: 77
Joined: Sat Feb 13, 2016 2:45 am

Re: How to batch resize?

Post by WhatZit »

jayjay000 wrote: Sat Dec 09, 2017 2:15 amAm I being stupid?
Nope.

The HandBrake GUI deliberately prevents you from doing anything that the HandBrake team doesn't think you should do, which includes arbitrary restrictions on output dimensions.

For 137 identically-formatted files (I presume), I suggest you give the GUI the flick, and examine the CLI option within a batch file, which will be something like this:

Code: Select all

If [%1]==[] Goto Usage
If Not Exist "Done" MKDir "Done"

for %%F in (%1) do (
  HandBrakeCLI --verbose --width 1280 --height 1024 --crop 0:0:0:0 --non-anamorphic --no-comb-detect --no-decomb --no-deinterlace --no-detelecine --no-hqdn3d --no-nlmeans --no-lapsharp --no-unsharp --no-deblock --no-grayscale --encoder x264 --encoder-preset fast --encoder-tune film --quality 22.0 --cfr --audio-lang-list eng --first-audio --aencoder copy:aac --no-markers --format av_mp4 --input "%%F" --output ".\Done\%%~nF.mp4"
)

Goto END

:Usage
Echo USAGE: %0 FileSpec (e.g. %0 Frog.s01*.*, or %0 *.mp4)
Echo.
Echo Converts the FileSpec Into x264+AAC Passthrough, Placed In .\Done\
Echo.

:END
Use HandBrakeCLI --help for the options you need to customise/refine that example.
WhatZit
Experienced
Posts: 77
Joined: Sat Feb 13, 2016 2:45 am

Re: How to batch resize?

Post by WhatZit »

Woodstock wrote: Sat Dec 09, 2017 4:30 am It would be interesting to see the encode log for one of the files that it allowed you to upscale the height.
The encode log doesn't timeline execution logic.

There was a highly-popular "feature" in the Release where you could impose the dimensions defined within your custom preset rather than slavishly obeying the source dimensions, if you knew what to do.

This was patched out in the Nightly, but it can be patched back in if you compile your own builds.
jayjay000
Posts: 4
Joined: Fri Dec 08, 2017 7:00 am

Re: How to batch resize?

Post by jayjay000 »

I couldnt get the batch file to work. Im assuming I need to change filespec and change handbrakecli to handbrakecli path. To be honest im being lazy. Iv just completed an Autohotkey Gui which can be controlled with an xbox 360 remote and a virtual keyboard. Using handbrakecli it rips a dvd straight into my kodi library. Im quite proud of myself, I am a noob, but I have burnt myself out. I dont know much batch and Im not good enough with AHK loop files yet. I will look into it at some point, I have to many files that need converting to do it 1 by 1.

I was looking for an easier way to convert so I downloaded [Removed Dubious Product Reference]. But again that wont allow me the dimensions I want, it actually crashes if I put custom dimensions. So just out of curiosity do either you know why the restriction with dimensions?

Anyway heres a log file just in case you wanted to have a look.

Code: Select all

HandBrake 1.0.7 (2017040900) - 64bit
OS: Microsoft Windows NT 10.0.14393.0 - 64bit
CPU: AMD FX(tm)-6300 Six-Core Processor             
Ram: 16350 MB, 
GPU Information:
  NVIDIA GeForce GTX 960 - 21.21.13.7653
Screen: 1024x768
Temp Dir: C:\Users\User\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\User\AppData\Roaming\HandBrake Team\HandBrake\1.0.7.0

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


# Starting Encode ...

[09:25:50] hb_init: starting libhb thread
[09:25:50] 1 job(s) to process
[09:25:50] 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\\User\\Desktop\\New folder (4)\\Assassins Creed Iv Black Flag.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": "1024",
          "width": "1280"
        }
      },
      {
        "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\\User\\Desktop\\Microsoft Xbox 360\\Assassins Creed IV Black Flag.mp4"
  },
  "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
    }
  }
}
[09:25:50] CPU:
[09:25:50]  - logical processor count: 6
[09:25:50] Intel Quick Sync Video support: no
[09:25:50] hb_scan: path=C:\Users\User\Desktop\Microsoft Xbox 360\Assassins Creed IV Black Flag.mp4, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image C:\Users\User\Desktop\Microsoft Xbox 360\Assassins Creed IV Black Flag.mp4
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
[09:25:50] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
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
[09:25:50] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\User\Desktop\Microsoft Xbox 360\Assassins Creed IV Black Flag.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf54.63.102
  Duration: 00:01:11.47, start: 0.421043, bitrate: 4047 kb/s
    Stream #0:0(und): Video: h264 (High) [avc1 / 0x31637661]
      yuv420p, 1280x720, 3914 kb/s
      29.97 fps, 30k tbn (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) [mp4a / 0x6134706D]
      44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[09:25:50] scan: decoding previews for title 1
[09:25:51] scan: audio 0x1: aac, rate=44100Hz, bitrate=128291 Unknown (AAC) (2.0 ch)
[09:25:51] scan: 10 previews, 1280x720, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[09:25:51] scan: supported video decoders: avcodec qsv
[09:25:51] libhb: scan thread found 1 valid title(s)
[09:25:51] Skipping subtitle scan.  No suitable subtitle tracks.
[09:25:51] starting job
[09:25:51] decomb filter thread started for segment 0
[09:25:51] decomb filter thread started for segment 1
[09:25:51] decomb filter thread started for segment 2
[09:25:51] decomb filter thread started for segment 3
[09:25:51] decomb filter thread started for segment 4
[09:25:51] decomb filter thread started for segment 5
[09:25:51] decomb check thread started for segment 0
[09:25:51] decomb check thread started for segment 1
[09:25:51] decomb check thread started for segment 2
[09:25:51] decomb check thread started for segment 3
[09:25:51] decomb check thread started for segment 4
[09:25:51] decomb check thread started for segment 5
[09:25:51] mask filter thread started for segment 0
[09:25:51] mask filter thread started for segment 1
[09:25:51] mask filter thread started for segment 2
[09:25:51] mask filter thread started for segment 3
[09:25:51] mask filter thread started for segment 4
[09:25:51] mask filter thread started for segment 5
[09:25:51] mask erode thread started for segment 0
[09:25:51] mask erode thread started for segment 1
[09:25:51] mask erode thread started for segment 2
[09:25:51] mask erode thread started for segment 3
[09:25:51] mask erode thread started for segment 4
[09:25:51] mask erode thread started for segment 5
[09:25:51] mask dilate thread started for segment 0
[09:25:51] mask dilate thread started for segment 1
[09:25:51] mask dilate thread started for segment 2
[09:25:51] mask dilate thread started for segment 3
[09:25:51] mask dilate thread started for segment 4
[09:25:51] mask dilate thread started for segment 5
[09:25:51] yadif thread started for segment 0
[09:25:51] yadif thread started for segment 1
[09:25:51] yadif thread started for segment 2
[09:25:51] yadif thread started for segment 3
[09:25:51] yadif thread started for segment 4
[09:25:51] yadif thread started for segment 5
[09:25:51] work: track 1, dithering not supported by codec
[09:25:51] work: only 1 chapter, disabling chapter markers
[09:25:51] job configuration:
[09:25:51]  * source
[09:25:51]    + C:\Users\User\Desktop\Microsoft Xbox 360\Assassins Creed IV Black Flag.mp4
[09:25:51]    + title 1, chapter(s) 1 to 1
[09:25:51]    + container: mov,mp4,m4a,3gp,3g2,mj2
[09:25:51]    + data rate: 4047 kbps
[09:25:51]  * destination
[09:25:51]    + C:\Users\User\Desktop\New folder (4)\Assassins Creed Iv Black Flag.mp4
[09:25:51]    + container: MPEG-4 (libavformat)
[09:25:51]  * video track
[09:25:51]    + decoder: h264
[09:25:51]      + bitrate 3914 kbps
[09:25:51]    + filters
[09:25:51]      + 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)
[09:25:51]      + Decomb (mode=39)
[09:25:51]      + Framerate Shaper (mode=2:rate=27000000/900000)
[09:25:51]        + frame rate: 29.970 fps -> peak rate limited to 30.000 fps
[09:25:51]      + Crop and Scale (width=1280:height=1024:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[09:25:51]        + source: 1280 * 720, crop (0/0/0/0): 1280 * 720, scale: 1280 * 1024
[09:25:51]    + Output geometry
[09:25:51]      + storage dimensions: 1280 x 1024
[09:25:51]      + pixel aspect ratio: 1 : 1
[09:25:51]      + display dimensions: 1280 x 1024
[09:25:51]    + encoder: H.264 (libx264)
[09:25:51]      + preset:  fast
[09:25:51]      + profile: main
[09:25:51]      + level:   4.0
[09:25:51]      + quality: 22.00 (RF)
[09:25:51]  * audio track 1
[09:25:51]    + decoder: Unknown (AAC) (2.0 ch) (track 1, id 0x1)
[09:25:51]      + bitrate: 128 kbps, samplerate: 44100 Hz
[09:25:51]    + mixdown: Stereo
[09:25:51]    + encoder: AAC (libavcodec)
[09:25:51]      + bitrate: 160 kbps, samplerate: 44100 Hz
[09:25:51] sync: expecting 2142 video frames
[09:25:51] encx264: min-keyint: 30, keyint: 300
[09:25:51] encx264: encoding at constant RF 22.000000
[09:25:51] encx264: unparsed options: level=4.0:ref=2:8x8dct=0:weightp=1:subme=6:vbv-bufsize=25000:rc-lookahead=30:vbv-maxrate=20000
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX XOP FMA4 FMA3 LZCNT BMI1
x264 [info]: profile Main, level 4.0
[09:25:51] sync: first pts audio 0x1 is 0
[09:25:51] sync: first pts video is 6216
[09:25:51] sync: "Chapter 1" (1) at frame 1 time 6216
[09:26:57] reader: done. 1 scr changes
[09:27:02] work: average encoding speed for job is 31.176065 fps
[09:27:02] comb detect: heavy 15 | light 154 | uncombed 1971 | total 2140
[09:27:02] decomb: deinterlaced 15 | blended 154 | unfiltered 1971 | total 2140
[09:27:02] vfr: 2140 frames output, 0 dropped and 0 duped for CFR/PFR
[09:27:02] vfr: lost time: 0 (0 frames)
[09:27:02] vfr: gained time: 0 (0 frames) (0 not accounted for)
[09:27:02] aac-decoder done: 3076 frames, 0 decoder errors
[09:27:02] h264-decoder done: 2140 frames, 0 decoder errors
[09:27:02] sync: got 2140 frames, 2142 expected
[09:27:02] sync: framerate min 29.970 fps, max 29.970 fps, avg 29.970 fps
x264 [info]: frame I:12    Avg QP:21.08  size:107239
x264 [info]: frame P:992   Avg QP:24.32  size: 39989
x264 [info]: frame B:1136  Avg QP:26.79  size: 13330
x264 [info]: consecutive B-frames: 14.6% 37.9% 17.8% 29.7%
x264 [info]: mb I  I16..4: 19.3%  0.0% 80.7%
x264 [info]: mb P  I16..4:  6.4%  0.0% 12.5%  P16..4: 36.0% 21.9% 10.8%  0.0%  0.0%    skip:12.5%
x264 [info]: mb B  I16..4:  3.5%  0.0%  2.3%  B16..8: 31.8% 13.8%  1.4%  direct: 6.9%  skip:40.4%  L0:43.1% L1:48.0% BI: 8.9%
x264 [info]: coded y,uvDC,uvAC intra: 55.4% 52.0% 8.1% inter: 19.6% 15.0% 0.4%
x264 [info]: i16 v,h,dc,p: 43% 22% 19% 16%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 17% 17%  6%  6%  7%  5%  6%  4%
x264 [info]: i8c dc,h,v,p: 60% 13% 23%  4%
x264 [info]: Weighted P-Frames: Y:1.3% UV:1.0%
x264 [info]: ref P L0: 91.4%  8.6%
x264 [info]: ref B L0: 94.2%  5.8%
x264 [info]: ref B L1: 99.4%  0.6%
x264 [info]: kb/s:6279.06
[09:27:02] mux: track 0, 2140 frames, 56097968 bytes, 6276.28 kbps, fifo 512
[09:27:02] mux: track 1, 3076 frames, 1434323 bytes, 160.47 kbps, fifo 1024
[09:27:02] libhb: work result = 0

# Encode Completed ...
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: How to batch resize?

Post by Woodstock »

The restriction on LARGER dimensions is because upscaling in handbrake is not usually better than letting the playback software do the upscaling. When dealing with a specific playback environment (a given monitor), the software tuned to that environment will give better results than an arbitrary encoder that doesn't know that the 1920x1080 monitor is actually 16:10 instead of 16:9.

And a lot of people seem to think that you can make a 640x480 video look better by upscaling it to 3840x2160, because 4K UHD is "always better". :)

That said, it apparently can be convinced to upscale, as evidenced by your encode log:

Code: Select all

[09:25:51]      + Crop and Scale (width=1280:height=1024:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[09:25:51]        + source: 1280 * 720, crop (0/0/0/0): 1280 * 720, scale: 1280 * 1024
And the handbrake encoder library will do it, if asked. It's just not supposed to get that instruction from the GUI.

The CLI, on the other hand, will do pretty much whatever you tell it to. I'd suggest downloading a copy of the 0.10.5 GUI, because it will put the equivalent command line into the encode log, so you can use it as a basis for creating a CLI batch file that works with 1.x. I keep a very old (2012) version of handbrake here because it still writes batch files. The CLI isn't that hard to learn, but it helps to have examples!
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: How to batch resize?

Post by mduell »

WhatZit wrote: Sat Dec 09, 2017 4:39 amThe HandBrake GUI deliberately prevents you from doing anything that the HandBrake team doesn't think you should do, which includes arbitrary restrictions on output dimensions.
And they're better than 99% correct.
jayjay000
Posts: 4
Joined: Fri Dec 08, 2017 7:00 am

Re: How to batch resize?

Post by jayjay000 »

Thanks for the explanation and thanks for the tips. They will be useful.

640x480 would work for me as well but as it turns out my video clips are different sizes. Majority are 1280x720. But some are 852x480 or 1248x708 lol urghhh. Handbrake and [Removed Dubious Product Reference] wont stretch or squash them to what I need using the queue option, they would have to be done manually. Padding them with the black bars wont work for me either.

The videos are being used on a front end for my emulators and games. They are allocated a small window next to images and details about the games. If the dimensions arnt more square then when scrolling through the games the video clips are different sizes, it doesn't look good.

The 137 clips was just the folder I was working on. I need to convert thousands so I'll def be looking at CLI.
Thanks again, much appreciated.
Post Reply