Help with Windows Batch Script

Discussion of the HandBrake command line interface (CLI)
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
sgibbers
Posts: 27
Joined: Fri Feb 18, 2011 4:19 am

Help with Windows Batch Script

Post by sgibbers »

I am trying to get this Batch script to work but the output fill is far different than if I used the GUI with the same preset.

Code: Select all

FOR /F "tokens=*" %%G IN ('DIR /B /S *.mkv') DO "C:\Program Files\Handbrake\HandBrakeCLI" -i "%%G" -o "E:\Handbrake Temp\%%~nG.m4v" --preset="High Profile Intel QSV"
The output size of the script video is much smaller and worse quality than if I use the same preset within the GUI. How can I get the batch script to use the same settings within the preset called "High Profile Intel QSV"?

Here is the Log file for the script.

Code: Select all

Z:\Movie>FOR /F "tokens=*" %G IN ('DIR /B /S *.mkv') DO "C:\Program Files\Handbrake\HandBrakeCLI" -i "%G" -o "E:\Handbrake Temp\%~nG.m4v" --preset="High Profile Intel QSV"

Z:\Movie>"C:\Program Files\Handbrake\HandBrakeCLI" -i "Z:\Movie\Movie.mkv" -o "E:\Handbrake Temp\Movie.m4v" --preset="High Profile Intel QSV"
[11:35:59] hb_init: starting libhb thread
HandBrake 0.10.5 (2016021100) - MinGW x86_64 - https://handbrake.fr
8 CPUs detected
Opening Z:\Movie\Movie.mkv...
[11:35:59] CPU: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
[11:35:59]  - Intel microarchitecture Sandy Bridge
[11:35:59]  - logical processor count: 8
[11:35:59] OpenCL device #1: NVIDIA Corporation GeForce GTX 970
[11:35:59]  - OpenCL version: 1.2 CUDA
[11:35:59]  - driver version: 368.39
[11:35:59]  - device type:    GPU
[11:35:59]  - supported:      no
[11:35:59] Intel Quick Sync Video support: yes
[11:35:59]  - Intel Media SDK hardware: API 1.4 (minimum: 1.3)
[11:35:59]  - H.264 encoder: yes
[11:35:59]     - preferred implementation: hardware (any)
[11:35:59]  - H.265 encoder: no
[11:35:59] hb_scan: path=Z:\Movie\Movie.mkv, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening Z:\Movie\Movie.mkv/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening Z:\Movie\Movie.mkv/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(Z:\Movie\Movie.mkv) failed
[11:35:59] 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
[11:35:59] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'Z:\Movie\Movie.mkv':
  Metadata:
    title           : World War Z
  Duration: 02:03:03.66, start: 0.000000, bitrate: 35927 kb/s
    Chapter #0.0: start 0.000000, end 305.179875
    Metadata:
      title           : Chapter 01
    Chapter #0.1: start 305.179875, end 833.999833
    Metadata:
      title           : Chapter 02
    Chapter #0.2: start 833.999833, end 1363.195167
    Metadata:
      title           : Chapter 03
    Chapter #0.3: start 1363.195167, end 1786.034250
    Metadata:
      title           : Chapter 04
    Chapter #0.4: start 1786.034250, end 2121.494375
    Metadata:
      title           : Chapter 05
    Chapter #0.5: start 2121.494375, end 2543.457583
    Metadata:
      title           : Chapter 06
    Chapter #0.6: start 2543.457583, end 3157.946458
    Metadata:
      title           : Chapter 07
    Chapter #0.7: start 3157.946458, end 3533.821958
    Metadata:
      title           : Chapter 08
    Chapter #0.8: start 3533.821958, end 4038.868167
    Metadata:
      title           : Chapter 09
    Chapter #0.9: start 4038.868167, end 4511.757250
    Metadata:
      title           : Chapter 10
    Chapter #0.10: start 4511.757250, end 5042.037000
    Metadata:
      title           : Chapter 11
    Chapter #0.11: start 5042.037000, end 5348.801792
    Metadata:
      title           : Chapter 12
    Chapter #0.12: start 5348.801792, end 5690.518167
    Metadata:
      title           : Chapter 13
    Chapter #0.13: start 5690.518167, end 6225.469250
    Metadata:
      title           : Chapter 14
    Chapter #0.14: start 6225.469250, end 6737.981250
    Metadata:
      title           : Chapter 15
    Chapter #0.15: start 6737.981250, end 6951.653042
    Metadata:
      title           : Chapter 16
    Chapter #0.16: start 6951.653042, end 7383.667958
    Metadata:
      title           : Chapter 17
    Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 fps, 1k tbn, 47.95 tbc
    Stream #0.1(eng): Audio: dca (DTS-HD MA), 48000 Hz, 5.1, fltp, 1536 kb/s (default)
    Metadata:
      title           : dts-HD
    Stream #0.2(eng): Audio: dca (DTS), 48000 Hz, 5.1, fltp, 1536 kb/s
    Metadata:
      title           : dts
    Stream #0.3(eng): Subtitle: pgssub (default)
    Stream #0.4: Attachment: mjpeg
    Metadata:
      filename        : cover.jpg
      mimetype        : image/jpeg
[11:35:59] scan: decoding previews for title 1
[11:35:59] scan: audio 0x1: dca, rate=48000Hz, bitrate=1536000 English (DTS-HD MA) (5.1 ch)
[11:35:59] scan: audio 0x2: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch)
Scanning title 1 of 1, preview 9, 90.00 %[11:36:00] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 140/140/0/0, aspect 16:9, PAR 1:1
Scanning title 1 of 1, preview 10, 100.00 %[11:36:01] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: Z:\Movie\Movie.mkv
  + duration: 02:03:03
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 140/140/0/0
  + support opencl: no
  + support hwd: yes
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:05:05
    + 2: cells 0->0, 0 blocks, duration 00:08:49
    + 3: cells 0->0, 0 blocks, duration 00:08:49
    + 4: cells 0->0, 0 blocks, duration 00:07:03
    + 5: cells 0->0, 0 blocks, duration 00:05:35
    + 6: cells 0->0, 0 blocks, duration 00:07:02
    + 7: cells 0->0, 0 blocks, duration 00:10:14
    + 8: cells 0->0, 0 blocks, duration 00:06:16
    + 9: cells 0->0, 0 blocks, duration 00:08:25
    + 10: cells 0->0, 0 blocks, duration 00:07:53
    + 11: cells 0->0, 0 blocks, duration 00:08:50
    + 12: cells 0->0, 0 blocks, duration 00:05:07
    + 13: cells 0->0, 0 blocks, duration 00:05:42
    + 14: cells 0->0, 0 blocks, duration 00:08:55
    + 15: cells 0->0, 0 blocks, duration 00:08:33
    + 16: cells 0->0, 0 blocks, duration 00:03:34
    + 17: cells 0->0, 0 blocks, duration 00:07:12
  + audio tracks:
    + 1, English (DTS-HD MA) (5.1 ch) (iso639-2: eng)
    + 2, English (DTS) (5.1 ch) (iso639-2: eng), 48000Hz, 1536000bps
  + subtitle tracks:
    + 1, English (iso639-2: eng) (Bitmap)(PGS)
+ Using preset: High Profile Intel QSV
[11:36:01] 1 job(s) to process
[11:36:01] starting job
[11:36:01] work: mixdown not specified, track 1 setting mixdown Dolby Pro Logic II
[11:36:01] work: bitrate not specified, track 1 setting bitrate 160 Kbps
[11:36:01] sync: expecting 177030 video frames
[11:36:01] job configuration:
[11:36:01]  * source
[11:36:01]    + Z:\Movie\Movie.mkv
[11:36:01]    + title 1, chapter(s) 1 to 17
[11:36:01]    + container: matroska,webm
[11:36:01]    + data rate: 35927 kbps
[11:36:01]  * destination
[11:36:01]    + E:\Handbrake Temp\Movie.m4v
[11:36:01]    + container: MPEG-4 (libavformat)
[11:36:01]  * video track
[11:36:01]    + decoder: h264
[11:36:01]    + filters
[11:36:01]      + Framerate Shaper (0:27000000:1126125)
[11:36:01]        + frame rate: same as source (around 23.976 fps)
[11:36:01]      + Crop and Scale (1920:800:140:140:0:0)
[11:36:01]        + source: 1920 * 1080, crop (140/140/0/0): 1920 * 800, scale: 1920 * 800
[11:36:01]    + dimensions: 1920 * 800, mod 0
[11:36:01]    + encoder: MPEG-4 (libavcodec)
[11:36:01]      + bitrate: 1000 kbps, pass: 0
[11:36:01]  * audio track 1
[11:36:01]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[11:36:01]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[11:36:01]    + mixdown: Dolby Pro Logic II
[11:36:01]    + encoder: AAC (libavcodec)
[11:36:01]      + bitrate: 160 kbps, samplerate: 48000 Hz
[11:36:01] reader: first SCR 0 id 0x0 DTS 0
[11:36:01] encavcodecInit: MPEG-4 ASP encoder
Here is the log for the GUI

Code: Select all

HandBrake 0.10.5.0 - 64bit Version
OS: Microsoft Windows NT 6.2.9200.0 - 64bit
CPU: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
Ram: 32665 MB, 
GPU Information:
  NVIDIA GeForce GTX 970 - 10.18.13.6839
  Intel(R) HD Graphics 3000 - 9.17.10.4229
Screen: 3840x2160
Temp Dir: C:\Users\Sean\AppData\Local\Temp\
Install Dir: C:\Program Files\Handbrake
Data Dir: C:\Users\Sean\AppData\Roaming\HandBrake Team\HandBrake\0.10.5.0

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

CLI Query:  -i "Z:\Movie\Movie.mkv" -t 1 --angle 1 -c 1-17 -o "E:\Handbrake Temp\Movie.m4v"  -f mp4  --decomb -w 1920 --crop 140:140:0:0 --loose-anamorphic  --modulus 2 -e qsv_h264 -q 20 --cfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --subtitle 1 --subtitle-burned=1 --markers="C:\Users\Sean\AppData\Local\Temp\Movie-1-chapters.csv" --encoder-preset=balanced --encoder-level="4.1"  --encoder-profile=high  --verbose=1

[01:47:58] hb_init: starting libhb thread
HandBrake 0.10.5 (2016021100) - MinGW x86_64 - https://handbrake.fr
8 CPUs detected
Opening Z:\Movie\Movie.mkv...
[01:47:58] CPU: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
[01:47:58]  - Intel microarchitecture Sandy Bridge
[01:47:58]  - logical processor count: 8
[01:47:58] OpenCL device #1: NVIDIA Corporation GeForce GTX 970
[01:47:58]  - OpenCL version: 1.2 CUDA
[01:47:58]  - driver version: 368.39
[01:47:58]  - device type:    GPU
[01:47:58]  - supported:      no
[01:47:58] Intel Quick Sync Video support: yes
[01:47:58]  - Intel Media SDK hardware: API 1.4 (minimum: 1.3)
[01:47:58]  - H.264 encoder: yes
[01:47:58]     - preferred implementation: hardware (any)
[01:47:58]  - H.265 encoder: no
[01:47:58] hb_scan: path=Z:\Movie\Movie.mkv, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening Z:\Movie\Movie.mkv/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening Z:\Movie\Movie.mkv/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(Z:\Movie\Movie.mkv) failed
[01:47:58] 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
[01:47:58] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'Z:\Movie\Movie.mkv':
  Metadata:
    title           : Movie
  Duration: 02:03:03.66, start: 0.000000, bitrate: 35927 kb/s
    Chapter #0.0: start 0.000000, end 305.179875
    Metadata:
      title           : Chapter 01
    Chapter #0.1: start 305.179875, end 833.999833
    Metadata:
      title           : Chapter 02
    Chapter #0.2: start 833.999833, end 1363.195167
    Metadata:
      title           : Chapter 03
    Chapter #0.3: start 1363.195167, end 1786.034250
    Metadata:
      title           : Chapter 04
    Chapter #0.4: start 1786.034250, end 2121.494375
    Metadata:
      title           : Chapter 05
    Chapter #0.5: start 2121.494375, end 2543.457583
    Metadata:
      title           : Chapter 06
    Chapter #0.6: start 2543.457583, end 3157.946458
    Metadata:
      title           : Chapter 07
    Chapter #0.7: start 3157.946458, end 3533.821958
    Metadata:
      title           : Chapter 08
    Chapter #0.8: start 3533.821958, end 4038.868167
    Metadata:
      title           : Chapter 09
    Chapter #0.9: start 4038.868167, end 4511.757250
    Metadata:
      title           : Chapter 10
    Chapter #0.10: start 4511.757250, end 5042.037000
    Metadata:
      title           : Chapter 11
    Chapter #0.11: start 5042.037000, end 5348.801792
    Metadata:
      title           : Chapter 12
    Chapter #0.12: start 5348.801792, end 5690.518167
    Metadata:
      title           : Chapter 13
    Chapter #0.13: start 5690.518167, end 6225.469250
    Metadata:
      title           : Chapter 14
    Chapter #0.14: start 6225.469250, end 6737.981250
    Metadata:
      title           : Chapter 15
    Chapter #0.15: start 6737.981250, end 6951.653042
    Metadata:
      title           : Chapter 16
    Chapter #0.16: start 6951.653042, end 7383.667958
    Metadata:
      title           : Chapter 17
    Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 fps, 1k tbn, 47.95 tbc
    Stream #0.1(eng): Audio: dca (DTS-HD MA), 48000 Hz, 5.1, fltp, 1536 kb/s (default)
    Metadata:
      title           : dts-HD
    Stream #0.2(eng): Audio: dca (DTS), 48000 Hz, 5.1, fltp, 1536 kb/s
    Metadata:
      title           : dts
    Stream #0.3(eng): Subtitle: pgssub (default)
    Stream #0.4: Attachment: mjpeg
    Metadata:
      filename        : cover.jpg
      mimetype        : image/jpeg
[01:47:58] scan: decoding previews for title 1
Scanning title 1 of 1, preview 1, 0.00 %[01:47:58] scan: audio 0x1: dca, rate=48000Hz, bitrate=1536000 English (DTS-HD MA) (5.1 ch)
[01:47:58] scan: audio 0x2: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch)
Scanning title 1 of 1, preview 2, 20.00 %
Scanning title 1 of 1, preview 3, 30.00 %
Scanning title 1 of 1, preview 5, 50.00 %
Scanning title 1 of 1, preview 6, 60.00 %
Scanning title 1 of 1, preview 7, 70.00 %
Scanning title 1 of 1, preview 8, 80.00 %
Scanning title 1 of 1, preview 9, 90.00 %[01:47:59] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 140/140/0/0, aspect 16:9, PAR 1:1
[01:47:59] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: Z:\Movie\Movie.mkv
  + duration: 02:03:03
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 140/140/0/0
  + support opencl: no
  + support hwd: yes
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:05:05
    + 2: cells 0->0, 0 blocks, duration 00:08:49
    + 3: cells 0->0, 0 blocks, duration 00:08:49
    + 4: cells 0->0, 0 blocks, duration 00:07:03
    + 5: cells 0->0, 0 blocks, duration 00:05:35
    + 6: cells 0->0, 0 blocks, duration 00:07:02
    + 7: cells 0->0, 0 blocks, duration 00:10:14
    + 8: cells 0->0, 0 blocks, duration 00:06:16
    + 9: cells 0->0, 0 blocks, duration 00:08:25
    + 10: cells 0->0, 0 blocks, duration 00:07:53
    + 11: cells 0->0, 0 blocks, duration 00:08:50
    + 12: cells 0->0, 0 blocks, duration 00:05:07
    + 13: cells 0->0, 0 blocks, duration 00:05:42
    + 14: cells 0->0, 0 blocks, duration 00:08:55
    + 15: cells 0->0, 0 blocks, duration 00:08:33
    + 16: cells 0->0, 0 blocks, duration 00:03:34
    + 17: cells 0->0, 0 blocks, duration 00:07:12
  + audio tracks:
    + 1, English (DTS-HD MA) (5.1 ch) (iso639-2: eng)
    + 2, English (DTS) (5.1 ch) (iso639-2: eng), 48000Hz, 1536000bps
  + subtitle tracks:
    + 1, English (iso639-2: eng) (Bitmap)(PGS)
Reading chapter markers from file C:\Users\Sean\AppData\Local\Temp\Movie-1-chapters.csv
[01:47:59] 1 job(s) to process
[01:47:59] starting job
[01:47:59] do_job: QSV: possible CopyFrame bug, using encode-only path
[01:47:59] yadif thread started for segment 7
[01:47:59] yadif thread started for segment 6
[01:47:59] yadif thread started for segment 0
[01:47:59] yadif thread started for segment 3
[01:47:59] yadif thread started for segment 1
[01:47:59] yadif thread started for segment 2
[01:47:59] decomb check thread started for segment 4
[01:47:59] decomb check thread started for segment 7
[01:47:59] decomb filter thread started for segment 1
[01:47:59] decomb filter thread started for segment 0
[01:47:59] decomb filter thread started for segment 2
[01:47:59] decomb filter thread started for segment 3
[01:47:59] decomb filter thread started for segment 4
[01:47:59] decomb filter thread started for segment 5
[01:47:59] mask dilate thread started for segment 6
[01:47:59] decomb check thread started for segment 0
[01:47:59] decomb check thread started for segment 1
[01:47:59] decomb filter thread started for segment 6
[01:47:59] decomb check thread started for segment 3
[01:47:59] decomb check thread started for segment 2
[01:47:59] yadif thread started for segment 4
[01:47:59] decomb check thread started for segment 5
[01:47:59] decomb check thread started for segment 6
[01:47:59] mask filter thread started for segment 0
[01:47:59] yadif thread started for segment 5
[01:47:59] mask filter thread started for segment 1
[01:47:59] mask filter thread started for segment 2
[01:47:59] sync: expecting 177030 video frames
[01:47:59] mask filter thread started for segment 3
[01:47:59] mask filter thread started for segment 4
[01:47:59] mask filter thread started for segment 5
[01:47:59] mask filter thread started for segment 6
[01:47:59] job configuration:
[01:47:59] mask filter thread started for segment 7
[01:47:59]  * source
[01:47:59] mask erode thread started for segment 0
[01:47:59]    + Z:\Movie\Movie.mkv
[01:47:59]    + title 1, chapter(s) 1 to 17
[01:47:59] mask erode thread started for segment 1
[01:47:59]    + container: matroska,webm
[01:47:59] mask erode thread started for segment 3
[01:47:59] mask erode thread started for segment 2
[01:47:59]    + data rate: 35927 kbps
[01:47:59] mask erode thread started for segment 4
[01:47:59]  * destination
[01:47:59] mask erode thread started for segment 5
[01:47:59]    + E:\Handbrake Temp\Movie.m4v
[01:47:59] mask erode thread started for segment 6
[01:47:59]    + container: MPEG-4 (libavformat)
[01:47:59]      + chapter markers
[01:47:59]  * video track
[01:47:59] mask erode thread started for segment 7
[01:47:59]    + decoder: h264
[01:47:59] mask dilate thread started for segment 0
[01:47:59]    + filters
[01:47:59] mask dilate thread started for segment 1
[01:47:59]      + Decomb (default settings)
[01:47:59] mask dilate thread started for segment 2
[01:47:59]      + Framerate Shaper (1:27000000:1126125)
[01:47:59]        + frame rate: 23.976 fps -> constant 23.976 fps
[01:47:59] mask dilate thread started for segment 4
[01:47:59] mask dilate thread started for segment 3
[01:47:59]      + Subtitle renderer (140:140:0:0)
[01:47:59]      + Crop and Scale (1920:800:140:140:0:0)
[01:47:59] mask dilate thread started for segment 5
[01:47:59]        + source: 1920 * 1080, crop (140/140/0/0): 1920 * 800, scale: 1920 * 800
[01:47:59] decomb filter thread started for segment 7
[01:47:59]    + loose anamorphic
[01:47:59]      + storage dimensions: 1920 * 800, mod 2
[01:47:59] mask dilate thread started for segment 7
[01:47:59]      + pixel aspect ratio: 1 / 1
[01:47:59]      + display dimensions: 1920 * 800
[01:47:59]    + encoder: H.264 (Intel Media SDK)
[01:47:59]      + preset:  balanced
[01:47:59]      + profile: high
[01:47:59]      + level:   4.1
[01:47:59]      + quality: 20.00 (QP)
[01:47:59]  * subtitle track 1, English (track 3, id 0x3) Picture [PGS] -> Render/Burn-in
[01:47:59]  * audio track 1
[01:47:59]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[01:47:59]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[01:47:59]    + mixdown: Dolby Pro Logic II
[01:47:59]    + encoder: AAC (libavcodec)
[01:47:59]      + bitrate: 160 kbps, samplerate: 48000 Hz
[01:47:59] reader: first SCR 0 id 0x0 DTS 0
[01:47:59] encqsvInit: using encode-only path
[01:47:59] encqsvInit: TargetUsage 2 AsyncDepth 4
[01:47:59] encqsvInit: GopRefDist 4 GopPicSize 32 NumRefFrame 2
[01:47:59] encqsvInit: BFrames on
[01:47:59] encqsvInit: RateControlMethod CQP with QPI 20 QPP 22 QPB 24
[01:47:59] encqsvInit: CAVLC off
[01:47:59] encqsvInit: H.264 profile High @ level 4.1
[01:48:00] qsv_enc_init: using 'hardware (2)' implementation, API: 1.4
[01:49:29] h264: "Chapter 2" (2) at frame 7325 time 27466200
[01:52:07] h264: "Chapter 3" (3) at frame 20004 time 75060000
[01:54:45] h264: "Chapter 4" (4) at frame 32695 time 122698800
[01:56:50] h264: "Chapter 5" (5) at frame 42833 time 160754310
[01:58:29] h264: "Chapter 6" (6) at frame 50875 time 190942020
[02:00:34] h264: "Chapter 7" (7) at frame 60990 time 228911220
[02:03:34] h264: "Chapter 8" (8) at frame 75725 time 284222700
[02:05:25] h264: "Chapter 9" (9) at frame 84735 time 318043980
[02:07:57] h264: "Chapter 10" (10) at frame 96847 time 363509370
[02:10:18] h264: "Chapter 11" (11) at frame 108184 time 406065690
[02:12:55] h264: "Chapter 12" (12) at frame 120896 time 453783330
[02:14:25] h264: "Chapter 13" (13) at frame 128251 time 481392180
[02:16:04] h264: "Chapter 14" (14) at frame 136447 time 512157870
[02:18:42] h264: "Chapter 15" (15) at frame 149272 time 560299770
[02:21:14] h264: "Chapter 16" (16) at frame 161560 time 606425850
[02:22:17] h264: "Chapter 17" (17) at frame 166683 time 625656240
[02:24:15] reader: done. 1 scr changes
[02:24:16] work: average encoding speed for job is 81.354790 fps
[02:24:16] sync: got 177031 frames, 177030 expected
[02:24:16] decomb: deinterlaced 206 | blended 134 | unfiltered 176690 | total 177030
[02:24:16] render: 177030 frames output, 0 dropped and 0 duped for CFR/PFR
[02:24:16] render: lost time: 0 (0 frames)
[02:24:16] render: gained time: 0 (0 frames) (0 not accounted for)
[02:24:16] h264-decoder done: 177031 frames, 0 decoder errors, 0 drops
[02:24:16] dca-decoder done: 0 frames, 0 decoder errors, 0 drops
[02:24:16] mux: track 0, 177030 frames, 2897719647 bytes, 3139.62 kbps, fifo 2048
[02:24:16] mux: track 1, 346108 frames, 147754478 bytes, 160.09 kbps, fifo 4096
[02:24:16] libhb: work result = 0
Encode done!
HandBrake has exited.
I would like to be able to make changes to the preset within the GUI and save them there than to have to change my batch script every time I need to make a change.
Rocketcandy
Posts: 5
Joined: Wed Sep 14, 2016 4:24 pm

Re: Help with Windows Batch Script

Post by Rocketcandy »

The CLI Query from the GUI gives you the actual settings that the preset uses.

So you could manually specify the settings by changing your command to use this:

Code: Select all

"C:\Program Files\Handbrake\HandBrakeCLI" -i "Z:\Movie\Movie.mkv" -t 1 --angle 1 -c 1-17 -o "E:\Handbrake Temp\Movie.m4v"  -f mp4  --decomb -w 1920 --crop 140:140:0:0 --loose-anamorphic  --modulus 2 -e qsv_h264 -q 20 --cfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --subtitle 1 --subtitle-burned=1 --markers="C:\Users\Sean\AppData\Local\Temp\Movie-1-chapters.csv" --encoder-preset=balanced --encoder-level="4.1"  --encoder-profile=high  --verbose=1
You would have to update the variables inside that command to match your needs but that should give you the same as the GUI preset.
Post Reply