Powershell omits subtitles, CMD does not

Discussion of the cross-platform HandBrake command line interface (CLI)
Forum rules
Activity Log is required for support requests. See Must Read: How To Get Questions Answered on These Forums for details
Post Reply
Boombatty
Posts: 4
Joined: Sun Oct 11, 2015 1:11 am

Powershell omits subtitles, CMD does not

Post by Boombatty » Sun Oct 11, 2015 1:24 am

Hello all,
I was trying to write a PowerShell script that would allow me to convert multiple files in a directory to .MKV and .MP4 files. I got the CLI syntax directly from the Encode Log in the Handbrake GUI. When I run it through the GUI, I receive files with subtitles. If I cut and paste the line into a CMD window, I receive files with subtitles. When I try to run it via a PowerShell, the subtitles are omitted.

I am running Handbrake 0.10.2.7286 -64 bit on a Windows 7 machine.

Here is the encode log from the GUI that successfully creates subtitles:

Code: Select all

HandBrake 0.10.2.7286 - 64bit Version
OS: Microsoft Windows NT 6.1.7601 Service Pack 1 - 64bit
CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
Ram: 8172 MB, 
GPU Information:
  ATI Radeon HD 5700 Series - 9.12.0.0
Screen: 1920x1080
Temp Dir: C:\Users\Boombatty\AppData\Local\Temp\
Install Dir: C:\Program Files\Handbrake
Data Dir: C:\Users\Boombatty\AppData\Roaming\HandBrake\HandBrake\0.10.2.7286

-------------------------------------------
CLI Query:  -i "C:\DVD movies\Over the Hedge.mkv" -t 1 --angle 1 -c 1-16 -o "C:\Plex\Over The Hedge.m4v"  -f mp4  -w 720 --crop 0:2:0:0 --loose-anamorphic  --modulus 2 -e x264 -q 20 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --subtitle scan,1,2,3,4,5,6 --subtitle-forced=1 --markers="C:\Users\Boombatty\AppData\Local\Temp\Over The Hedge-1-chapters.csv" --encoder-preset=veryfast  --encoder-level="4.0"  --encoder-profile=main  --verbose=1

[21:15:56] hb_init: starting libhb thread
HandBrake 0.10.2 (2015060900) - MinGW x86_64 - https://handbrake.fr
8 CPUs detected
Opening C:\DVD movies\Over the Hedge.mkv...
[21:15:56] CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
[21:15:56]  - Intel microarchitecture Sandy Bridge
[21:15:56]  - logical processor count: 8
[21:15:57] OpenCL device #1: Advanced Micro Devices, Inc. Juniper
[21:15:57]  - OpenCL version: 1.2 AMD-APP (1084.4)
[21:15:57]  - driver version: 1084.4 (VM)
[21:15:57]  - device type:    GPU
[21:15:57]  - supported:      YES
[21:15:57] Intel Quick Sync Video support: no
[21:15:57] hb_scan: path=C:\DVD movies\Over the Hedge.mkv, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\DVD movies\Over the Hedge.mkv/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\DVD movies\Over the Hedge.mkv/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(C:\DVD movies\Over the Hedge.mkv) failed
[21:15:57] 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
[21:15:57] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'C:\DVD movies\Over the Hedge.mkv':
  Duration: 01:23:16.32, start: 0.000000, bitrate: N/A
    Chapter #0.0: start 0.000000, end 475.308167
    Metadata:
      title           : Chapter 01
    Chapter #0.1: start 475.308167, end 616.616000
    Metadata:
      title           : Chapter 02
    Chapter #0.2: start 616.616000, end 932.464867
    Metadata:
      title           : Chapter 03
    Chapter #0.3: start 932.464867, end 1136.301833
    Metadata:
      title           : Chapter 04
    Chapter #0.4: start 1136.301833, end 1440.772667
    Metadata:
      title           : Chapter 05
    Chapter #0.5: start 1440.772667, end 1665.330333
    Metadata:
      title           : Chapter 06
    Chapter #0.6: start 1665.330333, end 1904.435867
    Metadata:
      title           : Chapter 07
    Chapter #0.7: start 1904.435867, end 2058.222833
    Metadata:
      title           : Chapter 08
    Chapter #0.8: start 2058.222833, end 2417.081333
    Metadata:
      title           : Chapter 09
    Chapter #0.9: start 2417.081333, end 3048.211833
    Metadata:
      title           : Chapter 10
    Chapter #0.10: start 3048.211833, end 3470.500367
    Metadata:
      title           : Chapter 11
    Chapter #0.11: start 3470.500367, end 3790.453333
    Metadata:
      title           : Chapter 12
    Chapter #0.12: start 3790.453333, end 4146.308833
    Metadata:
      title           : Chapter 13
    Chapter #0.13: start 4146.308833, end 4438.801033
    Metadata:
      title           : Chapter 14
    Chapter #0.14: start 4438.801033, end 4531.193333
    Metadata:
      title           : Chapter 15
    Chapter #0.15: start 4531.193333, end 4996.324667
    Metadata:
      title           : Chapter 16
    Stream #0.0(eng): Video: mpeg2video (Main), yuv420p, 720x480 [PAR 8:9 DAR 4:3], 9800 kb/s, 29.97 fps, 1k tbn, 59.94 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, fltp, 448 kb/s (default)
    Metadata:
      title           : Surround 5.1
    Stream #0.2(fre): Audio: ac3, 48000 Hz, 5.1, fltp, 384 kb/s
    Metadata:
      title           : Surround 5.1
    Stream #0.3(spa): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : Stereo
    Stream #0.4(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : Stereo
    Stream #0.5(eng): Subtitle: dvdsub (default)
    Stream #0.6(fre): Subtitle: dvdsub
    Stream #0.7(spa): Subtitle: dvdsub
    Stream #0.8(eng): Subtitle: dvdsub
    Stream #0.9(fre): Subtitle: dvdsub
    Stream #0.10(spa): Subtitle: dvdsub
[21:15:57] dxva2:DxFindVideoServiceConversion failed
[21:15:57] scan: decoding previews for title 1
[21:15:57] scan: audio 0x1: ac3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
[21:15:57] scan: audio 0x2: ac3, rate=48000Hz, bitrate=384000 Francais (AC3) (5.1 ch)
[21:15:57] scan: audio 0x3: ac3, rate=48000Hz, bitrate=192000 Espanol (AC3) (2.0 ch) (Dolby Surround)
[21:15:57] scan: audio 0x4: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch)
Scanning title 1 of 1, preview 5, 50.00 %[21:15:57] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/2/0/0, aspect 4:3, PAR 8:9
[21:15:57] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: C:\DVD movies\Over the Hedge.mkv
  + duration: 01:23:16
  + size: 720x480, pixel aspect: 8/9, display aspect: 1.33, 23.976 fps
  + autocrop: 0/2/0/0
  + support opencl: yes
  + support hwd: no
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:07:55
    + 2: cells 0->0, 0 blocks, duration 00:02:21
    + 3: cells 0->0, 0 blocks, duration 00:05:16
    + 4: cells 0->0, 0 blocks, duration 00:03:24
    + 5: cells 0->0, 0 blocks, duration 00:05:04
    + 6: cells 0->0, 0 blocks, duration 00:03:45
    + 7: cells 0->0, 0 blocks, duration 00:03:59
    + 8: cells 0->0, 0 blocks, duration 00:02:34
    + 9: cells 0->0, 0 blocks, duration 00:05:59
    + 10: cells 0->0, 0 blocks, duration 00:10:31
    + 11: cells 0->0, 0 blocks, duration 00:07:02
    + 12: cells 0->0, 0 blocks, duration 00:05:20
    + 13: cells 0->0, 0 blocks, duration 00:05:56
    + 14: cells 0->0, 0 blocks, duration 00:04:52
    + 15: cells 0->0, 0 blocks, duration 00:01:32
    + 16: cells 0->0, 0 blocks, duration 00:07:45
  + audio tracks:
    + 1, English (AC3) (5.1 ch) (iso639-2: eng), 48000Hz, 448000bps
    + 2, Francais (AC3) (5.1 ch) (iso639-2: fra), 48000Hz, 384000bps
    + 3, Espanol (AC3) (2.0 ch) (Dolby Surround) (iso639-2: spa), 48000Hz, 192000bps
    + 4, English (AC3) (2.0 ch) (iso639-2: eng), 48000Hz, 192000bps
  + subtitle tracks:
    + 1, English (iso639-2: eng) (Bitmap)(VOBSUB)
    + 2, French (iso639-2: fra) (Bitmap)(VOBSUB)
    + 3, Spanish (iso639-2: spa) (Bitmap)(VOBSUB)
    + 4, English (iso639-2: eng) (Bitmap)(VOBSUB)
    + 5, French (iso639-2: fra) (Bitmap)(VOBSUB)
    + 6, Spanish (iso639-2: spa) (Bitmap)(VOBSUB)
Reading chapter markers from file C:\Users\Boombatty\AppData\Local\Temp\Over The Hedge-1-chapters.csv
Subtitle Scan Enabled - enabling subtitles if found for foreign language segments
[21:15:57] 2 job(s) to process
[21:15:57] starting job
[21:15:57] sync: expecting 119791 video frames
[21:15:57] job configuration:
[21:15:57]  * source
[21:15:57]    + C:\DVD movies\Over the Hedge.mkv
[21:15:57]    + title 1, chapter(s) 1 to 16
[21:15:57]    + container: matroska,webm
[21:15:57]  * destination
[21:15:57]    + C:\Plex\Over The Hedge.m4v
[21:15:57]    + container: MPEG-4 (libavformat)
[21:15:57]      + chapter markers
[21:15:57]  * video track
[21:15:57]    + decoder: mpeg2video
[21:15:57]      + bitrate 9800 kbps
[21:15:57]    + filters
[21:15:57]      + Framerate Shaper (0:27000000:1126125)
[21:15:57]        + frame rate: same as source (around 23.976 fps)
[21:15:57]      + Crop and Scale (720:478:0:2:0:0)
[21:15:57]        + source: 720 * 480, crop (0/2/0/0): 720 * 478, scale: 720 * 478
[21:15:57]    + loose anamorphic
[21:15:57]      + storage dimensions: 720 * 478, mod 2
[21:15:57]      + pixel aspect ratio: 8 / 9
[21:15:57]      + display dimensions: 640 * 478
[21:15:57]  * Foreign Audio Search: Passthrough, Forced Only
[21:15:57]    + subtitle, English (track 5, id 0x5) Picture [VOBSUB]
[21:15:57]    + subtitle, English (track 8, id 0x8) Picture [VOBSUB]
[21:16:39] reader: done. 1 scr changes
[21:16:39] work: average encoding speed for job is 0.000000 fps
[21:16:39] render: lost time: 0 (0 frames)
[21:16:39] render: gained time: 0 (0 frames) (0 not accounted for)
[21:16:39] mpeg2video-decoder done: 0 frames, 0 decoder errors, 0 drops
[21:16:39] Subtitle track 5 (id 0x5) 'English': 1124 hits (0 forced)
[21:16:39] Subtitle track 8 (id 0x8) 'English': 1417 hits (0 forced)
[21:16:39] No candidate detected during subtitle scan
[21:16:39] starting job
[21:16:39] sync: expecting 119791 video frames
[21:16:39] job configuration:
[21:16:39]  * source
[21:16:39]    + C:\DVD movies\Over the Hedge.mkv
[21:16:39]    + title 1, chapter(s) 1 to 16
[21:16:39]    + container: matroska,webm
[21:16:39]  * destination
[21:16:39]    + C:\Plex\Over The Hedge.m4v
[21:16:39]    + container: MPEG-4 (libavformat)
[21:16:39]      + chapter markers
[21:16:39]  * video track
[21:16:39]    + decoder: mpeg2video
[21:16:39]      + bitrate 9800 kbps
[21:16:39]    + filters
[21:16:39]      + Framerate Shaper (0:27000000:1126125)
[21:16:39]        + frame rate: same as source (around 23.976 fps)
[21:16:39]      + Crop and Scale (720:478:0:2:0:0)
[21:16:39]        + source: 720 * 480, crop (0/2/0/0): 720 * 478, scale: 720 * 478
[21:16:39]    + loose anamorphic
[21:16:39]      + storage dimensions: 720 * 478, mod 2
[21:16:39]      + pixel aspect ratio: 8 / 9
[21:16:39]      + display dimensions: 640 * 478
[21:16:39]    + encoder: H.264 (libx264)
[21:16:39]      + preset:  veryfast
[21:16:39]      + profile: main
[21:16:39]      + level:   4.0
[21:16:39]      + quality: 20.00 (RF)
[21:16:39]  * subtitle track 1, English (track 5, id 0x5) Picture [VOBSUB] -> Passthrough
[21:16:39]  * subtitle track 2, French (track 6, id 0x6) Picture [VOBSUB] -> Passthrough
[21:16:39]  * subtitle track 3, Spanish (track 7, id 0x7) Picture [VOBSUB] -> Passthrough
[21:16:39]  * subtitle track 4, English (track 8, id 0x8) Picture [VOBSUB] -> Passthrough
[21:16:39]  * subtitle track 5, French (track 9, id 0x9) Picture [VOBSUB] -> Passthrough
[21:16:39]  * subtitle track 6, Spanish (track 10, id 0xa) Picture [VOBSUB] -> Passthrough
[21:16:39]  * audio track 1
[21:16:39]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x1)
[21:16:39]      + bitrate: 448 kbps, samplerate: 48000 Hz
[21:16:39]    + mixdown: Dolby Pro Logic II
[21:16:39]    + encoder: AAC (libavcodec)
[21:16:39]      + bitrate: 160 kbps, samplerate: 48000 Hz
[21:16:39] reader: first SCR -2970 id 0x0 DTS -2970
[21:16:39] encx264: min-keyint: 24, keyint: 240
[21:16:39] encx264: encoding at constant RF 20.000000
[21:16:39] encx264: unparsed options: level=4.0:ref=1:8x8dct=0:weightp=1:subme=2:mixed-refs=0:trellis=0:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=10
x264 [info]: using SAR=8/9
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile Main, level 4.0
Here is how I ran it via powershell:

Code: Select all

    Clear-Host
    Write-Host -------------------------------------------------------------------------------
    Write-Host Handbrake Batch Encoding

#Creating a variable to store the path to all of the source files that will be encoded. 
#Change the text below (inside the quotes) to reflect where your files are located
$inputpath = "C:\DVD movies" 
Write-Host
Write-Host Input Path --> $inputpath
#getting the output path for the movies. Change this to what you would like it to say.
$outputpath = "C:\Plex"
Write-Host
Write-Host Output Path --> $outputpath

#grabbing the filenames of all of the movies in the folder you just provided.
$movies = ls $inputpath

 #handbrake exe file  
 $handbrake="C:\Program Files\handbrake\handbrakecli.exe"  



#The actual logic of the script.
#starting to loop through each movie in your list of movies
foreach($movie in $movies){
 
 #getting the name of the movie, without the file type added to the end.
 $name = $movie.basename
 Write-host Movie Name --> $name
 
 #getting the path for the chapters. Change this to what you would like it to say.
$chapterpath = "C:\Users\Boombatty\AppData\Local\Temp" + "\" + $name + "-1-chapters.csv"
Write-Host Chapter Path --> $chapterpath 
 #checking to see if the current movie has already been converted, and is sitting in the output folder.
 #this allows you to run the script repeatedly, without it wasting time converting something that is already done.
 if(!(test-path -path "$outputpath\$name.mkv")){
 Write-host Ok, no file exists... creating one now...
 Write-host
  #the actual command used to start handbrake, and encode/compress a movie.
  #Adjust these settings as necessary. 
                 #These are what I use when encoding, but YMMV for your application
& $handbrake -i "$inputpath\$movie" -t 1 --angle 1 -o "$outputpath\$name.mkv" -f mkv  -w 720 --crop 0:2:0:0 --loose-anamorphic  --modulus 2 -e x264 -q 20 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --subtitle scan,1,2,3,4,5,6,7,8,9,10 --subtitle-forced=1 --markers="$chapterpath" --encoder-preset=veryfast  --encoder-level="4.0"  --encoder-profile=main  --verbose=1;
  
& $handbrake -i "$inputpath\$movie" -t 1 --angle 1 -o "$outputpath\$name.mp4" -f mp4  -w 720 --crop 0:2:0:0 --loose-anamorphic  --modulus 2 -e x264 -q 20 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --subtitle scan,1,2,3,4,5,6,7,8,9,10 --subtitle-forced=1 --markers="$chapterpath" --encoder-preset=veryfast  --encoder-level="4.0"  --encoder-profile=main  --verbose=1;



 }
else{
write-host File exists... moving on.
Write-host
}
}



Any help is appreciated. Please let me know what additional information is needed.
Respectfully,
Boombatty

Woodstock
Veteran User
Posts: 1943
Joined: Tue Aug 27, 2013 6:39 am

Re: Powershell omits subtitles, CMD does not

Post by Woodstock » Sun Oct 11, 2015 1:34 am

Do you have the logs from the command line encode?

How to get logs with the CLI: https://trac.handbrake.fr/wiki/ActivityLogCLI

Boombatty
Posts: 4
Joined: Sun Oct 11, 2015 1:11 am

Re: Powershell omits subtitles, CMD does not

Post by Boombatty » Sun Oct 11, 2015 11:12 am

Sure thing, here is the output log from the PowerShell... I don't know why the format is all messed up with the log file.

Code: Select all

handbrakecli.exe : [06:58:25] hb_init: starting libhb thread
At C:\Users\Boombatty\Desktop\bulkhandbrakeDVD.ps1:43 char:2
+ & <<<<  $handbrake -i "$inputpath\$movie" -t 1 --angle 1 -o "$outputpath\$name.mkv" -f mkv  -w 720 --crop 0:2:0:0 --l
oose-anamorphic  --modulus 2 -e x264 -q 20 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback a
c3 --subtitle scan,1,2,3,4,5,6,7,8,9,10 --subtitle-forced=1 --markers="$chapterpath" --encoder-preset=veryfast  --encod
er-level="4.0"  --encoder-profile=main  --verbose=1 2> log.txt;
    + CategoryInfo          : NotSpecified: ([06:58:25] hb_i...ng libhb thread:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
H
andBrake 0.10.2 (201506
0
9
0
0
)
 
-
 
M
i
n
G
W
 
x
8
6
_
6
4
 
-
 
h
t
t
p
s
:
/
/
h
a
n
d
b
r
a
k
e
.
f
r


8
 CPUs detected

Opening C:\DVD movies\Bambi.mkv...

[06:58:25] CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz

[06:58:25]  - Intel microarchitecture Sandy Bridge


[06:58:25]  - logical processor count: 8

[06:58:25] OpenCL device #1: Advanced Micro Devices, Inc. Juniper

[06:58:25]  - OpenCL version: 1.2 AMD-APP (1084.4)

[06:58:25]  - driver version: 1084.4 (VM)

[06:58:25]  - device type:    GPU

[06:58:25]  - supported:      YES

[06:58:25] Intel Quick Sync Video support: no

[06:58:25] hb_scan: path=C:\DVD movies\Bambi.mkv, title_index=1

l
ibbluray/bdnav/index_
parse
.c:162: 
indx_p
[Censored]()
: erro
r op
ening C:\DVD movies\Bambi.mkv/BDMV/index.bdmv

l
ibbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\DVD
 movies\Bambi.mkv/BDMV/BACKUP/index.bdmv

l
ibbluray/bluray.c:2182: 
nav
_get_title_list(C:\DVD movies\Bambi.mkv) failed

[06:58:25] bd: not a bd - trying as a stream/file instead

l
ibdvdnav: Using dvdnav version 5.0.1

libdvdread: Encrypted DVD support unavailable.


l
ibdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/V
I
D
EO_TS
.IFO fa
iled

libdvdread
:DVDOp
enFileU
DF:UDFF
indFile
 /VID
EO_TS/
VIDEO_TS.BUP failed

libdvdread: Can't open file VIDEO_TS.IFO.

libdvdnav: vm: failed to read VIDEO_TS.IFO

[06:58:26] dvd: not a dvd - trying as a stream/file instead

Input #0, matroska,webm, from 'C:\DVD movies\Bambi.mkv':


  Metadata:

    title           : Bambi

  Duration: 01:10:32.59, start: 0.000000, bitrate: N/A
    Chapter #0.0: start 0.000000, end 79.412667
    Metadata:
      title           : Chapter 01
    Chapter #0.1: start 79.412667, end 313.346367
    Metadata:
      title           : Chapter 02
    Chapter #0.2: start 313.346367, end 500.449950
    Metadata:
      title           : Chapter 03
    Chapter #0.3: start 500.449950, end 591.090500
    Metadata:
      title           : Chapter 04
    Chapter #0.4: start 591.090500, end 833.666167
    Metadata:
      title           : Chapter 05
    Chapter #0.5: start 833.666167, end 957.122833
    Metadata:
      title           : Chapter 06
    Chapter #0.6: start 957.122833, end 1190.722867
    Metadata:
      title           : Chapter 07
    Chapter #0.7: start 1190.722867, end 1465.664200
    Metadata:
      title           : Chapter 08

    Chapter #0.8: 
start 1465.664200,
 
end 1636.134500

    Metadata:

      title           : Chapter 09


    Chapter #0.9: 
start 1636.134500,
 
end 1706.371333

    Metadata:
      title           : Chapter 10

    Chapter #0.10: 
start 1706.371333,
 
end 1837.202033

    Metadata:

      title           : Chapter 11
    Chapter #0.11: 
start 1837.202033, 
end 2048.212833

    Metadata:

      title           : Chapter 12

    Chapter #0.12: start 2048.212833, 
end 2129.827700

    Metadata:

      title           : Chapter 13

    Chapter #0.13: 
start 2129.827700,
 end 2460.324533
    Metadata:

      title           : Chapter 14

    Chapter #0.14:
 start 2460.324533, 
end 2517.848667

    Metadata:
      title           : Chapter 15

    Chapter #0.15:
 
start 2517.848667,
 
end 2609.306700

    Metadata:

      title           : Chapter 16
    Chapter #0.16: 
start 2609.306700, 
end 2768.098667

    Metadata:

      title           : Chapter 17

    Chapter #0.17: 
start 2768.098667,
 end 2844.842000

    Metadata:

      title           : Chapter 18

    Chapter #0.18:
 start 2844.842000, 
end 3145.675867

    Metadata:

      title           : Chapter 19

    Chapter #0.19: 
start 3145.675867,
 end 3221.051167

    Metadata:

      title           : Chapter 20


    Chapter #0.20: 
start 3221.051167,
 
end 3330.360367

    Metadata:

      title           : Chapter 21


    Chapter #0.21:
 
start 3330.360367,
 
end 3461.157700

    Metadata:

      title           : Chapter 22


    Chapter #0.22:
 
start 3461.157700,
 
end 3796.459333

    Metadata:

      title           : Chapter 23


    Chapter #0.23:
 
start 3796.459333,
 
end 4038.200833

    Metadata:

      title           : Chapter 24


    Chapter #0.24:
 
start 4038.200833,
 
end 4232.595033

    Metadata:

      title           : Chapter 25


    Stream #0.
0
(eng
)
: Video: mpeg2video (Main), yuv420p, 720x480 [PAR 8:9 DAR 4:3], 9800 kb/
s
, 29.97 fp
s
, 1k tbn
, 59.94 tb
c


    Stream #0.
1
(eng
)
: Audio: ac3, 48000 Hz, 5.1, fltp, 448 kb/
s
 (default)


    Metadata:

      title           : Surround 5.1


    Stream #0.
2
(fre
)
: Audio: ac3, 48000 Hz, 5.1, fltp, 448 kb/
s


    Metadata:
      title           : Surround 5.1
    Stream #0.3(spa): Audio: ac3, 48000 Hz, 5.1, fltp, 448 kb/s
    Metadata:

      title           : Surround 5.1
    Stream #0.4(eng): Subtitle: dvdsub (default)

[06:58:26] dxva2:DxFindVideoServiceConversion failed


[06:58:26] scan: decoding previews for title 1


[06:58:26] scan: audio 0x1: ac3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)


[06:58:26] scan: audio 0x2: ac3, rate=48000Hz, bitrate=448000 Francais (AC3) (5.1 ch)

[06:58:26] scan: audio 0x3: ac3, rate=48000Hz, bitrate=448000 Espanol (AC3) (5.1 ch)



Scanning title 1 of 1, preview 2, 20.00 %

Scanning title 1 of 1, preview 2, 20.00 %

Scanning title 1 of 1, preview 3, 30.00 %

Scanning title 1 of 1, preview 3, 30.00 %

Scanning title 1 of 1, preview 4, 40.00 %

S
c
a
n
n
ing title 1 of 1, preview 
5
,
 50.
00 %

Scanning title 1 of 1, preview 5, 50.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 8, 80.00 %

Scanning title 1 of 1, preview 9, 90.00 %

Scanning title 1 of 1, preview 10, 100
.
0
0 %
[06:58:28] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/2/0/0, aspect 4:3, PAR 8:9


[06:58:28] libhb: scan thread found 1 valid title(s)


+
 title 1:
  + stream: C:\DVD movies\Bambi.mkv
  + duration: 01:10:32
  + size: 720x480,
 
pixel aspect: 8/9, d
i
splay aspect: 1.33, 23.976 fps
  + autocro
p
: 0/2/0/0
  + support opencl: yes
  + support hw
d
: no
  + chapters:
    + 1: cells 0->0, 0 blocks, durati
o
n 00:01:19
    + 2: cells 0->0, 0 blocks, durat
i
on 00:03:54
    + 3: cells 0->0, 0 blocks, d
u
ration 00:03:07
    + 4: cells 0->0, 0 blocks, d
u
ration 00:01:31
    + 5: cells 0->0, 0 blocks, durat
i
on 00:04:03

    + 6
: cel
ls 0-
>0, 0 blocks, duration 00:02:03
    + 7: cells 0->0, 0 blocks, duration 00:03:54
    + 8: cells 0->0, 0 blocks, duration 00:04:35
    + 9: cells 0->0, 0 blo
c
ks, duration 00:02:50

 
   + 10: cells 0->0, 0 blocks, duration 00:01:10
    +
 
11: cells 0->0
, 0 blocks, du
ration 
00:02
:11

    +
 12: cells 0-
>0, 0
 bloc
ks, d
urati
on 00:03:31

    +
 13: 
cells 0->
0, 0 
block
s, du
ratio
n 00:
01:22
    + 14: cells 0->0, 0 bl
o
cks, 
durat
ion 0
0:05:
30
 
   + 
15: cells 0-
>0, 0 
blocks, 
durat
ion 0
0:00:5
8
    
+ 16: ce
lls 0
->0, 0 b
locks
, duration 0
0:01:
31
  
  + 17
: cel
ls 0-
>0, 0 
blocks, duration 00:02:39
    + 18: cells 0->0, 0 blocks, duration 00:01:17
    + 19: cells 0->0, 0 blocks, duration 00:05:01
    + 20: cells 0->0, 0 blocks, duration 00:01:15
    + 21: cells 0->0, 0 blocks, duration 00:01:49
    + 22: cells 0->0, 0 blocks, duration 00:0
2
:11
    + 23: cells 0->0
,
 0 blocks, duration 00:05:35
    + 24: cells 0->0, 
0
 blocks, duration 00:04:02
    + 25: cells 0->0, 0 blocks, duration 00:03:14
  + audio tracks:
    + 1, English (AC3) (5.1 ch) (iso639-2: eng), 48000Hz, 448000bps
    + 2, Francais (AC3) (5.1 ch) (iso639-2: fra), 48000Hz, 448000bps
    + 3, Espanol (AC3) (5.1 ch) (iso639-2: spa), 48000Hz, 448000bps
  + subtitle tracks:
    + 1, English (iso639-2: eng) (Bitmap)(VOBSUB)

R
eading chapter markers from file C:\Users\Boombatty\AppData\Local\Temp\Bambi-1-chapters.csv

Subtitle Scan Enabled - enabling subtitles if found for foreign language segments

[06:58:29] 2 job(s) to process

[06:58:29] starting job

[06:58:29] sync: expecting 101480 video frames


[06:58:29] job configuration:

[06:58:29]  * source
[06:58:29]    + C:\DVD movies\Bambi.mkv

[06:58:29]    + title 1, chapter(s) 1 to 25

[06:58:29]    + container: matroska,webm

[06:58:29]  * destination

[06:58:29]    + C:\Plex\Bambi.mkv

[06:58:29]    + container: Matroska (libavformat)

[06:58:29]      + chapter markers

[06:58:29]  * video track

[06:58:29]    + decoder: mpeg2video

[06:58:29]      + bitrate 9800 kbps

[06:58:29]    + filters

[06:58:29]      + Framerate Shaper (0:27000000:1126125)

[06:58:29]        + frame rate: same as source (around 23.976 fps)

[06:58:29]      + Crop and Scale (720:478:0:2:0:0)
[06:58:29]        + source: 720 * 480, crop (0/2/0/0): 720 * 478, scale: 720 * 478
[06:58:29]    + loose anamorphic
[06:58:29]      + storage dimensions: 720 * 478, mod 2

[06:58:29]      + pixel aspect ratio: 8 / 9

[06:58:29]      + display dimensions: 640 * 478

[06:58:29]  * Foreign Audio Search: Passthrough, Forced Only

[06:58:29]    + subtitle, English (track 4, id 0x4) Picture [VOBSUB]


[07:00:00] reader: done. 1 scr changes

[07:00:00] work: average encoding speed for job is 0.000000 fps
[07:00:00] render: lost time: 0 (0 frames)

[07:00:00] render: gained time: 0 (0 frames) (0 not accounted for)

[07:00:00] mpeg2video-decoder done: 0 frames, 0 decoder errors, 0 drops

[07:00:00] Subtitle track 4 (id 0x4) 'English': 568 hits (0 forced)

[07:00:00] No candidate detected during subtitle scan

[07:00:00] starting job

[07:00:00] sync: expecting 101480 video frames


[07:00:00] job configuration:

[07:00:00]  * source


[07:00:00]    + C:\DVD movies\Bambi.mkv

[07:00:00]    + title 1, chapter(s) 1 to 25

[07:00:00]    + container: matroska,webm


[07:00:00]  * destination

[07:00:00]    + C:\Plex\Bambi.mkv

[07:00:00]    + container: Matroska (libavformat)

[07:00:00]      + chapter markers

[07:00:00]  * video track

[07:00:00]    + decoder: mpeg2video

[07:00:00]      + bitrate 9800 kbps

[07:00:00]    + filters

[07:00:00]      + Framerate Shaper (0:27000000:1126125)

[07:00:00]        + frame rate: same as source (around 23.976 fps)


[07:00:00]      + Crop and Scale (720:478:0:2:0:0)

[07:00:00]        + source: 720 * 480, crop (0/2/0/0): 720 * 478, scale: 720 * 478


[07:00:00]    + loose anamorphic

[07:00:00]      + storage dimensions: 720 * 478, mod 2

[07:00:00]      + pixel aspect ratio: 8 / 9

[07:00:00]      + display dimensions: 640 * 478

[07:00:00]    + encoder: H.264 (libx264)


[07:00:00]      + preset:  veryfast

[07:00:00]      + profile: main

[07:00:00]      + level:   4.0


[07:00:00]      + quality: 20.00 (RF)

[07:00:00]  * audio track 1

[07:00:00]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x1)

[07:00:00]      + bitrate: 448 kbps, samplerate: 48000 Hz

[07:00:00]    + mixdown: Dolby Pro Logic II

[07:00:00]    + encoder: AAC (libavcodec)

[07:00:00]      + bitrate: 160 kbps, samplerate: 48000 Hz

[07:00:00] reader: first SCR -2970 id 0x0 DTS -2970

[07:00:00] encx264: min-keyint: 24, keyint: 240

[07:00:00] encx264: encoding at constant RF 20.000000
[07:00:00] encx264: unparsed options: level=4.0:ref=1:8x8dct=0:weightp=1:subme=2:mixed-refs=0:trellis=0:vbv-bufsize=250
00:vbv-maxrate=20000:rc-lookahead=10
x264 [info]: using SAR=8/9

x
264 [info]: 
u
sing cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX

x
264 [info]: profile Main, level 4
.0

[07:00:04] mpeg2video: "Chapter 2" (2) at frame 1912 time 7150140

[07:00:15] mpeg2video: "Chapter 3" (3) at frame 7523 time 28211670


[07:00:23] mpeg2video: "Chapter 4" (4) at frame 12007 time 45043470

[07:00:28] mpeg2video: "Chapter 5" (5) at frame 14180 time 53201160

[07:00:39] mpeg2video: "Chapter 6" (6) at frame 19998 time 75040470

[07:00:45] mpeg2video: "Chapter 7" (7) at frame 22956 time 86144040

[07:01:00] mpeg2video: "Chapter 8" (8) at frame 28557 time 107168040


[07:01:13] mpeg2video: "Chapter 9" (9) at frame 35151 time 131920290


[07:01:22] mpeg2video: "Chapter 10" (10) at frame 39236 time 147255120


[07:01:25] mpeg2video: "Chapter 11" (11) at frame 40922 time 153583920


[07:01:31] mpeg2video: "Chapter 12" (12) at frame 44059 time 165358620


[07:01:41] mpeg2video: "Chapter 13" (13) at frame 49116 time 184342140


[07:01:45] mpeg2video: "Chapter 14" (14) at frame 51073 time 191687490


[07:02:02] mpeg2video: "Chapter 15" (15) at frame 58997 time 221432220


[07:02:04] mpeg2video: "Chapter 16" (16) at frame 60376 time 226609380


[07:02:10] mpeg2video: "Chapter 17" (17) at frame 62569 time 234840600


[07:02:17] mpeg2video: "Chapter 18" (18) at frame 66376 time 249131880


[07:02:20] mpeg2video: "Chapter 19" (19) at frame 68216 time 256038750


[07:02:33] mpeg2video: "Chapter 20" (20) at frame 75429 time 283113810


[07:02:37] mpeg2video: "Chapter 21" (21) at frame 77238 time 289905120


[07:02:42] mpeg2video: "Chapter 22" (22) at frame 79859 time 299742930


[07:02:49] mpeg2video: "Chapter 23" (23) at frame 82993 time 311507190


[07:03:04] mpeg2video: "Chapter 24" (24) at frame 91034 time 341691840


[07:03:17] mpeg2video: "Chapter 25" (25) at frame 96828 time 363441060


[07:03:25] reader: done. 1 scr changes


[07:03:25] work: average encoding speed for job is 495.333405 fps

[07:03:25] sync: got 101481 frames, 101480 expected

[07:03:25] render: lost time: 0 (0 frames)


[07:03:25] render: gained time: 0 (0 frames) (0 not accounted for)


[07:03:25] mpeg2video-decoder done: 101481 frames, 0 decoder errors, 0 drops


x
264 [info]: 
frame I:
1246
  Avg QP
:
17.17
  s
ize:
 42074
x
264
 [info]: 
f
rame P:40835 Avg QP:20.10  size:  8248

x
264 [info]: frame B:5
9
400 Avg QP:21.92  si
ze:
  1311


x264 
[info]: 
c
onsecutive B-frames: 15
.9% 14
.2% 12
.0% 57
.9%

x264 [info]: 
mb I  I16..4: 24.4%  0.0% 75.6%

x
264 [info]: 
mb P  I16.
.4:  9.8
%  0.0
%  3.
1%  P1
6..4: 
34.4% 
12.6%  8.4% 
 0.0%
  0.0%    skip:3
1.7%

x
264 [info]: 
mb B  I16
..4:  0.6%  0
.0%  
0.1%  B16..8: 10
.1%  3.4%  0.7%  direct: 6.2%  skip:78.8%
 
 L0:36.3% L1:5
1.4% 
BI:12.3%

x2
64 [in
fo]: 
coded y,uvDC,uvAC 
i
ntra: 
56.2%
 70.
2% 34
.4% in
ter: 1
1.7% 
16.7% 1.
7%
x
264 [info]: 
i
16 v,h,dc,p: 27% 30% 31% 12%
x264 [info]: 
i
4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 19% 23%  7%
 
 7%  6%  7%  6%  7%
x264 [info]: 
i
8c dc,h,v,p: 52% 
24% 18%
  7%

x264 [
info]: 
W
eighted P-Frames: Y:8.6% UV:3.0%
x264 [info]: 
kb/s:
882.8
6

[07:03:25] ac3-decoder done: 0 frames, 0 decoder errors, 0 drops


[07:03:25] mux: track 0, 101481 frames, 467063766 bytes, 882.79 kbps, fifo 8192

[07:03:25] mux: track 1, 198399 frames, 83726556 bytes, 158.25 kbps, fifo 16384

[07:03:25] libhb: work result = 0


Encode done!

HandBrake has exited.

And here is the output log for the CLI straight from the Command prompt:

Code: Select all

[07:04:16] hb_init: starting libhb thread
HandBrake 0.10.2 (2015060900) - MinGW x86_64 - https://handbrake.fr
8 CPUs detected
Opening C:\DVD Movies\Bambi.mkv...
[07:04:16] CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
[07:04:16]  - Intel microarchitecture Sandy Bridge
[07:04:16]  - logical processor count: 8
[07:04:16] OpenCL device #1: Advanced Micro Devices, Inc. Juniper
[07:04:16]  - OpenCL version: 1.2 AMD-APP (1084.4)
[07:04:16]  - driver version: 1084.4 (VM)
[07:04:16]  - device type:    GPU
[07:04:16]  - supported:      YES
[07:04:16] Intel Quick Sync Video support: no
[07:04:16] hb_scan: path=C:\DVD Movies\Bambi.mkv, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\DVD Movies\Bambi.mkv/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\DVD Movies\Bambi.mkv/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(C:\DVD Movies\Bambi.mkv) failed
[07:04:16] 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
[07:04:16] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'C:\DVD Movies\Bambi.mkv':
  Metadata:
    title           : Bambi
  Duration: 01:10:32.59, start: 0.000000, bitrate: N/A
    Chapter #0.0: start 0.000000, end 79.412667
    Metadata:
      title           : Chapter 01
    Chapter #0.1: start 79.412667, end 313.346367
    Metadata:
      title           : Chapter 02
    Chapter #0.2: start 313.346367, end 500.449950
    Metadata:
      title           : Chapter 03
    Chapter #0.3: start 500.449950, end 591.090500
    Metadata:
      title           : Chapter 04
    Chapter #0.4: start 591.090500, end 833.666167
    Metadata:
      title           : Chapter 05
    Chapter #0.5: start 833.666167, end 957.122833
    Metadata:
      title           : Chapter 06
    Chapter #0.6: start 957.122833, end 1190.722867
    Metadata:
      title           : Chapter 07
    Chapter #0.7: start 1190.722867, end 1465.664200
    Metadata:
      title           : Chapter 08
    Chapter #0.8: start 1465.664200, end 1636.134500
    Metadata:
      title           : Chapter 09
    Chapter #0.9: start 1636.134500, end 1706.371333
    Metadata:
      title           : Chapter 10
    Chapter #0.10: start 1706.371333, end 1837.202033
    Metadata:
      title           : Chapter 11
    Chapter #0.11: start 1837.202033, end 2048.212833
    Metadata:
      title           : Chapter 12
    Chapter #0.12: start 2048.212833, end 2129.827700
    Metadata:
      title           : Chapter 13
    Chapter #0.13: start 2129.827700, end 2460.324533
    Metadata:
      title           : Chapter 14
    Chapter #0.14: start 2460.324533, end 2517.848667
    Metadata:
      title           : Chapter 15
    Chapter #0.15: start 2517.848667, end 2609.306700
    Metadata:
      title           : Chapter 16
    Chapter #0.16: start 2609.306700, end 2768.098667
    Metadata:
      title           : Chapter 17
    Chapter #0.17: start 2768.098667, end 2844.842000
    Metadata:
      title           : Chapter 18
    Chapter #0.18: start 2844.842000, end 3145.675867
    Metadata:
      title           : Chapter 19
    Chapter #0.19: start 3145.675867, end 3221.051167
    Metadata:
      title           : Chapter 20
    Chapter #0.20: start 3221.051167, end 3330.360367
    Metadata:
      title           : Chapter 21
    Chapter #0.21: start 3330.360367, end 3461.157700
    Metadata:
      title           : Chapter 22
    Chapter #0.22: start 3461.157700, end 3796.459333
    Metadata:
      title           : Chapter 23
    Chapter #0.23: start 3796.459333, end 4038.200833
    Metadata:
      title           : Chapter 24
    Chapter #0.24: start 4038.200833, end 4232.595033
    Metadata:
      title           : Chapter 25
    Stream #0.0(eng): Video: mpeg2video (Main), yuv420p, 720x480 [PAR 8:9 DAR 4:3], 9800 kb/s, 29.97 fps, 1k tbn, 59.94 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, fltp, 448 kb/s (default)
    Metadata:
      title           : Surround 5.1
    Stream #0.2(fre): Audio: ac3, 48000 Hz, 5.1, fltp, 448 kb/s
    Metadata:
      title           : Surround 5.1
    Stream #0.3(spa): Audio: ac3, 48000 Hz, 5.1, fltp, 448 kb/s
    Metadata:
      title           : Surround 5.1
    Stream #0.4(eng): Subtitle: dvdsub (default)
[07:04:16] dxva2:DxFindVideoServiceConversion failed
[07:04:16] scan: decoding previews for title 1
[07:04:16] scan: audio 0x1: ac3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
[07:04:16] scan: audio 0x2: ac3, rate=48000Hz, bitrate=448000 Francais (AC3) (5.1 ch)
[07:04:16] scan: audio 0x3: ac3, rate=48000Hz, bitrate=448000 Espanol (AC3) (5.1 ch)
[07:04:16] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/2/0/0, aspect 4:3, PAR 8:9
[07:04:16] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: C:\DVD Movies\Bambi.mkv
  + duration: 01:10:32
  + size: 720x480, pixel aspect: 8/9, display aspect: 1.33, 23.976 fps
  + autocrop: 0/2/0/0
  + support opencl: yes
  + support hwd: no
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:01:19
    + 2: cells 0->0, 0 blocks, duration 00:03:54
    + 3: cells 0->0, 0 blocks, duration 00:03:07
    + 4: cells 0->0, 0 blocks, duration 00:01:31
    + 5: cells 0->0, 0 blocks, duration 00:04:03
    + 6: cells 0->0, 0 blocks, duration 00:02:03
    + 7: cells 0->0, 0 blocks, duration 00:03:54
    + 8: cells 0->0, 0 blocks, duration 00:04:35
    + 9: cells 0->0, 0 blocks, duration 00:02:50
    + 10: cells 0->0, 0 blocks, duration 00:01:10
    + 11: cells 0->0, 0 blocks, duration 00:02:11
    + 12: cells 0->0, 0 blocks, duration 00:03:31
    + 13: cells 0->0, 0 blocks, duration 00:01:22
    + 14: cells 0->0, 0 blocks, duration 00:05:30
    + 15: cells 0->0, 0 blocks, duration 00:00:58
    + 16: cells 0->0, 0 blocks, duration 00:01:31
    + 17: cells 0->0, 0 blocks, duration 00:02:39
    + 18: cells 0->0, 0 blocks, duration 00:01:17
    + 19: cells 0->0, 0 blocks, duration 00:05:01
    + 20: cells 0->0, 0 blocks, duration 00:01:15
    + 21: cells 0->0, 0 blocks, duration 00:01:49
    + 22: cells 0->0, 0 blocks, duration 00:02:11
    + 23: cells 0->0, 0 blocks, duration 00:05:35
    + 24: cells 0->0, 0 blocks, duration 00:04:02
    + 25: cells 0->0, 0 blocks, duration 00:03:14
  + audio tracks:
    + 1, English (AC3) (5.1 ch) (iso639-2: eng), 48000Hz, 448000bps
    + 2, Francais (AC3) (5.1 ch) (iso639-2: fra), 48000Hz, 448000bps
    + 3, Espanol (AC3) (5.1 ch) (iso639-2: spa), 48000Hz, 448000bps
  + subtitle tracks:
    + 1, English (iso639-2: eng) (Bitmap)(VOBSUB)
Reading chapter markers from file C:\Users\Matthew\AppData\Local\Temp\Bambi-1-chapters.csv
Warning: Could not find subtitle track '2', skipped
Warning: Could not find subtitle track '3', skipped
Warning: Could not find subtitle track '4', skipped
Warning: Could not find subtitle track '5', skipped
Warning: Could not find subtitle track '6', skipped
Warning: Could not find subtitle track '7', skipped
Warning: Could not find subtitle track '8', skipped
Warning: Could not find subtitle track '9', skipped
Subtitle Scan Enabled - enabling subtitles if found for foreign language segments
[07:04:16] 2 job(s) to process
[07:04:16] starting job
[07:04:16] sync: expecting 101480 video frames
[07:04:16] job configuration:
[07:04:16]  * source
[07:04:16]    + C:\DVD Movies\Bambi.mkv
[07:04:16]    + title 1, chapter(s) 1 to 25
[07:04:16]    + container: matroska,webm
[07:04:16]  * destination
[07:04:16]    + C:\Plex\Bambi-1.mkv
[07:04:16]    + container: Matroska (libavformat)
[07:04:16]      + chapter markers
[07:04:16]  * video track
[07:04:16]    + decoder: mpeg2video
[07:04:16]      + bitrate 9800 kbps
[07:04:16]    + filters
[07:04:16]      + Framerate Shaper (0:27000000:1126125)
[07:04:16]        + frame rate: same as source (around 23.976 fps)
[07:04:16]      + Crop and Scale (720:478:0:2:0:0)
[07:04:16]        + source: 720 * 480, crop (0/2/0/0): 720 * 478, scale: 720 * 478
[07:04:16]    + loose anamorphic
[07:04:16]      + storage dimensions: 720 * 478, mod 2
[07:04:16]      + pixel aspect ratio: 8 / 9
[07:04:16]      + display dimensions: 640 * 478
[07:04:16]  * Foreign Audio Search: Passthrough, Forced Only
[07:04:16]    + subtitle, English (track 4, id 0x4) Picture [VOBSUB]
[07:04:19] reader: done. 1 scr changes
[07:04:19] work: average encoding speed for job is 0.000000 fps
[07:04:19] render: lost time: 0 (0 frames)
[07:04:19] render: gained time: 0 (0 frames) (0 not accounted for)
[07:04:19] mpeg2video-decoder done: 0 frames, 0 decoder errors, 0 drops
[07:04:19] Subtitle track 4 (id 0x4) 'English': 568 hits (0 forced)
[07:04:19] No candidate detected during subtitle scan
[07:04:19] starting job
[07:04:19] sync: expecting 101480 video frames
[07:04:19] job configuration:
[07:04:19]  * source
[07:04:19]    + C:\DVD Movies\Bambi.mkv
[07:04:19]    + title 1, chapter(s) 1 to 25
[07:04:19]    + container: matroska,webm
[07:04:19]  * destination
[07:04:19]    + C:\Plex\Bambi-1.mkv
[07:04:19]    + container: Matroska (libavformat)
[07:04:19]      + chapter markers
[07:04:19]  * video track
[07:04:19]    + decoder: mpeg2video
[07:04:19]      + bitrate 9800 kbps
[07:04:19]    + filters
[07:04:19]      + Framerate Shaper (0:27000000:1126125)
[07:04:19]        + frame rate: same as source (around 23.976 fps)
[07:04:19]      + Crop and Scale (720:478:0:2:0:0)
[07:04:19]        + source: 720 * 480, crop (0/2/0/0): 720 * 478, scale: 720 * 478
[07:04:19]    + loose anamorphic
[07:04:19]      + storage dimensions: 720 * 478, mod 2
[07:04:19]      + pixel aspect ratio: 8 / 9
[07:04:19]      + display dimensions: 640 * 478
[07:04:19]    + encoder: H.264 (libx264)
[07:04:19]      + preset:  veryfast
[07:04:19]      + profile: main
[07:04:19]      + level:   4.0
[07:04:19]      + quality: 20.00 (RF)
[07:04:19]  * subtitle track 1, English (track 4, id 0x4) Picture [VOBSUB] -> Passthrough
[07:04:19]  * audio track 1
[07:04:19]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x1)
[07:04:19]      + bitrate: 448 kbps, samplerate: 48000 Hz
[07:04:19]    + mixdown: Dolby Pro Logic II
[07:04:19]    + encoder: AAC (libavcodec)
[07:04:19]      + bitrate: 160 kbps, samplerate: 48000 Hz
[07:04:19] reader: first SCR -2970 id 0x0 DTS -2970
[07:04:19] encx264: min-keyint: 24, keyint: 240
[07:04:19] encx264: encoding at constant RF 20.000000
[07:04:19] encx264: unparsed options: level=4.0:ref=1:8x8dct=0:weightp=1:subme=2:mixed-refs=0:trellis=0:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=10
x264 [info]: using SAR=8/9
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile Main, level 4.0
[07:04:22] mpeg2video: "Chapter 2" (2) at frame 1912 time 7150140
[07:04:33] mpeg2video: "Chapter 3" (3) at frame 7523 time 28211670
[07:04:42] mpeg2video: "Chapter 4" (4) at frame 12007 time 45043470
[07:04:46] mpeg2video: "Chapter 5" (5) at frame 14180 time 53201160
[07:04:58] mpeg2video: "Chapter 6" (6) at frame 19998 time 75040470
[07:05:04] mpeg2video: "Chapter 7" (7) at frame 22956 time 86144040
[07:05:20] mpeg2video: "Chapter 8" (8) at frame 28557 time 107168040
[07:05:33] mpeg2video: "Chapter 9" (9) at frame 35151 time 131920290
[07:05:43] mpeg2video: "Chapter 10" (10) at frame 39236 time 147255120
[07:05:46] mpeg2video: "Chapter 11" (11) at frame 40922 time 153583920
[07:05:52] mpeg2video: "Chapter 12" (12) at frame 44059 time 165358620
[07:06:03] mpeg2video: "Chapter 13" (13) at frame 49116 time 184342140
[07:06:07] mpeg2video: "Chapter 14" (14) at frame 51073 time 191687490
[07:06:25] mpeg2video: "Chapter 15" (15) at frame 58997 time 221432220
[07:06:28] mpeg2video: "Chapter 16" (16) at frame 60376 time 226609380
[07:06:34] mpeg2video: "Chapter 17" (17) at frame 62569 time 234840600
[07:06:42] mpeg2video: "Chapter 18" (18) at frame 66376 time 249131880
[07:06:45] mpeg2video: "Chapter 19" (19) at frame 68216 time 256038750
[07:06:59] mpeg2video: "Chapter 20" (20) at frame 75429 time 283113810
[07:07:04] mpeg2video: "Chapter 21" (21) at frame 77238 time 289905120
[07:07:10] mpeg2video: "Chapter 22" (22) at frame 79859 time 299742930
[07:07:17] mpeg2video: "Chapter 23" (23) at frame 82993 time 311507190
[07:07:33] mpeg2video: "Chapter 24" (24) at frame 91034 time 341691840
[07:07:46] mpeg2video: "Chapter 25" (25) at frame 96828 time 363441060
[07:07:55] reader: done. 1 scr changes
[07:07:55] work: average encoding speed for job is 469.622101 fps
[07:07:55] sync: got 101481 frames, 101480 expected
[07:07:55] render: lost time: 0 (0 frames)
[07:07:55] render: gained time: 0 (0 frames) (0 not accounted for)
[07:07:55] mpeg2video-decoder done: 101481 frames, 0 decoder errors, 0 drops
x264 [info]: frame I:1246  Avg QP:17.17  size: 42074
x264 [info]: frame P:40835 Avg QP:20.10  size:  8248
x264 [info]: frame B:59400 Avg QP:21.92  size:  1311
x264 [info]: consecutive B-frames: 15.9% 14.2% 12.0% 57.9%
x264 [info]: mb I  I16..4: 24.4%  0.0% 75.6%
x264 [info]: mb P  I16..4:  9.8%  0.0%  3.1%  P16..4: 34.4% 12.6%  8.4%  0.0%  0.0%    skip:31.7%
x264 [info]: mb B  I16..4:  0.6%  0.0%  0.1%  B16..8: 10.1%  3.4%  0.7%  direct: 6.2%  skip:78.8%  L0:36.3% L1:51.4% BI:12.3%
x264 [info]: coded y,uvDC,uvAC intra: 56.2% 70.2% 34.4% inter: 11.7% 16.7% 1.7%
x264 [info]: i16 v,h,dc,p: 27% 30% 31% 12%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 19% 23%  7%  7%  6%  7%  6%  7%
x264 [info]: i8c dc,h,v,p: 52% 24% 18%  7%
x264 [info]: Weighted P-Frames: Y:8.6% UV:3.0%
x264 [info]: kb/s:882.86
[07:07:55] ac3-decoder done: 0 frames, 0 decoder errors, 0 drops
[07:07:55] mux: track 0, 101481 frames, 467063766 bytes, 882.79 kbps, fifo 8192
[07:07:55] mux: track 1, 198399 frames, 83726556 bytes, 158.25 kbps, fifo 16384
[07:07:55] mux: track 2, 568 frames, 1248704 bytes, 2.36 kbps, fifo 32
[07:07:55] libhb: work result = 0

Encode done!
HandBrake has exited.
So, at a quick glance, the CLI includes the subtitle line at 07:04:19, but the powershell does not.

Boombatty
Posts: 4
Joined: Sun Oct 11, 2015 1:11 am

Re: Powershell omits subtitles, CMD does not

Post by Boombatty » Sun Oct 11, 2015 8:06 pm

Ok, so I took another look, and there are more things that PowerShell seems to be missing, including the chapter files.

Here is the CLI log from the Handbrake GUI:

Code: Select all

HandBrake 0.10.2.7286 - 64bit Version
OS: Microsoft Windows NT 6.1.7601 Service Pack 1 - 64bit
CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
Ram: 8172 MB, 
GPU Information:
  ATI Radeon HD 5700 Series - 9.12.0.0
Screen: 1920x1080
Temp Dir: C:\Users\Boombatty\AppData\Local\Temp\
Install Dir: C:\Program Files\Handbrake
Data Dir: C:\Users\Boombatty\AppData\Roaming\HandBrake\HandBrake\0.10.2.7286

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

CLI Query:  -i "C:\DVD movies\The Penguins of Madagascar - Gone in a Flash.mkv" -t 1 --angle 1 -c 1 -o "C:\Plex\The Penguins Of Madagascar - Gone In A Flash-1.mkv"  -f mkv  -w 720 --crop 0:2:0:0 --loose-anamorphic  --modulus 2 -e x264 -q 20 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --subtitle scan,1,2,3 --subtitle-forced=1 --markers="C:\Users\Boombatty\AppData\Local\Temp\The Penguins Of Madagascar - Gone In A Flash-1-1-chapters.csv" --encoder-preset=veryfast  --encoder-level="4.0"  --encoder-profile=main  --verbose=1

[12:34:33] hb_init: starting libhb thread
HandBrake 0.10.2 (2015060900) - MinGW x86_64 - https://handbrake.fr
8 CPUs detected
Opening C:\DVD movies\The Penguins of Madagascar - Gone in a Flash.mkv...
[12:34:33] CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
[12:34:33]  - Intel microarchitecture Sandy Bridge
[12:34:33]  - logical processor count: 8
[12:34:33] OpenCL device #1: Advanced Micro Devices, Inc. Juniper
[12:34:33]  - OpenCL version: 1.2 AMD-APP (1084.4)
[12:34:33]  - driver version: 1084.4 (VM)
[12:34:33]  - device type:    GPU
[12:34:33]  - supported:      YES
[12:34:33] Intel Quick Sync Video support: no
[12:34:33] hb_scan: path=C:\DVD movies\The Penguins of Madagascar - Gone in a Flash.mkv, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\DVD movies\The Penguins of Madagascar - Gone in a Flash.mkv/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\DVD movies\The Penguins of Madagascar - Gone in a Flash.mkv/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(C:\DVD movies\The Penguins of Madagascar - Gone in a Flash.mkv) failed
[12:34:33] 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
[12:34:33] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'C:\DVD movies\The Penguins of Madagascar - Gone in a Flash.mkv':
  Duration: 00:12:06.92, start: 0.000000, bitrate: N/A
    Stream #0.0(eng): Video: mpeg2video (Main), yuv420p, 720x480 [PAR 32:27 DAR 16:9], 9800 kb/s, PAR 186:157 DAR 279:157, 29.97 fps, 1k tbn, 59.94 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, fltp, 448 kb/s (default)
    Metadata:
      title           : Surround 5.1
    Stream #0.2(eng): Subtitle: dvdsub (default)
    Stream #0.3(fre): Subtitle: dvdsub
    Stream #0.4(spa): Subtitle: dvdsub
[12:34:33] dxva2:DxFindVideoServiceConversion failed
[12:34:33] scan: decoding previews for title 1
[12:34:33] scan: audio 0x1: ac3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
[12:34:33] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/2/0/0, aspect 16:9, PAR 32:27
[12:34:33] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: C:\DVD movies\The Penguins of Madagascar - Gone in a Flash.mkv
  + duration: 00:12:06
  + size: 720x480, pixel aspect: 32/27, display aspect: 1.78, 23.976 fps
  + autocrop: 0/2/0/0
  + support opencl: yes
  + support hwd: no
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:12:06
  + audio tracks:
    + 1, English (AC3) (5.1 ch) (iso639-2: eng), 48000Hz, 448000bps
  + subtitle tracks:
    + 1, English (iso639-2: eng) (Bitmap)(VOBSUB)
    + 2, French (iso639-2: fra) (Bitmap)(VOBSUB)
    + 3, Spanish (iso639-2: spa) (Bitmap)(VOBSUB)
Reading chapter markers from file C:\Users\Boombatty\AppData\Local\Temp\The Penguins Of Madagascar - Gone In A Flash-1-1-chapters.csv
Subtitle Scan Enabled - enabling subtitles if found for foreign language segments
[12:34:33] 2 job(s) to process
[12:34:33] starting job
[12:34:33] sync: expecting 17428 video frames
[12:34:33] work: only 1 chapter, disabling chapter markers
[12:34:33] job configuration:
[12:34:33]  * source
[12:34:33]    + C:\DVD movies\The Penguins of Madagascar - Gone in a Flash.mkv
[12:34:33]    + title 1, chapter(s) 1 to 1
[12:34:33]    + container: matroska,webm
[12:34:33]  * destination
[12:34:33]    + C:\Plex\The Penguins Of Madagascar - Gone In A Flash-1.mkv
[12:34:33]    + container: Matroska (libavformat)
[12:34:33]  * video track
[12:34:33]    + decoder: mpeg2video
[12:34:33]      + bitrate 9800 kbps
[12:34:33]    + filters
[12:34:33]      + Framerate Shaper (0:27000000:1126125)
[12:34:33]        + frame rate: same as source (around 23.976 fps)
[12:34:33]      + Crop and Scale (720:478:0:2:0:0)
[12:34:33]        + source: 720 * 480, crop (0/2/0/0): 720 * 478, scale: 720 * 478
[12:34:33]    + loose anamorphic
[12:34:33]      + storage dimensions: 720 * 478, mod 2
[12:34:33]      + pixel aspect ratio: 32 / 27
[12:34:33]      + display dimensions: 853 * 478
[12:34:33]  * Foreign Audio Search: Passthrough, Forced Only
[12:34:33]    + subtitle, English (track 2, id 0x2) Picture [VOBSUB]
[12:34:34] reader: done. 1 scr changes
[12:34:34] work: average encoding speed for job is 0.000000 fps
[12:34:34] render: lost time: 0 (0 frames)
[12:34:34] render: gained time: 0 (0 frames) (0 not accounted for)
[12:34:34] mpeg2video-decoder done: 0 frames, 0 decoder errors, 0 drops
[12:34:34] Subtitle track 2 (id 0x2) 'English': 145 hits (0 forced)
[12:34:34] No candidate detected during subtitle scan
[12:34:34] starting job
[12:34:34] sync: expecting 17428 video frames
[12:34:34] work: only 1 chapter, disabling chapter markers
[12:34:34] job configuration:
[12:34:34]  * source
[12:34:34]    + C:\DVD movies\The Penguins of Madagascar - Gone in a Flash.mkv
[12:34:34]    + title 1, chapter(s) 1 to 1
[12:34:34]    + container: matroska,webm
[12:34:34]  * destination
[12:34:34]    + C:\Plex\The Penguins Of Madagascar - Gone In A Flash-1.mkv
[12:34:34]    + container: Matroska (libavformat)
[12:34:34]  * video track
[12:34:34]    + decoder: mpeg2video
[12:34:34]      + bitrate 9800 kbps
[12:34:34]    + filters
[12:34:34]      + Framerate Shaper (0:27000000:1126125)
[12:34:34]        + frame rate: same as source (around 23.976 fps)
[12:34:34]      + Crop and Scale (720:478:0:2:0:0)
[12:34:34]        + source: 720 * 480, crop (0/2/0/0): 720 * 478, scale: 720 * 478
[12:34:34]    + loose anamorphic
[12:34:34]      + storage dimensions: 720 * 478, mod 2
[12:34:34]      + pixel aspect ratio: 32 / 27
[12:34:34]      + display dimensions: 853 * 478
[12:34:34]    + encoder: H.264 (libx264)
[12:34:34]      + preset:  veryfast
[12:34:34]      + profile: main
[12:34:34]      + level:   4.0
[12:34:34]      + quality: 20.00 (RF)
[12:34:34]  * subtitle track 1, English (track 2, id 0x2) Picture [VOBSUB] -> Passthrough
[12:34:34]  * subtitle track 2, French (track 3, id 0x3) Picture [VOBSUB] -> Passthrough
[12:34:34]  * subtitle track 3, Spanish (track 4, id 0x4) Picture [VOBSUB] -> Passthrough
[12:34:34]  * audio track 1
[12:34:34]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x1)
[12:34:34]      + bitrate: 448 kbps, samplerate: 48000 Hz
[12:34:34]    + mixdown: Dolby Pro Logic II
[12:34:34]    + encoder: AAC (libavcodec)
[12:34:34]      + bitrate: 160 kbps, samplerate: 48000 Hz
[12:34:34] reader: first SCR -2970 id 0x0 DTS -2970
[12:34:34] encx264: min-keyint: 24, keyint: 240
[12:34:34] encx264: encoding at constant RF 20.000000
[12:34:34] encx264: unparsed options: level=4.0:ref=1:8x8dct=0:weightp=1:subme=2:mixed-refs=0:trellis=0:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=10
x264 [info]: using SAR=32/27
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile Main, level 4.0
[12:35:03] reader: done. 1 scr changes
[12:35:03] work: average encoding speed for job is 597.362427 fps
[12:35:03] sync: got 17429 frames, 17428 expected
[12:35:03] render: lost time: 0 (0 frames)
[12:35:03] render: gained time: 0 (0 frames) (0 not accounted for)
[12:35:03] mpeg2video-decoder done: 17429 frames, 0 decoder errors, 0 drops
x264 [info]: frame I:237   Avg QP:15.17  size: 54603
x264 [info]: frame P:5644  Avg QP:19.63  size:  5765
x264 [info]: frame B:11548 Avg QP:22.80  size:   887
x264 [info]: consecutive B-frames:  8.1%  7.2% 10.2% 74.5%
x264 [info]: mb I  I16..4: 23.4%  0.0% 76.6%
x264 [info]: mb P  I16..4:  4.9%  0.0%  2.5%  P16..4: 17.5%  7.0%  5.9%  0.0%  0.0%    skip:62.1%
x264 [info]: mb B  I16..4:  0.2%  0.0%  0.1%  B16..8:  4.9%  2.5%  0.7%  direct: 2.2%  skip:89.5%  L0:33.8% L1:43.6% BI:22.7%
x264 [info]: coded y,uvDC,uvAC intra: 56.4% 60.3% 35.0% inter: 5.7% 6.0% 1.1%
x264 [info]: i16 v,h,dc,p: 48% 26% 14% 12%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 21% 14%  6%  7%  7%  7%  6%  6%
x264 [info]: i8c dc,h,v,p: 50% 23% 21%  6%
x264 [info]: Weighted P-Frames: Y:2.4% UV:1.6%
x264 [info]: kb/s:613.26
[12:35:03] ac3-decoder done: 0 frames, 0 decoder errors, 0 drops
[12:35:03] mux: track 0, 17429 frames, 55718666 bytes, 613.19 kbps, fifo 4096
[12:35:03] mux: track 1, 34073 frames, 14531970 bytes, 159.93 kbps, fifo 8192
[12:35:03] mux: track 2, 145 frames, 381024 bytes, 4.19 kbps, fifo 64
[12:35:03] mux: track 3, 151 frames, 389876 bytes, 4.29 kbps, fifo 64
[12:35:03] mux: track 4, 147 frames, 386600 bytes, 4.25 kbps, fifo 64
[12:35:03] libhb: work result = 0
Encode done!
HandBrake has exited.

Here is my latest version of my PowerShell script:

Code: Select all

#Script created by ocnlogan, as part of Logans Learnings #1: Scripting handbrake in windows.
    Clear-Host
    Write-Host -------------------------------------------------------------------------------
    Write-Host Handbrake Batch Encoding

#Creating a variable to store the path to all of the source files that will be encoded. 
#Change the text below (inside the quotes) to reflect where your files are located
$inputpath = "C:\DVD movies" 
Write-Host
Write-Host Input Path --> $inputpath
#getting the output path for the movies. Change this to what you would like it to say.
$outputpath = "C:\Plex"
Write-Host
Write-Host Output Path --> $outputpath

#grabbing the filenames of all of the movies in the folder you just provided.
$movies = ls $inputpath

 #handbrake exe file  
 $handbrake="C:\Program Files\handbrake\handbrakecli.exe"  

 #execution script



###[string] $handbrake = $handbrakeclishortpath + ” -i `”$file`” -o `”$justName.mp4`”-f mp4 -4 -w 720 –loose-anamorphic -e x264 -q 20 -r 29.97 –pfr -a 1,1 -E faac,copy:ac3 -6 dpl2,auto -R Auto,Auto -B 160,auto -D 0.0,0.0 -m –verbose=1″


#The actual logic of the script.
#starting to loop through each movie in your list of movies
foreach($movie in $movies){

 #getting the name of the movie, without the file type added to the end.
 $name = $movie.basename
 Write-host Movie Name --> $name
 

 
 
 
 #getting the path for the chapters. Change this to what you would like it to say.
$chapterpath = "C:\Users\Matthew\AppData\Local\Temp" + "\" + $name + "-1-chapters.csv"
Write-Host Chapter Path --> $chapterpath 
 
[string]  $handbrakescript = " -w 720 --crop 0:2:0:0 --loose-anamorphic  --modulus 2 -e x264 -q 20 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --subtitle scan,1,2,3,4,5 --subtitle-forced=1 --markers=" + $chapterpath + " --encoder-preset=veryfast --encoder-level=""4.0""  --encoder-profile=main  --verbose=1 2> handbrake.txt;"
 
[string]  $handbraketotal = """$handbrake""" + " -i " + """" + $inputpath + "\" + $movie + """" +" -t 1 --angle 1 -o " + """" + $outputpath +"\" + $name  +  ".mkv""" + " -f mkv  -w 720 --crop 0:2:0:0 --loose-anamorphic  --modulus 2 -e x264 -q 20 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --subtitle scan,1,2,3,4,5,6,7,8,9,10 --subtitle-forced=1 --markers=" + """$chapterpath""" + " --encoder-preset=veryfast  --encoder-level=""4.0""  --encoder-profile=main  --verbose=1 2> handbrake.txt;"

##[string]  $handbraketotal = $handbrake + " -i " + $inputpath + "\" + $movie + " -t 1 --angle 1 -o " +$outputpath +"\" + $name + ".mkv" -f mkv  -w 720 --crop 0:2:0:0 --loose-anamorphic  --modulus 2 -e x264 -q 20 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --subtitle scan,1,2,3,4,5,6,7,8,9,10 --subtitle-forced=1 --markers="$chapterpath" --encoder-preset=veryfast  --encoder-level="4.0"  --encoder-profile=main  --verbose=1 2> handbrake.txt;
Write-host 
Write-host $handbrakescript
Write-host 
 
Write-host 
Write-host $handbraketotal
Write-host 
 
 
 
 #checking to see if the current movie has already been converted, and is sitting in the output folder.
 #this allows you to run the script repeatedly, without it wasting time converting something that is already done.
  if(!(test-path -path "$outputpath\$name.mkv")){
 Write-host Ok, no file exists... creating one now...
 Write-host
  #the actual command used to start handbrake, and encode/compress a movie.
  #Adjust these settings as necessary. 
                 #These are what I use when encoding, but YMMV for your application
##& $handbrake -i "$inputpath\$movie" -t 1 --angle 1 -o "$outputpath\$name.mkv" -f mkv  "handbrakescript"
  
& $handbrake -i "$inputpath\$movie" -t 1 --angle 1 -o "$outputpath\$name.mp4" -f mp4  -w 720 --crop 0:2:0:0 --loose-anamorphic  --modulus 2 -e x264 -q 20 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --subtitle scan,1,2,3,4,5,6,7,8,9,10 --subtitle-forced=1 --markers="$chapterpath" --encoder-preset=veryfast  --encoder-level="4.0"  --encoder-profile=main  --verbose=1 2> log.txt;

 }
else{
write-host File exists... moving on.
Write-host
}
}

and here is the log for it. Again, I have no idea why the format is so strange, my apologies. Notice how the chapter menus and subtitles are not part of the final configuration:

Code: Select all

handbrakecli.exe : [16:02:54] hb_init: starting libhb thread
At C:\Users\Matthew\Desktop\bulkhandbrakeDVD.ps1:70 char:2
+ & <<<<  $handbrake -i "$inputpath\$movie" -t 1 --angle 1 -o "$outputpath\$name.mp4" -f mp4  -w 720 --crop 0:2:0:0 --l
oose-anamorphic  --modulus 2 -e x264 -q 20 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback a
c3 --subtitle scan,1,2,3,4,5,6,7,8,9,10 --subtitle-forced=1 --markers="$chapterpath" --encoder-preset=veryfast  --encod
er-level="4.0"  --encoder-profile=main  --verbose=1 2> log.txt;
    + CategoryInfo          : NotSpecified: ([16:02:54] hb_i...ng libhb thread:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
HandBrake 0.10.2 (2015060900) - MinGW x86_64 - https://handbrake.fr
8 CPUs
 detected

Opening C:\DVD movies\The Peng
uins of
 Madag
ascar
 - Go
ne in a F
lash.
mkv..
.

[16:02:54] CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz

[16:02:54]  - Intel microarchitecture Sandy Bridge

[16:02:54]  - logical processor count: 8

[16:02:54] OpenCL device #1: Advanced Micro Devices, Inc. Juniper

[16:02:54]  - OpenCL version: 1.2 AMD-APP (1084.4)

[16:02:54]  - driver version: 1084.4 (VM)

[16:02:54]  - device type:    GPU

[16:02:54]  - supported:      YES

[16:02:54] Intel Quick Sync Video support: no

[16:02:54] hb_scan: path=C:\DVD movies\The Penguins of Madagascar - Gone in a Flash.mkv, title_index=1

l
ibbluray/bdnav/index_parse.c:162: indx
_
parse()
: error
 opening C:\DVD movies\The Pengui
n
s of Madaga
scar - Gone 
in a Flash.m
kv/BDMV/inde
x.bdm
v

l
ibbluray/bdnav/index_pars
e
.c:162: 
indx_
parse(): err
or ope
ning 
C:\DVD
 movies
\Th
e Pe
nguins of 
M
adag
ascar - 
Gone
 in a Flash
.mkv/B
DMV/BA
CKUP/ind
ex.bdm
v

l
ibbluray/
bluray.c:2182: nav_get_title_list(C:\DVD movies\The Pe
n
guins of Ma
dagasc
ar - 
Gone i
n a 
Flash.mk
v) fa
iled

[16:02:54] bd: not a bd - trying as a stream/file instead

l
ibdvdnav: 
Using
 dvdnav
 vers
ion 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
[16:02:54] dvd: not a dvd - trying as a stream/file instead

Input #0, matroska,webm, from 'C:\DVD movies\The Penguins of Madagascar - Gone in a Flash.mkv':

  Duration: 
00:12:06.9
2, start: 
0.000000
, bitrate:
 
N/
A

    Stream #0.
0
(eng
)
: Video: mpeg2video (Main), yuv420p, 720x480 [PAR 32:27 DAR 16:9], 9800 kb/s
, PAR 186:157 DAR 279:157
, 29.97 fp
s
, 1k tbn
, 59.94 tb
c


    Stream #0.
1
(eng
)
: Audio: ac3, 48000 Hz, 5.1, fltp, 448 kb/
s
 (default)


    Metadata:

      title           : Surround 5.1


    Stream #0.
2
(eng
)
: Subtitle: dvdsub
 (default)


    Stream #0.
3
(fre
): Subtitle: dvdsub


    Stream #0.
4
(spa
)
: Subtitle: dvdsub


[16:02:54] dxva2:DxFindVideoServiceConversion failed


[16:02:54] scan: decoding previews for title 1


[16:02:54] scan: audio 0x1: ac3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)


[16:02:54] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/2/0/0, aspect 16:9, PAR 32:27

[16:02:54] libhb: scan thread found 1 valid title(s)


+
 title 1
:
 
 
+
 
s
t
r
e
a
m
:
 
C
:
\DVD movies\The Penguin
s of Madagascar - Gone i
n a Flash.mkv


  + du
ratio
n: 00:
12:06

  + siz
e: 72
0x480
, pixel a
spect
: 32/
27, d
ispla
y asp
ect: 
1.78,
 23.9
76 fp
s
  +
 auto
crop:
 0/2/
0/0
  
+ sup
port ope
ncl: 
yes
 
 + support h
wd: n
o
  + chapters:
 
   + 1: cell
s 0->
0, 0 b
locks
, duration 00:
12:06
  + audio tracks:
    + 1, English (AC3) (5.1 ch) (iso63
9
-2: eng), 48000Hz, 448000bps
  + subtitle tracks:
    + 1, English (is
o
639-2: eng) (Bitmap)(VOBSUB)
    + 2, French (iso639-2: f
r
a) (Bitmap)(VOBSUB)
    + 3, Spanish (iso639-2: spa) (Bitmap)(VOBSUB)

R
eading chapter markers from file C:\Users\Matthew\AppData\Local\Temp\The Penguins of Madagascar - Gone in a Flash-1-cha
pters.csv

Subtitle Scan Enabled - enabling subtitles if found for foreign language segments

[16:02:54] 2 job(s) to process


[16:02:54] starting job

[16:02:54] sync: expecting 17428 video frames

[16:02:54] work: only 1 chapter, disabling chapter markers


[16:02:54] job configuration:

[16:02:54]  * source

[16:02:54]    + C:\DVD movies\The Penguins of Madagascar - Gone in a Flash.mkv

[16:02:54]    + title 1, chapter(s) 1 to 1


[16:02:54]    + container: matroska,webm

[16:02:54]  * destination

[16:02:54]    + C:\Plex\The Penguins of Madagascar - Gone in a Flash.mp4

[16:02:54]    + container: MPEG-4 (libavformat)

[16:02:54]  * video track

[16:02:54]    + decoder: mpeg2video

[16:02:54]      + bitrate 9800 kbps

[16:02:54]    + filters

[16:02:54]      + Framerate Shaper (0:27000000:1126125)

[16:02:54]        + frame rate: same as source (around 23.976 fps)

[16:02:54]      + Crop and Scale (720:478:0:2:0:0)

[16:02:54]        + source: 720 * 480, crop (0/2/0/0): 720 * 478, scale: 720 * 478

[16:02:54]    + loose anamorphic

[16:02:54]      + storage dimensions: 720 * 478, mod 2

[16:02:54]      + pixel aspect ratio: 32 / 27

[16:02:54]      + display dimensions: 853 * 478

[16:02:54]  * Foreign Audio Search: Passthrough, Forced Only

[16:02:54]    + subtitle, English (track 2, id 0x2) Picture [VOBSUB]

[16:02:54] reader: done. 1 scr changes

[16:02:54] work: average encoding speed for job is 0.000000 fps
[16:02:54] render: lost time: 0 (0 frames)
[16:02:54] render: gained time: 0 (0 frames) (0 not accounted for)

[16:02:55] mpeg2video-decoder done: 0 frames, 0 decoder errors, 0 drops

[16:02:55] Subtitle track 2 (id 0x2) 'English': 145 hits (0 forced)

[16:02:55] No candidate detected during subtitle scan

[16:02:55] starting job

[16:02:55] sync: expecting 17428 video frames

[16:02:55] work: only 1 chapter, disabling chapter markers


[16:02:55] job configuration:

[16:02:55]  * source


[16:02:55]    + C:\DVD movies\The Penguins of Madagascar - Gone in a Flash.mkv


[16:02:55]    + title 1, chapter(s) 1 to 1


[16:02:55]    + container: matroska,webm


[16:02:55]  * destination

[16:02:55]    + C:\Plex\The Penguins of Madagascar - Gone in a Flash.mp4


[16:02:55]    + container: MPEG-4 (libavformat)

[16:02:55]  * video track

[16:02:55]    + decoder: mpeg2video

[16:02:55]      + bitrate 9800 kbps

[16:02:55]    + filters

[16:02:55]      + Framerate Shaper (0:27000000:1126125)

[16:02:55]        + frame rate: same as source (around 23.976 fps)


[16:02:55]      + Crop and Scale (720:478:0:2:0:0)

[16:02:55]        + source: 720 * 480, crop (0/2/0/0): 720 * 478, scale: 720 * 478


[16:02:55]    + loose anamorphic

[16:02:55]      + storage dimensions: 720 * 478, mod 2


[16:02:55]      + pixel aspect ratio: 32 / 27

[16:02:55]      + display dimensions: 853 * 478

[16:02:55]    + encoder: H.264 (libx264)


[16:02:55]      + preset:  veryfast

[16:02:55]      + profile: main

[16:02:55]      + level:   4.0


[16:02:55]      + quality: 20.00 (RF)

[16:02:55]  * audio track 1

[16:02:55]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x1)

[16:02:55]      + bitrate: 448 kbps, samplerate: 48000 Hz

[16:02:55]    + mixdown: Dolby Pro Logic II

[16:02:55]    + encoder: AAC (libavcodec)

[16:02:55]      + bitrate: 160 kbps, samplerate: 48000 Hz

[16:02:55] reader: first SCR -2970 id 0x0 DTS -2970

[16:02:55] encx264: min-keyint: 24, keyint: 240

[16:02:55] encx264: encoding at constant RF 20.000000

[16:02:55] encx264: unparsed options: level=4.0:ref=1:8x8dct=0:weightp=1:subme=2:mixed-refs=0:trellis=0:vbv-bufsize=250
00:vbv-maxrate=20000:rc-lookahead=10

x
264 [info]: 
u
sing SAR=32/27


x
264 [info]: usin
g cpu ca
pabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX

x
264 [info]: profile Main, level 4.0

[16:03:25] reader: done. 1 scr changes


[16:03:25] work: average encoding speed for job is 569.564453 fps

[16:03:25] sync: got 17429 frames, 17428 expected

[16:03:25] render: lost time: 0 (0 frames)


[16:03:25] render: gained time: 0 (0 frames) (0 not accounted for)


[16:03:25] mpeg2video-decoder done: 17429 frames, 0 decoder errors, 0 drops

x
264 [info]: 
frame I:23
7   Avg Q
P:15
.17  size: 54603
x264 [info]: 
fra
me P:
5644 
 Avg QP:19.63  size:  5765
x264 [info]: 
f
rame B:11548 Avg QP:22.80  size:   887
x264 [info]: 
consecutive B-
frame
s:  8.1%  7.2% 10.2% 74.5%
x264 [info]: 
mb I  I16..4: 23.4% 
 0.0%
 76.6%

x264 [
info]
: 
m
b P  I16..4:  4.9%  0.0%  2.5%  P16.
.4: 
17.5% 
 7.0% 
 5.9%  0.
0%  0
.0%  
  ski
p:62
.1%

x
264 [info]: 
m
b B  I16..4:  
0.2%  0.0
%  0.
1
%  B16..8:  
4.9%  2.5%  0.
7%  dir
ect: 2.2%  skip:
89.5%  
L0:33.8% L1:43.6% BI:22.7%
x264 [info]: coded y,uvDC,uvAC intra: 56.4% 60.3% 35.0% inter: 5.7% 6.0% 1.1%
x264 [info]: i16 v,h,dc,p: 48% 26% 14% 12%
x264 [info]: 
i
4 v,h,dc,
ddl,ddr
,vr,hd
,vl,h
u: 2
6% 21%
 14%  6
%  7%  
7%  
7%  
6%  6%

x264 
[info]: 
i
8c dc,h,v,p:
 50% 2
3% 2
1%  6%
x264 [info]: 
W
eighted P-
Fra
mes: 
Y:2.4%
 UV:
1.6%

x264 
[info]: 
k
b/s:613.26


[16:03:25] ac3-decoder done: 0 frames, 0 decoder errors, 0 drops


[16:03:25] mux: track 0, 17429 frames, 55718666 bytes, 613.19 kbps, fifo 4096

[16:03:25] mux: track 1, 34073 frames, 14531970 bytes, 159.93 kbps, fifo 8192

[16:03:25] libhb: work result = 0


Encode done!

HandBrake has exited.



User avatar
BradleyS
Moderator
Posts: 777
Joined: Thu Aug 09, 2007 12:16 pm

Re: Powershell omits subtitles, CMD does not

Post by BradleyS » Sun Oct 11, 2015 11:41 pm

Both from the logs and your experience, it would seem that PowerShell and the cli are not compatible. We have neither tested nor do we support PowerShell. Sorry to hear it's not working; perhaps you should ask them? There's a pretty clear error message near the beginning of that last log.

Boombatty
Posts: 4
Joined: Sun Oct 11, 2015 1:11 am

Re: Powershell omits subtitles, CMD does not

Post by Boombatty » Mon Oct 12, 2015 12:32 pm

I will look into doing so. Ultimately, I was just looking for a way to make a batch job of scripts and someone had recommended PowerShell. Anyone have some ideas for scripting languages to run on Windows?

CK13
Posts: 5
Joined: Fri Oct 16, 2015 4:17 am

Re: Powershell omits subtitles, CMD does not

Post by CK13 » Fri Oct 16, 2015 5:07 pm

So i tried your settings on my script and i got subs, even though it's disabled by default.

Here is the script:

Code: Select all

# Path to HandBrakeCLI .exe
$handbrakecli = "path\to\HandBrakeCLI.exe";
# Path to output folder
$out_dir = "path\to\output\";

# Loop through all items in a directory
# and get only those with the specified extension
foreach($file in Get-ChildItem * -include *.mkv,*.mp4,*.avi)
{
	# File name without extension
	$file_noext = [System.IO.Path]::GetFileNameWithoutExtension($file);

	# Encode the files
	& $handbrakecli -i $file -t 1 --angle 1 -o $out_dir$file_noext.mp4 -f mkv  -w 720 --crop 0:2:0:0 --loose-anamorphic  --modulus 2 -e x264 -q 20 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --subtitle scan,1,2,3,4,5,6,7,8,9,10 --subtitle-forced=1 --markers="$chapterpath" --encoder-preset=veryfast  --encoder-level="4.0"  --encoder-profile=main  --verbose=1;
	
}
File is an anime .mkv with sub in the mkv container, not burned in.

Windows 10.

Black Lotus
Posts: 1
Joined: Mon Feb 06, 2017 3:55 pm

Re: Powershell omits subtitles, CMD does not

Post by Black Lotus » Mon Feb 06, 2017 4:54 pm

Boombatty wrote:I will look into doing so. Ultimately, I was just looking for a way to make a batch job of scripts and someone had recommended PowerShell. Anyone have some ideas for scripting languages to run on Windows?
Bash for Windows, Python, Javascript, Pearl, Ruby ect.

drizzle
Posts: 9
Joined: Fri Nov 22, 2013 5:39 pm

Re: Powershell omits subtitles, CMD does not

Post by drizzle » Wed Feb 08, 2017 4:24 am

I'm a noob at Powershell. It seems more double quotes may be needed eg.
a quoted file name, inside a quoted Powershell string

Code: Select all

-i "`"file name with blanks`""

DrXenos
Bright Spark User
Posts: 185
Joined: Sat Mar 16, 2013 1:19 pm

Re: Powershell omits subtitles, CMD does not

Post by DrXenos » Wed Feb 15, 2017 10:29 pm

Boombatty wrote:
Mon Oct 12, 2015 12:32 pm
I will look into doing so. Ultimately, I was just looking for a way to make a batch job of scripts and someone had recommended PowerShell. Anyone have some ideas for scripting languages to run on Windows?
I'm sure HandBrake works just fine with PowerShell. I would just figure out the issue, than looking for another language.

I've called HandBrake from inside batch files, AutoIt, and C++, and they've all worked fine. Lately, I just use my own scripting language, specifically geared towards transcoding titles.

DrX

Post Reply