Git Product home page Git Product logo

video_transcoding's People

Contributors

arikalish avatar chrisridd avatar cnrd avatar davidnielsen avatar eventualbuddha avatar jmovs avatar joshstaiger avatar lisamelton avatar samhutchins avatar timsutton avatar vitorgalvao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

video_transcoding's Issues

transcode-video: mp4track version unknown

Running ubuntu 15.10. Can confirm mp4track is installed and the correct version but transcode video is not picking this up.

/usr/local/bin/transcode-video: mp4track version unknown

user@video-transcode:~/output$ mp4track --version
mp4track - MP4v2 -r

Convert-video does not recognized ffmpeg version on windows

Kind what the title says really. Realised I had been outputting to MKV rather than MP4, so I tried to use the convert-video tool, but got the following error:

convert-video The\ Imitation\ Game\ \(2014\).mkv
...
/home/Callum/bin/convert-video: ffmpeg version unknown

Environment

  • Script Version: 0.2.6
  • Handbrake CLI version: Latest stable version 0.10.1 (2015030800)
  • OS: Win7 x64 Service Pack 1
  • Cygwin version: 2.0.1(0.287/5/3)
  • Ruby version: ruby 2.0.0p598 (2014-11-13) [x86_64-cygwin]
  • ffmpeg version N-70348-g9564375

mplayer not available

Running in OSX. I closed terminal in the middle of an encode and now get the following error:

/usr/local/bin/transcode-video: mplayer not available

mplayer was not an active process and rebooting didn't resolve the issue.

--crop detect returns "/usr/local/bin/transcode-video: mplayer version unknown"

When using the --crop detect parameter, conversion refuses to start and returns the error "/usr/local/bin/transcode-video: mplayer version unknown"

I am fully up-to-date on OS X, 'brew update/upgrade', as well as having both the old transcode-video.sh script still installed (but am using the new ruby gem), in case that helps diagnose.

Why handbrake 0.10.0?

I'm running CentOS 7, and the newest HandBrake-cli I can get out of a repo is 0.9.9. I can build a newer version, but that's... well it's painful in the environment I'm in.

Is there any reason for 0.10.0, or will 0.9.9 work in most cases? Is there a way to avoid the version check?

using --force-subtitle option doesn't seem to set the force-flag on the subtitle

I ran the following command:

transcode-video --main-audio 1 --add-audio 2 --add-audio 3="Creator's Commentary" --audio-width all=double --force-subtitle 5 --quick -o "Bourne Supremacy - quick.mkv" /pathToSource/Filme/Bourne/The\ Bourne\ Supremacy\ -\ Die\ Bourne\ Verschwörung\ -\ K09.mkv

the result transcodes finde and the subtitle 5 is included, but when I run mediainfo on the resulting mkv, it claims that only the "default" flag is set to yes but the forced flag is set to "no". I thought according --help that it is supposed to set the forced flag on the subtitle.

ProRes File Error

philips-Mac-Pro:Desktop philipmozolak$ transcode-video --dry-run -vv /Users/philipmozolak/Desktop/2015-05-14-River/kD-30117_01.mov
transcode-video 0.2.3
Copyright (c) 2013-2015 Don Melton
Processing: /Users/philipmozolak/Desktop/2015-05-14-River/kD-30117_01.mov...
Scanning media title 1 with HandBrakeCLI...
HandBrake 0.10.0 found...
[17:49:42] hb_init: starting libhb thread
HandBrake 0.10.0 (2014112200) - Darwin x86_64 - https://handbrake.fr
8 CPUs detected
Opening /Users/philipmozolak/Desktop/2015-05-14-River/kD-30117_01.mov...
[17:49:42] CPU: Intel(R) Xeon(R) CPU           X5482  @ 3.20GHz
[17:49:42]  - logical processor count: 8
[17:49:42] OpenCL device #1: NVIDIA GeForce 8800 GT
[17:49:42]  - OpenCL version: 1.0 
[17:49:42]  - driver version: 10.0.31 310.90.10.05b12
[17:49:42]  - device type:    GPU
[17:49:42]  - supported:      no
[17:49:42] hb_scan: path=/Users/philipmozolak/Desktop/2015-05-14-River/kD-30117_01.mov, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /Users/philipmozolak/Desktop/2015-05-14-River/kD-30117_01.mov/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /Users/philipmozolak/Desktop/2015-05-14-River/kD-30117_01.mov/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(/Users/philipmozolak/Desktop/2015-05-14-River/kD-30117_01.mov) failed
[17:49:42] 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
[17:49:42] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/philipmozolak/Desktop/2015-05-14-River/kD-30117_01.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2015-05-14 21:19:06
    date            : 2015-05-14T12:45:04-0500
    encoder         : Mac OS X 10.10.4 (14E17e)
  Duration: 00:00:12.01, start: 0.000000, bitrate: 118195 kb/s
    Stream #0.0(eng): Video: prores, yuv422p10le, 1440x1080, 116646 kb/s, PAR 4:3 DAR 16:9, 29.97 fps, 30k tbn (default)
    Metadata:
      creation_time   : 2015-05-14 21:19:06
    Stream #0.1(eng): Data: tmcd / 0x64636D74, 0 kb/s (default)
    Metadata:
      creation_time   : 2015-05-14 21:19:13
    Stream #0.2(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2015-05-14 21:19:13
[17:49:42] scan: decoding previews for title 1
Scanning title 1 of 1, preview 1, 50.00 %[17:49:43] scan: 2 previews, 1440x1080, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 4:3
[17:49:43] scan: removing audio 0x2 because no bitrate found
[17:49:43] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: /Users/philipmozolak/Desktop/2015-05-14-River/kD-30117_01.mov
  + duration: 00:00:12
  + size: 1440x1080, pixel aspect: 4/3, display aspect: 1.78, 29.970 fps
  + autocrop: 0/0/0/0
  + support opencl: no
  + support hwd: not built-in
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:00:12
  + audio tracks:
  + subtitle tracks:
HandBrake has exited.

/usr/bin/transcode-video: undefined method `[]=' for nil:NilClass
philips-Mac-Pro:Desktop philipmozolak$  

--bind-srt-language LANG sets --srt-offset=LANG in generated command line

Running this command:

transcode-video --crop 0:0:0:0 -o /Volumes/Videos/Converted/Up.m4v --add-audio 2 --copy-audio 2 --add-srt Up.srt --bind-srt-language eng --dry-run Up_\(Disc_1\)_t00.mkv

against this file:

+ title 1:
  + stream: Up_(Disc_1)_t00.mkv
  + duration: 01:36:07
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:02:39
    + 2: cells 0->0, 0 blocks, duration 00:04:35
    + 3: cells 0->0, 0 blocks, duration 00:04:23
    + 4: cells 0->0, 0 blocks, duration 00:01:56
    + 5: cells 0->0, 0 blocks, duration 00:01:49
    + 6: cells 0->0, 0 blocks, duration 00:02:14
    + 7: cells 0->0, 0 blocks, duration 00:02:49
    + 8: cells 0->0, 0 blocks, duration 00:04:06
    + 9: cells 0->0, 0 blocks, duration 00:01:52
    + 10: cells 0->0, 0 blocks, duration 00:01:39
    + 11: cells 0->0, 0 blocks, duration 00:01:38
    + 12: cells 0->0, 0 blocks, duration 00:03:40
    + 13: cells 0->0, 0 blocks, duration 00:01:00
    + 14: cells 0->0, 0 blocks, duration 00:00:54
    + 15: cells 0->0, 0 blocks, duration 00:04:35
    + 16: cells 0->0, 0 blocks, duration 00:02:45
    + 17: cells 0->0, 0 blocks, duration 00:02:06
    + 18: cells 0->0, 0 blocks, duration 00:01:36
    + 19: cells 0->0, 0 blocks, duration 00:03:02
    + 20: cells 0->0, 0 blocks, duration 00:03:02
    + 21: cells 0->0, 0 blocks, duration 00:03:03
    + 22: cells 0->0, 0 blocks, duration 00:05:10
    + 23: cells 0->0, 0 blocks, duration 00:03:46
    + 24: cells 0->0, 0 blocks, duration 00:01:55
    + 25: cells 0->0, 0 blocks, duration 00:02:44
    + 26: cells 0->0, 0 blocks, duration 00:01:23
    + 27: cells 0->0, 0 blocks, duration 00:03:15
    + 28: cells 0->0, 0 blocks, duration 00:01:49
    + 29: cells 0->0, 0 blocks, duration 00:02:28
    + 30: cells 0->0, 0 blocks, duration 00:01:53
    + 31: cells 0->0, 0 blocks, duration 00:02:08
    + 32: cells 0->0, 0 blocks, duration 00:01:29
    + 33: cells 0->0, 0 blocks, duration 00:02:39
    + 34: cells 0->0, 0 blocks, duration 00:03:00
    + 35: cells 0->0, 0 blocks, duration 00:07:05
  + audio tracks:
    + 1, English (FLAC) (5.1 ch) (iso639-2: eng)
    + 2, English (DTS) (5.1 ch) (iso639-2: eng), 48000Hz, 1536000bps
    + 3, English (FLAC) (2.0 ch) (iso639-2: eng)
    + 4, English (DTS) (2.0 ch) (Lt/Rt) (iso639-2: eng), 48000Hz, 1536000bps
  + subtitle tracks:
    + 1, English (iso639-2: eng) (Bitmap)(PGS)

Results in this command getting passed to HandbrakeCLI:

HandBrakeCLI --input=Up_\(Disc_1\)_t00.mkv --output=/Volumes/Videos/Converted/Up.m4v --markers --encoder=x264 --quality=16 --crop=0:0:0:0 --strict-anamorphic --rate=30 --pfr --audio=1,1,2 --aencoder=ca_aac,ac3,copy --audio-fallback=ac3 --ab=,384, --srt-file=Up.srt --srt-offset=eng --srt-lang=eng --encopts=vbv-maxrate=5000:vbv-bufsize=2500:crf-max=25

Note that set-offset is getting set to "eng" when it should be omitted or set to 0.

Removing the bind results in:

transcode-video --crop 0:0:0:0 -o /Volumes/Videos/Converted/Up.m4v --add-audio 2 --copy-audio 2 --add-srt Up.srt --dry-run Up_\(Disc_1\)_t00.mkv 
HandBrakeCLI --input=Up_\(Disc_1\)_t00.mkv --output=/Volumes/Videos/Converted/Up.m4v --markers --encoder=x264 --quality=16 --crop=0:0:0:0 --strict-anamorphic --rate=30 --pfr --audio=1,1,2 --aencoder=ca_aac,ac3,copy --audio-fallback=ac3 --ab=,384, --srt-file=Up.srt --encopts=vbv-maxrate=5000:vbv-bufsize=2500:crf-max=25

Interestingly, explicitly setting the offset while leaving in the bind does not set the offset properly:

transcode-video --crop 0:0:0:0 -o /Volumes/Videos/Converted/Up.m4v --add-audio 2 --copy-audio 2 --add-srt Up.srt --bind-srt-language eng --bind-srt-offset 0 --dry-run Up_\(Disc_1\)_t00.mkv 
HandBrakeCLI --input=Up_\(Disc_1\)_t00.mkv --output=/Volumes/Videos/Converted/Up.m4v --markers --encoder=x264 --quality=16 --crop=0:0:0:0 --strict-anamorphic --rate=30 --pfr --audio=1,1,2 --aencoder=ca_aac,ac3,copy --audio-fallback=ac3 --ab=,384, --srt-file=Up.srt --srt-offset=eng --srt-lang=eng --encopts=vbv-maxrate=5000:vbv-bufsize=2500:crf-max=25
El-Cap-Mini:Up_(Disc_1) mini$ 

And it looks like setting the offset alone doesn't work with 0ms:

transcode-video --crop 0:0:0:0 -o /Volumes/Videos/Converted/Up.m4v --add-audio 2 --copy-audio 2 --add-srt Up.srt --bind-srt-language eng --bind-srt-offset 0 --dry-run Up_\(Disc_1\)_t00.mkv 
HandBrakeCLI --input=Up_\(Disc_1\)_t00.mkv --output=/Volumes/Videos/Converted/Up.m4v --markers --encoder=x264 --quality=16 --crop=0:0:0:0 --strict-anamorphic --rate=30 --pfr --audio=1,1,2 --aencoder=ca_aac,ac3,copy --audio-fallback=ac3 --ab=,384, --srt-file=Up.srt --srt-offset=eng --srt-lang=eng --encopts=vbv-maxrate=5000:vbv-bufsize=2500:crf-max=25

or 100ms:

transcode-video --crop 0:0:0:0 -o /Volumes/Videos/Converted/Up.m4v --add-audio 2 --copy-audio 2 --add-srt Up.srt --bind-srt-offset 100 --dry-run Up_\(Disc_1\)_t00.mkv 
HandBrakeCLI --input=Up_\(Disc_1\)_t00.mkv --output=/Volumes/Videos/Converted/Up.m4v --markers --encoder=x264 --quality=16 --crop=0:0:0:0 --strict-anamorphic --rate=30 --pfr --audio=1,1,2 --aencoder=ca_aac,ac3,copy --audio-fallback=ac3 --ab=,384, --srt-file=Up.srt --encopts=vbv-maxrate=5000:vbv-bufsize=2500:crf-max=25

Calling script results in "undefined method" error

I called it with these parameters:

transcode-video --main-audio 1=English --add-audio language=deu --audio-width all=double --no-auto-burn /title01.mkv

and the output was:

/usr/local/bin/transcode-video: undefined method `[]' for nil:NilClass

Passing Argument/Setting to HandbrakeCLI

In learning/applying the transcode-video tool, I saw that the DVD that was being transcoded was being done with h264 level 3.0; I was wondering if you could elucidate why that setting was chosen and if there is a way to pass a setting of 4.1 for example to HandbrakeCLI. For example, is the level for a Blu-Ray automatically 4.1? I tried a few combinations after reviewing the HandbrakeCLI and transcode-video --fullhelp and --help to pass the setting directly; I met with no success.

Thoughts?

No-hands-batch

I am trying to set up a batch to convert files without any involvment from my side (om my server).

Would like to use your workflow, but my knowledge in scripting does not reach this far (have spent many hours googling to try and solve this, but with no luck).

I am using Hazel, and I guess it is kind of easy to adapt the workflow (if I only knew how).

What I would like to accomplish is to put videofiles (avi, mkv, video_ts) in one folder and trigger your scripts.

Here is the Hazel documentation:
Using Hazel's "Passes shell script" condition or "Run shell script" action, you can have Hazel run shell scripts or trigger any external command-line program. Some important points about running scripts/programs with Hazel:

Hazel will pass one argument which is the path of the file being processed.
The program/script can be written in any language (including Perl and Python) as long as you tell Hazel which shell/interpreter to use.

Embeded vs. External
Hazel can run scripts in one of two ways: embedded or external.

When running an embedded script, you can enter the script using Hazel's built-in editor. Here you can also specify the shell/interpreter to use (sh, perl, python, etc). Embedded scripts are stored with your rules and therefore do not need to be exported/imported separately when transferring your rules.

When using an external script, you can have Hazel trigger a script/program already on your disk. The program must be executable. If it is a script, it should start with a sha-bang (#!) line to indicate which interpreter to use. When transferring rules between machines, the scripts must be transferred separately.

Using shellscripts for use in a rule condition
When using scripts in a rule condition, the script should exit with a 0 status to indicate that the file passes the condition. Any other exit status will tell Hazel that the file does not match the condition.
Since rule conditions tend to be evaluated many times, you should make sure the scripts runs quickly. Time consuming scripts will greatly affect performance.
The script must not modify any files or folders underneath the folder Hazel is monitoring as it can result in a loop where Hazel never stops processing the folder.

Using shellscripts for use in a rule action
When using scripts via the "Run shell script" action, the script should return 0 to indicate that the action was performed successfully. Any other value indicates an error and the rule will be re-executed until the action proceeds successfully.*

Chapter names not working with HandBrake nightly builds

Using version 5.0 of the transcode video script I've been unable to get the --chapter-names option to work. Attached is a .txt version of the chapter names file I was using (I know it needs to be .csv but GitHub wouldn't accept an upload in that format). Also attached is the resultant log file (again in .txt rather than .log).

GDT.txt
The Girl With The Dragon Tattoo.mkv.txt

I've previously used the bash version of your script and had little issue with chapter names.

Forced-subtitles not being detected (?)

Hi Don,

Hope you're well and enjoying the summer?

Quick issue has me stumped and probably user-error but I've run a test transcoding of the "The Da Vinci Code" DVD for a friend and the new ruby scripts seem to be missing the forced-subtitle sequences when .mkv/.mp4 files are produced. (Running the latest Ruby scripts with HandBrakeCLI 0.10.2)

I did two quick tests to check that the forced subtitles were burned in for the French sequence in Ch. 3:

Test 1
transcode-video --crop 74:74:0:0 --quick --chapters 3 --mp4 --force-subtitle scan 'The Da Vinci Code (2006).mkv'

Test 2
transcode-video --crop 74:74:0:0 --quick --chapters 3 --mp4 --burn-subtitle scan --force-subtitle scan 'The Da Vinci Code (2006).mkv'

HandBrakeCLI failed to detect a suitable candidate for forced-subtitles on both of the above.

[15:53:31] Subtitle track 2 (id 0x2) 'English': 71 hits (19 forced)
[15:53:31] Subtitle track 3 (id 0x3) 'English': 80 hits (0 forced)
[15:53:31] No candidate detected during subtitle scan

The following did work (explicitly telling HandBrakeCLI to scan for and burn them in):
Test 3
transcode-video --crop 74:74:0:0 --quick --chapters 3 --mp4 -H subtitle=scan -H subtitle-forced -H subtitle-burned --dry-run 'The Da Vinci Code (2006).mkv'

Test 4
Similarly, the older bash scripts worked when the following was run:
transcode-video.sh --find-forced burn --chapters 3 --fast 'The Da Vinci Code (2006).mkv'

In tests 3/4, HandBrakeCLI picked up the following and correctly burned-in the forced subtitles.
[14:36:24] * subtitle track 1, English (track 2, id 0x2) Picture [VOBSUB] -> Render/Burn-in, Forced Only

Have I used the incorrect settings on the Ruby scripts or is there a bug lingering somewhere?
Many thanks,
Joe Hurley


Some outputs for you:

.mkv file being used

General
Unique ID : 41071907310636362737018229354878173197 (0x1EE6295FAEFD5CAEB4A286E5CF23800D)
Complete name : /Volumes/4TB Hitachi/Rips/The Da Vinci Code (2006).mkv
Format : Matroska
Format version : Version 2
File size : 5.22 GiB
Duration : 2h 22mn
Overall bit rate mode : Variable
Overall bit rate : 5 237 Kbps
Movie name : Davinci
Encoded date : UTC 2015-07-07 11:37:23
Writing application : MakeMKV v1.9.4 darwin(x86-release)
Writing library : libmakemkv v1.9.4 (1.3.0/1.4.1) darwin(x86-release)
Video
ID : 1
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings, BVOP : Yes
Format settings, Matrix : Custom
Format settings, GOP : M=3, N=12
Format settings, picture structure : Frame
Codec ID : V_MPEG2
Codec ID/Info : MPEG 1 or 2 Video
Duration : 2h 22mn
Bit rate mode : Variable
Bit rate : 4 685 Kbps
Maximum bit rate : 9 800 Kbps
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.452
Time code of first frame : 00:59:58:12
Time code source : Group of pictures header
GOP, Open/Closed : Open
Stream size : 4.67 GiB (89%)
Language : English
Default : No
Forced : No
Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : A_AC3
Duration : 2h 22mn
Bit rate mode : Constant
Bit rate : 448 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 457 MiB (9%)
Title : Surround 5.1
Language : English
Default : Yes
Forced : No
Text #1
ID : 3
Format : VobSub
Codec ID : S_VOBSUB
Codec ID/Info : Picture based subtitle format used on DVDs
Language : English
Default : Yes
Forced : No
Text #2
ID : 4
Format : VobSub
Codec ID : S_VOBSUB
Codec ID/Info : Picture based subtitle format used on DVDs
Language : English
Default : No
Forced : No
Menu
00:00:00.080 : en:Chapter 01
00:06:17.680 : en:Chapter 02
00:12:24.560 : en:Chapter 03
00:16:39.920 : en:Chapter 04
00:23:41.200 : en:Chapter 05
00:27:46.760 : en:Chapter 06
00:38:16.320 : en:Chapter 07
00:39:59.960 : en:Chapter 08
00:46:24.280 : en:Chapter 09
00:53:19.040 : en:Chapter 10
00:57:16.320 : en:Chapter 11
01:02:05.360 : en:Chapter 12
01:10:06.320 : en:Chapter 13
01:16:13.480 : en:Chapter 14
01:21:05.160 : en:Chapter 15
01:25:47.120 : en:Chapter 16
01:31:05.000 : en:Chapter 17
01:37:33.680 : en:Chapter 18
01:43:35.880 : en:Chapter 19
01:47:10.320 : en:Chapter 20
01:55:10.440 : en:Chapter 21
02:00:25.360 : en:Chapter 22
02:06:04.920 : en:Chapter 23
02:11:28.280 : en:Chapter 24

Test 1

Joes-MBP:Rips joe$ transcode-video --crop 74:74:0:0 --quick --chapters 3 --mp4 --force-subtitle scan 'The Da Vinci Code (2006).mkv'
invalid framerate 25.0
[15:53:30] hb_init: starting libhb thread
HandBrake 0.10.2 (2015060900) - Darwin x86_64 - https://handbrake.fr
8 CPUs detected
Opening The Da Vinci Code (2006).mkv...
[15:53:30] CPU: Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz
[15:53:30]  - Intel microarchitecture Haswell
[15:53:30]  - logical processor count: 8
[15:53:30] OpenCL device #1: Intel Iris Pro
[15:53:30]  - OpenCL version: 1.2 
[15:53:30]  - driver version: 1.2(Jun 10 2015 16:35:16)
[15:53:30]  - device type:    GPU
[15:53:30]  - supported:      YES
[15:53:30] OpenCL device #2: NVIDIA GeForce GT 750M
[15:53:30]  - OpenCL version: 1.2 
[15:53:30]  - driver version: 10.4.2 310.41.35f01
[15:53:30]  - device type:    GPU
[15:53:30]  - supported:      no
[15:53:30] hb_scan: path=The Da Vinci Code (2006).mkv, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening The Da Vinci Code (2006).mkv/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening The Da Vinci Code (2006).mkv/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(The Da Vinci Code (2006).mkv) failed
[15:53:30] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[15:53:30] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'The Da Vinci Code (2006).mkv':
  Metadata:
    title           : Davinci
  Duration: 02:22:42.52, start: 0.000000, bitrate: N/A
    Chapter #0.0: start 0.080000, end 377.680000
    Metadata:
      title           : Chapter 01
    Chapter #0.1: start 377.680000, end 744.560000
    Metadata:
      title           : Chapter 02
    Chapter #0.2: start 744.560000, end 999.920000
    Metadata:
      title           : Chapter 03
    Chapter #0.3: start 999.920000, end 1421.200000
    Metadata:
      title           : Chapter 04
    Chapter #0.4: start 1421.200000, end 1666.760000
    Metadata:
      title           : Chapter 05
    Chapter #0.5: start 1666.760000, end 2296.320000
    Metadata:
      title           : Chapter 06
    Chapter #0.6: start 2296.320000, end 2399.960000
    Metadata:
      title           : Chapter 07
    Chapter #0.7: start 2399.960000, end 2784.280000
    Metadata:
      title           : Chapter 08
    Chapter #0.8: start 2784.280000, end 3199.040000
    Metadata:
      title           : Chapter 09
    Chapter #0.9: start 3199.040000, end 3436.320000
    Metadata:
      title           : Chapter 10
    Chapter #0.10: start 3436.320000, end 3725.360000
    Metadata:
      title           : Chapter 11
    Chapter #0.11: start 3725.360000, end 4206.320000
    Metadata:
      title           : Chapter 12
    Chapter #0.12: start 4206.320000, end 4573.480000
    Metadata:
      title           : Chapter 13
    Chapter #0.13: start 4573.480000, end 4865.160000
    Metadata:
      title           : Chapter 14
    Chapter #0.14: start 4865.160000, end 5147.120000
    Metadata:
      title           : Chapter 15
    Chapter #0.15: start 5147.120000, end 5465.000000
    Metadata:
      title           : Chapter 16
    Chapter #0.16: start 5465.000000, end 5853.680000
    Metadata:
      title           : Chapter 17
    Chapter #0.17: start 5853.680000, end 6215.880000
    Metadata:
      title           : Chapter 18
    Chapter #0.18: start 6215.880000, end 6430.320000
    Metadata:
      title           : Chapter 19
    Chapter #0.19: start 6430.320000, end 6910.440000
    Metadata:
      title           : Chapter 20
    Chapter #0.20: start 6910.440000, end 7225.360000
    Metadata:
      title           : Chapter 21
    Chapter #0.21: start 7225.360000, end 7564.920000
    Metadata:
      title           : Chapter 22
    Chapter #0.22: start 7564.920000, end 7888.280000
    Metadata:
      title           : Chapter 23
    Chapter #0.23: start 7888.280000, end 8562.520000
    Metadata:
      title           : Chapter 24
    Stream #0.0(eng): Video: mpeg2video (Main), yuv420p, 720x576 [PAR 64:45 DAR 16:9], 9800 kb/s, 25 fps, 1k tbn, 50 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(eng): Subtitle: dvdsub
[15:53:30] scan: decoding previews for title 1
[15:53:30] scan: audio 0x1: ac3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
[15:53:30] scan: 10 previews, 720x576, 25.000 fps, autocrop = 74/74/0/0, aspect 16:9, PAR 64:45
[15:53:30] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: The Da Vinci Code (2006).mkv
  + duration: 02:22:42
  + size: 720x576, pixel aspect: 64/45, display aspect: 1.78, 25.000 fps
  + autocrop: 74/74/0/0
  + support opencl: yes
  + support hwd: not built-in
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:06:18
    + 2: cells 0->0, 0 blocks, duration 00:06:07
    + 3: cells 0->0, 0 blocks, duration 00:04:15
    + 4: cells 0->0, 0 blocks, duration 00:07:01
    + 5: cells 0->0, 0 blocks, duration 00:04:06
    + 6: cells 0->0, 0 blocks, duration 00:10:30
    + 7: cells 0->0, 0 blocks, duration 00:01:44
    + 8: cells 0->0, 0 blocks, duration 00:06:24
    + 9: cells 0->0, 0 blocks, duration 00:06:55
    + 10: cells 0->0, 0 blocks, duration 00:03:57
    + 11: cells 0->0, 0 blocks, duration 00:04:49
    + 12: cells 0->0, 0 blocks, duration 00:08:01
    + 13: cells 0->0, 0 blocks, duration 00:06:07
    + 14: cells 0->0, 0 blocks, duration 00:04:52
    + 15: cells 0->0, 0 blocks, duration 00:04:42
    + 16: cells 0->0, 0 blocks, duration 00:05:18
    + 17: cells 0->0, 0 blocks, duration 00:06:29
    + 18: cells 0->0, 0 blocks, duration 00:06:02
    + 19: cells 0->0, 0 blocks, duration 00:03:34
    + 20: cells 0->0, 0 blocks, duration 00:08:00
    + 21: cells 0->0, 0 blocks, duration 00:05:15
    + 22: cells 0->0, 0 blocks, duration 00:05:40
    + 23: cells 0->0, 0 blocks, duration 00:05:23
    + 24: cells 0->0, 0 blocks, duration 00:11:14
  + audio tracks:
    + 1, English (AC3) (5.1 ch) (iso639-2: eng), 48000Hz, 448000bps
  + subtitle tracks:
    + 1, English (iso639-2: eng) (Bitmap)(VOBSUB)
    + 2, English (iso639-2: eng) (Bitmap)(VOBSUB)
Subtitle Scan Enabled - enabling subtitles if found for foreign language segments
[15:53:31] 2 job(s) to process
[15:53:31] starting job
[15:53:31] sync: expecting 6384 video frames
[15:53:31] work: only 1 chapter, disabling chapter markers
[15:53:31] job configuration:
[15:53:31]  * source
[15:53:31]    + The Da Vinci Code (2006).mkv
[15:53:31]    + title 1, chapter(s) 3 to 3
[15:53:31]    + container: matroska,webm
[15:53:31]  * destination
[15:53:31]    + The Da Vinci Code (2006).mp4
[15:53:31]    + container: MPEG-4 (libavformat)
[15:53:31]  * video track
[15:53:31]    + decoder: mpeg2video
[15:53:31]      + bitrate 9800 kbps
[15:53:31]    + filters
[15:53:31]      + Framerate Shaper (0:27000000:1080000)
[15:53:31]        + frame rate: same as source (around 25.000 fps)
[15:53:31]      + Crop and Scale (720:428:74:74:0:0)
[15:53:31]        + source: 720 * 576, crop (74/74/0/0): 720 * 428, scale: 720 * 428
[15:53:31]    + strict anamorphic
[15:53:31]      + storage dimensions: 720 * 428, mod 0
[15:53:31]      + pixel aspect ratio: 64 / 45
[15:53:31]      + display dimensions: 1024 * 428
[15:53:31]  * Foreign Audio Search: Passthrough, Default
[15:53:31]    + subtitle, English (track 2, id 0x2) Picture [VOBSUB]
[15:53:31]    + subtitle, English (track 3, id 0x3) Picture [VOBSUB]
[15:53:31] reader: end of chapter 3 (media 3) reached at media chapter 4
[15:53:31] reader: done. 1 scr changes
[15:53:31] work: average encoding speed for job is 0.000000 fps
[15:53:31] render: lost time: 0 (0 frames)
[15:53:31] render: gained time: 0 (0 frames) (0 not accounted for)
[15:53:31] mpeg2video-decoder done: 0 frames, 0 decoder errors, 0 drops
[15:53:31] Subtitle track 2 (id 0x2) 'English': 71 hits (19 forced)
[15:53:31] Subtitle track 3 (id 0x3) 'English': 80 hits (0 forced)
[15:53:31] No candidate detected during subtitle scan
[15:53:31] starting job
[15:53:31] Auto Passthru: allowed codecs are AAC, AC3, DTS, DTS-HD, MP3
[15:53:31] Auto Passthru: no valid fallback specified
[15:53:31] Auto Passthru: using AC3 Passthru for track 2
[15:53:31] work: mixdown not specified, track 1 setting mixdown Dolby Pro Logic II
[15:53:31] work: bitrate not specified, track 1 setting bitrate 160 Kbps
[15:53:31] sync: expecting 6384 video frames
[15:53:31] work: only 1 chapter, disabling chapter markers
[15:53:31] job configuration:
[15:53:31]  * source
[15:53:31]    + The Da Vinci Code (2006).mkv
[15:53:31]    + title 1, chapter(s) 3 to 3
[15:53:31]    + container: matroska,webm
[15:53:31]  * destination
[15:53:31]    + The Da Vinci Code (2006).mp4
[15:53:31]    + container: MPEG-4 (libavformat)
[15:53:31]  * video track
[15:53:31]    + decoder: mpeg2video
[15:53:31]      + bitrate 9800 kbps
[15:53:31]    + filters
[15:53:31]      + Framerate Shaper (0:27000000:1080000)
[15:53:31]        + frame rate: same as source (around 25.000 fps)
[15:53:31]      + Crop and Scale (720:428:74:74:0:0)
[15:53:31]        + source: 720 * 576, crop (74/74/0/0): 720 * 428, scale: 720 * 428
[15:53:31]    + strict anamorphic
[15:53:31]      + storage dimensions: 720 * 428, mod 0
[15:53:31]      + pixel aspect ratio: 64 / 45
[15:53:31]      + display dimensions: 1024 * 428
[15:53:31]    + encoder: H.264 (libx264)
[15:53:31]      + options: vbv-maxrate=2000:vbv-bufsize=1000:crf-max=25:ref=1:weightp=1:subme=6:mixed-refs=0:rc-lookahead=30
[15:53:31]      + quality: 16.00 (RF)
[15:53:31]  * audio track 1
[15:53:31]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x1)
[15:53:31]      + bitrate: 448 kbps, samplerate: 48000 Hz
[15:53:31]    + mixdown: Dolby Pro Logic II
[15:53:31]    + encoder: AAC (Apple AudioToolbox)
[15:53:31]      + bitrate: 160 kbps, samplerate: 48000 Hz
[15:53:31]  * audio track 2
[15:53:31]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x1)
[15:53:31]      + bitrate: 448 kbps, samplerate: 48000 Hz
[15:53:31]    + AC3 Passthru
Encoding: task 2 of 2, 0.00 %[15:53:31] encx264: encoding at constant RF 16.000000
[15:53:31] encx264: unparsed options: vbv-maxrate=2000:vbv-bufsize=1000:crf-max=25:ref=1:weightp=1:subme=6:mixed-refs=0:rc-lookahead=30
x264 [info]: using SAR=64/45
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
x264 [info]: profile High, level 3.0
[15:53:31] reader: first SCR 67010400 id 0x0 DTS 67010400
Encoding: task 2 of 2, 31.85 % (197.48 fps, avg 216.18 fps, ETA 00h00m20s)

Test 4

Joes-MBP:Rips joe$ transcode-video.sh --find-forced burn --chapters 3 --fast 'The Da Vinci Code (2006).mkv'
Transcoding: The Da Vinci Code (2006).mkv
[16:07:00] hb_init: starting libhb thread
HandBrake 0.10.2 (2015060900) - Darwin x86_64 - https://handbrake.fr
8 CPUs detected
Opening The Da Vinci Code (2006).mkv...
[16:07:00] CPU: Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz
[16:07:00]  - Intel microarchitecture Haswell
[16:07:00]  - logical processor count: 8
[16:07:00] OpenCL device #1: Intel Iris Pro
[16:07:00]  - OpenCL version: 1.2 
[16:07:00]  - driver version: 1.2(Jun 10 2015 16:35:16)
[16:07:00]  - device type:    GPU
[16:07:00]  - supported:      YES
[16:07:00] OpenCL device #2: NVIDIA GeForce GT 750M
[16:07:00]  - OpenCL version: 1.2 
[16:07:00]  - driver version: 10.4.2 310.41.35f01
[16:07:00]  - device type:    GPU
[16:07:00]  - supported:      no
[16:07:00] hb_scan: path=The Da Vinci Code (2006).mkv, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening The Da Vinci Code (2006).mkv/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening The Da Vinci Code (2006).mkv/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(The Da Vinci Code (2006).mkv) failed
[16:07:00] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[16:07:00] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'The Da Vinci Code (2006).mkv':
  Metadata:
    title           : Davinci
  Duration: 02:22:42.52, start: 0.000000, bitrate: N/A
    Chapter #0.0: start 0.080000, end 377.680000
    Metadata:
      title           : Chapter 01
    Chapter #0.1: start 377.680000, end 744.560000
    Metadata:
      title           : Chapter 02
    Chapter #0.2: start 744.560000, end 999.920000
    Metadata:
      title           : Chapter 03
    Chapter #0.3: start 999.920000, end 1421.200000
    Metadata:
      title           : Chapter 04
    Chapter #0.4: start 1421.200000, end 1666.760000
    Metadata:
      title           : Chapter 05
    Chapter #0.5: start 1666.760000, end 2296.320000
    Metadata:
      title           : Chapter 06
    Chapter #0.6: start 2296.320000, end 2399.960000
    Metadata:
      title           : Chapter 07
    Chapter #0.7: start 2399.960000, end 2784.280000
    Metadata:
      title           : Chapter 08
    Chapter #0.8: start 2784.280000, end 3199.040000
    Metadata:
      title           : Chapter 09
    Chapter #0.9: start 3199.040000, end 3436.320000
    Metadata:
      title           : Chapter 10
    Chapter #0.10: start 3436.320000, end 3725.360000
    Metadata:
      title           : Chapter 11
    Chapter #0.11: start 3725.360000, end 4206.320000
    Metadata:
      title           : Chapter 12
    Chapter #0.12: start 4206.320000, end 4573.480000
    Metadata:
      title           : Chapter 13
    Chapter #0.13: start 4573.480000, end 4865.160000
    Metadata:
      title           : Chapter 14
    Chapter #0.14: start 4865.160000, end 5147.120000
    Metadata:
      title           : Chapter 15
    Chapter #0.15: start 5147.120000, end 5465.000000
    Metadata:
      title           : Chapter 16
    Chapter #0.16: start 5465.000000, end 5853.680000
    Metadata:
      title           : Chapter 17
    Chapter #0.17: start 5853.680000, end 6215.880000
    Metadata:
      title           : Chapter 18
    Chapter #0.18: start 6215.880000, end 6430.320000
    Metadata:
      title           : Chapter 19
    Chapter #0.19: start 6430.320000, end 6910.440000
    Metadata:
      title           : Chapter 20
    Chapter #0.20: start 6910.440000, end 7225.360000
    Metadata:
      title           : Chapter 21
    Chapter #0.21: start 7225.360000, end 7564.920000
    Metadata:
      title           : Chapter 22
    Chapter #0.22: start 7564.920000, end 7888.280000
    Metadata:
      title           : Chapter 23
    Chapter #0.23: start 7888.280000, end 8562.520000
    Metadata:
      title           : Chapter 24
    Stream #0.0(eng): Video: mpeg2video (Main), yuv420p, 720x576 [PAR 64:45 DAR 16:9], 9800 kb/s, 25 fps, 1k tbn, 50 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(eng): Subtitle: dvdsub
[16:07:00] scan: decoding previews for title 1
[16:07:00] scan: audio 0x1: ac3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
[16:07:00] scan: 10 previews, 720x576, 25.000 fps, autocrop = 74/74/0/0, aspect 16:9, PAR 64:45
[16:07:00] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: The Da Vinci Code (2006).mkv
  + duration: 02:22:42
  + size: 720x576, pixel aspect: 64/45, display aspect: 1.78, 25.000 fps
  + autocrop: 74/74/0/0
  + support opencl: yes
  + support hwd: not built-in
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:06:18
    + 2: cells 0->0, 0 blocks, duration 00:06:07
    + 3: cells 0->0, 0 blocks, duration 00:04:15
    + 4: cells 0->0, 0 blocks, duration 00:07:01
    + 5: cells 0->0, 0 blocks, duration 00:04:06
    + 6: cells 0->0, 0 blocks, duration 00:10:30
    + 7: cells 0->0, 0 blocks, duration 00:01:44
    + 8: cells 0->0, 0 blocks, duration 00:06:24
    + 9: cells 0->0, 0 blocks, duration 00:06:55
    + 10: cells 0->0, 0 blocks, duration 00:03:57
    + 11: cells 0->0, 0 blocks, duration 00:04:49
    + 12: cells 0->0, 0 blocks, duration 00:08:01
    + 13: cells 0->0, 0 blocks, duration 00:06:07
    + 14: cells 0->0, 0 blocks, duration 00:04:52
    + 15: cells 0->0, 0 blocks, duration 00:04:42
    + 16: cells 0->0, 0 blocks, duration 00:05:18
    + 17: cells 0->0, 0 blocks, duration 00:06:29
    + 18: cells 0->0, 0 blocks, duration 00:06:02
    + 19: cells 0->0, 0 blocks, duration 00:03:34
    + 20: cells 0->0, 0 blocks, duration 00:08:00
    + 21: cells 0->0, 0 blocks, duration 00:05:15
    + 22: cells 0->0, 0 blocks, duration 00:05:40
    + 23: cells 0->0, 0 blocks, duration 00:05:23
    + 24: cells 0->0, 0 blocks, duration 00:11:14
  + audio tracks:
    + 1, English (AC3) (5.1 ch) (iso639-2: eng), 48000Hz, 448000bps
  + subtitle tracks:
    + 1, English (iso639-2: eng) (Bitmap)(VOBSUB)
    + 2, English (iso639-2: eng) (Bitmap)(VOBSUB)
Subtitle Scan Enabled - enabling subtitles if found for foreign language segments
[16:07:00] 2 job(s) to process
[16:07:00] starting job
[16:07:00] sync: expecting 6384 video frames
[16:07:00] work: only 1 chapter, disabling chapter markers
[16:07:00] job configuration:
[16:07:00]  * source
[16:07:00]    + The Da Vinci Code (2006).mkv
[16:07:00]    + title 1, chapter(s) 3 to 3
[16:07:00]    + container: matroska,webm
[16:07:00]  * destination
[16:07:00]    + The Da Vinci Code (2006).mp4
[16:07:00]    + container: MPEG-4 (libavformat)
[16:07:00]  * video track
[16:07:00]    + decoder: mpeg2video
[16:07:00]      + bitrate 9800 kbps
[16:07:00]    + filters
[16:07:00]      + Framerate Shaper (1:27000000:1080000)
[16:07:00]        + frame rate: 25.000 fps -> constant 25.000 fps
[16:07:00]      + Subtitle renderer (0:0:0:0)
[16:07:00]      + Crop and Scale (720:576:0:0:0:0)
[16:07:00]        + source: 720 * 576, crop (0/0/0/0): 720 * 576, scale: 720 * 576
[16:07:00]    + strict anamorphic
[16:07:00]      + storage dimensions: 720 * 576, mod 0
[16:07:00]      + pixel aspect ratio: 64 / 45
[16:07:00]      + display dimensions: 1024 * 576
[16:07:00]  * Foreign Audio Search: Render/Burn-in, Forced Only
[16:07:00]    + subtitle, English (track 2, id 0x2) Picture [VOBSUB]
[16:07:00]    + subtitle, English (track 3, id 0x3) Picture [VOBSUB]
[16:07:00] reader: end of chapter 3 (media 3) reached at media chapter 4
[16:07:00] reader: done. 1 scr changes
[16:07:00] work: average encoding speed for job is 0.000000 fps
[16:07:00] render: 0 frames output, 0 dropped and 0 duped for CFR/PFR
[16:07:00] render: lost time: 0 (0 frames)
[16:07:00] render: gained time: 0 (0 frames) (0 not accounted for)
[16:07:00] mpeg2video-decoder done: 0 frames, 0 decoder errors, 0 drops
Encoding: task 1 of 2, 100.00 %[16:07:00] Subtitle track 2 (id 0x2) 'English': 71 hits (19 forced)
[16:07:00] Subtitle track 3 (id 0x3) 'English': 80 hits (0 forced)
[16:07:00] Found a subtitle candidate with id 0x2 (contains forced subs)
[16:07:00] starting job
[16:07:00] Auto Passthru: allowed codecs are AAC, AC3, DTS, DTS-HD, MP3
[16:07:00] Auto Passthru: no valid fallback specified
[16:07:00] Auto Passthru: using AC3 Passthru for track 2
[16:07:00] work: mixdown not specified, track 1 setting mixdown Dolby Pro Logic II
[16:07:00] work: bitrate not specified, track 1 setting bitrate 160 Kbps
[16:07:00] sync: expecting 6384 video frames
[16:07:00] work: only 1 chapter, disabling chapter markers
[16:07:00] job configuration:
[16:07:00]  * source
[16:07:00]    + The Da Vinci Code (2006).mkv
[16:07:00]    + title 1, chapter(s) 3 to 3
[16:07:00]    + container: matroska,webm
[16:07:00]  * destination
[16:07:00]    + The Da Vinci Code (2006).mp4
[16:07:00]    + container: MPEG-4 (libavformat)
[16:07:00]  * video track
[16:07:00]    + decoder: mpeg2video
[16:07:00]      + bitrate 9800 kbps
[16:07:00]    + filters
[16:07:00]      + Framerate Shaper (1:27000000:1080000)
[16:07:00]        + frame rate: 25.000 fps -> constant 25.000 fps
[16:07:00]      + Subtitle renderer (0:0:0:0)
[16:07:00]      + Crop and Scale (720:576:0:0:0:0)
[16:07:00]        + source: 720 * 576, crop (0/0/0/0): 720 * 576, scale: 720 * 576
[16:07:00]    + strict anamorphic
[16:07:00]      + storage dimensions: 720 * 576, mod 0
[16:07:00]      + pixel aspect ratio: 64 / 45
[16:07:00]      + display dimensions: 1024 * 576
[16:07:00]    + encoder: H.264 (libx264)
[16:07:00]      + preset:  fast
[16:07:00]      + options: vbv-maxrate=2000:vbv-bufsize=1000:crf-max=25
[16:07:00]      + quality: 16.00 (RF)
[16:07:00]  * subtitle track 1, English (track 2, id 0x2) Picture [VOBSUB] -> Render/Burn-in, Forced Only
[16:07:00]  * audio track 1
[16:07:00]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x1)
[16:07:00]      + bitrate: 448 kbps, samplerate: 48000 Hz
[16:07:00]    + mixdown: Dolby Pro Logic II
[16:07:00]    + encoder: AAC (Apple AudioToolbox)
[16:07:00]      + bitrate: 160 kbps, samplerate: 48000 Hz
[16:07:00]  * audio track 2
[16:07:00]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x1)
[16:07:00]      + bitrate: 448 kbps, samplerate: 48000 Hz
[16:07:00]    + AC3 Passthru
[16:07:00] encx264: encoding at constant RF 16.000000
[16:07:00] encx264: unparsed options: vbv-maxrate=2000:vbv-bufsize=1000:crf-max=25:ref=2:weightp=1:subme=6:rc-lookahead=30
x264 [info]: using SAR=64/45
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
x264 [info]: profile High, level 3.0
[16:07:00] reader: first SCR 67010400 id 0x0 DTS 67010400
Encoding: task 2 of 2, 98.64 % (126.27 fps, avg 146.36 fps, ETA 00h00m00s)[16:07:44] reader: end of chapter 3 (media 3) reached at media chapter 4
Encoding: task 2 of 2, 99.39 % (126.27 fps, avg 146.36 fps, ETA 00h00m00s)[16:07:44] reader: done. 1 scr changes
Encoding: task 2 of 2, 100.00 % (126.27 fps, avg 146.36 fps, ETA 00h00m00s)[16:07:45] work: average encoding speed for job is 146.362488 fps
Encoding: task 2 of 2, 100.00 % (126.27 fps, avg 146.36 fps, ETA 00h00m00s)[16:07:45] sync: got 6385 frames, 6384 expected
[16:07:45] render: 6385 frames output, 0 dropped and 0 duped for CFR/PFR
[16:07:45] render: lost time: 0 (0 frames)
[16:07:45] render: gained time: 0 (0 frames) (0 not accounted for)
[16:07:45] mpeg2video-decoder done: 6385 frames, 0 decoder errors, 0 drops
x264 [info]: frame I:79    Avg QP:10.59  size: 31166
x264 [info]: frame P:3378  Avg QP:14.48  size:  8364
x264 [info]: frame B:2928  Avg QP:16.42  size:  5070
x264 [info]: consecutive B-frames: 22.2% 46.5% 10.1% 21.1%
x264 [info]: mb I  I16..4: 20.7% 73.4%  5.9%
x264 [info]: mb P  I16..4:  0.6%  3.0%  0.3%  P16..4: 37.0% 22.4%  8.9%  0.0%  0.0%    skip:27.9%
x264 [info]: mb B  I16..4:  6.2% 17.4%  0.1%  B16..8: 18.7%  6.5%  0.3%  direct:13.6%  skip:37.2%  L0:43.2% L1:42.5% BI:14.3%
x264 [info]: 8x8 transform intra:74.0% inter:74.8%
x264 [info]: coded y,uvDC,uvAC intra: 62.4% 67.5% 38.6% inter: 23.2% 29.2% 4.1%
x264 [info]: i16 v,h,dc,p: 50% 17% 22% 12%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 12% 39%  3%  3%  4%  2%  4%  2%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 22% 22%  5%  6%  7%  4%  5%  3%
x264 [info]: i8c dc,h,v,p: 54% 14% 26%  5%
x264 [info]: Weighted P-Frames: Y:0.9% UV:0.3%
x264 [info]: ref P L0: 65.8% 34.2%
x264 [info]: ref B L0: 71.7% 28.3%
x264 [info]: ref B L1: 95.0%  5.0%
x264 [info]: kb/s:1427.12
[16:07:45] ac3-decoder done: 0 frames, 0 decoder errors, 0 drops
[16:07:45] ac3-decoder done: 0 frames, 0 decoder errors, 0 drops
[16:07:45] mux: track 0, 6385 frames, 45557334 bytes, 1427.01 kbps, fifo 2048
[16:07:45] mux: track 1, 11971 frames, 5197573 bytes, 162.81 kbps, fifo 4096
[16:07:45] mux: track 2, 7980 frames, 14300160 bytes, 447.93 kbps, fifo 2048
[16:07:45] libhb: work result = 0

Encode done!
HandBrake has exited.

--bind-srt-encoding or --bind-srt-language flags cause recursive array join error

ran transcode-video with the following arguments:
transcode-video --add-srt /Volumes/BitBucket/batch-mkv/Subtitles/Paper\ Towns.srt --bind-srt-language eng --bind-srt-encoding UTF-8 --mp4 /Volumes/BitBucket/MakeMKV\ Destination/Paper\ Towns.mkv
I get an error returned:
/usr/bin/transcode-video: recursive array join

If I remove either --bind-srt-language OR --bind-srt-encoding but leave the other flag in, I still get the error. Removing both flags causes the error to not occur and the transcoding completes successfully.

Detect-crop fails on windows

Description

When running detect-crop on any file, nothing happens except the below error:

detect-crop: mplayer version unknown

Likely to be another passing issue on windows? For reference my mplayer versions is

MPlayer Redxii-SVN-r37378-4.9.2 (i686)

Environment

  • Script Version: 0.1.1
  • Handbrake CLI version: Latest stable version 0.10.1 (2015030800)
  • OS: Win7 x64 Service Pack 1
  • Cygwin version: 2.0.1(0.287/5/3)
  • Ruby version: ruby 2.0.0p598 (2014-11-13) [x86_64-cygwin]

Not working due to ffmpeg issue

root@billiards:/media/media5/Plex/Movies# convert-video movie.mkv
/usr/local/bin/convert-video: ffmpeg version unknown

Ubuntu 14.04

root@billiards:/media/media5/Plex/Movies# ffmpeg -version
ffmpeg version N-75159-g319898b Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
configuration: --disable-asm --enable-libx264 --enable-gpl
libavutil 55. 1.100 / 55. 1.100
libavcodec 57. 1.100 / 57. 1.100
libavformat 57. 0.100 / 57. 0.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 1.100 / 6. 1.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
libpostproc 54. 0.100 / 54. 0.100

Multiple inputs into one output?

For a movie that spans multiple DVD/Blu-Ray discs, there a way to specify multiple inputs to be converted (merged) into one output? My current process is to use MKVtoolnix to merge the multiple MakeMKV outputs into one large MKV before conversion.

Video-Transcoding 0.2.1 Issue scanning & Transcoding DVD

Mac OSX 10.7.5 / HandBrake svn6897 (2015021301) / Mapro 1.1

When using the transcode command to encode the DVD taking of Pelhan 123 with the following commands:
transcode-video --title 1 --MP4 --big --output /Volumes/TitoDrive/Local_Movies /Volumes/Taking\ of\ Pelham\ 1\ 2\ 3
transcode-video --scan /Volumes/Taking\ of\ Pelham\ 1\ 2\ 3

Getting the following error on the command line:

transcode-video: invalid subtitle track information: + combing detected, may be interlaced or telecined

First Error message after several BD trancoding

MacPorts has all the required support packages too

With almost the same package names as homebrew, so this works:

port install ffmpeg
port install mkvtoolnix
port install mp4v2
port install mpv

Apparently mplayer2 is obsolete and replaced with mpv. To be honest I don't have either installed and just use VLC / QuickTime Player.

Create output directory when it does not exist

I've run batch conversion on a folder, where I have couple files and got following output:

$ for i in *.mkv; do
    convert-video -o out/ ${i}
done

/usr/local/bin/convert-video: not a directory: out/
Try `/usr/local/bin/convert-video --help` for more information.

Why can't output directory be created if it does not exist?

query-handbrake-log reports wrong time and speed when parsing logs with subtitle scan mode data

This is a separate issue to that described in #45.

When using the "--burn-subtitle scan" command from transcode-video, the resultant log file produces incorrect value for speed when processed with query-handbrake-log. Attached below are two log files produced from encoding the same file with identical setting except one uses "--burn-subtitle scan" and the other doesn't. You should see 21.032848 fps from one log and 0.0 fps from the other.

MIB chapter 11.mkv.txt
MIB chapter 11 Subtitles.mkv.txt

P.S. You'll also notice the same issue as described in #45 affecting both log files, although the one produced with "--burn-subtitle scan" reports the time as NaN rather than 00:00:00.

Allow the user to change audio metadata language.

This is already available when using MakeMKV, but I sometimes forget to add the correct language tag for the audio tracks. This can especially be a problem when ripping in multiple languages and still wanting to be able to see if the file contains English or local audio.

This means that I have to do one of two things currently:
Rip another copy with MakeMKV
Change the metadata using another tool before or after converting.

What I would like to be able to do:
If I find that I forgot to tag the file in MakeMKV, I would love to just be able to pass a parameter to transcode-video that would add the metadata language tag (I'm pretty sure handbrake have this?)

This would also enable me to just ignore the language tag in MakeMKV (Which is quite time consuming to actually do) and batch convert a bunch of movies that I know is in the same language, just passing the parameter for every file.

no H.264 format video track:

Hey,
Im currently getting this error when testing out convert-video. Not sure why. Any suggestions?

Just to confirm the video track is H264

Convert hevc (x265) video to mp4 not working

Hi, I', trying to convert an hevc video file to mp4, but the command complains about not finding any h264 track, is there a way to tell it to search for h265 or havoc?

Thanks,

Proposal to lower target video bitrates (again)

Proposal to lower target video bitrates (again)

The 0.6 release of the video_transcoding Gem contained perhaps the most significant change to the transcode-video tool since the deprecated --big option became the default behavior. Not only was the ratecontrol system enhanced to produce higher quality, the target bitrates for 480i and 720p content were lowered to limit the higher bitrates produced by that higher quality.

For the upcoming 0.7 release, I propose to lower those video bitrate targets again, and not just for 480i and 720p content. The targets for 2160p (4K/UHD) content would also be lowered. However, I'm not proposing any change to bitrate targets for 1080p.

Also different for 0.7 would be lowering the targets when using the --small or --small-video options.

Default target video bitrate

Input resolution Version 0.5.x Version 0.6 Proposed 0.7
2160p or 4K/UHD video 16000 Kbps (same) 12000 Kbps
1080p or Blu-ray video 8000 Kbps (same) (same)
720p 6000 Kbps 5000 Kbps 4000 Kbps
480i, 576p or DVD video 3000 Kbps 2500 Kbps 2000 Kbps

Target video bitrate with --small or --small-video

Input resolution Version 0.5.x Version 0.6 Proposed 0.7
2160p or 4K/UHD video 10000 Kbps (same) 8000 Kbps
1080p or Blu-ray video 5000 Kbps (same) (same)
720p 4000 Kbps (same) 3000 Kbps
480i, 576p or DVD video 2000 Kbps (same) 1600 Kbps

OK, what's the rationale for doing this?

First, the new ratecontrol system introduced in version 0.6 with a constant rate factor (CRF) quality target of 1 does much better at putting pressure on x264 to hit that target bitrate than the old quality target of 16 ever did. So, bitrates are higher now. Weirdly, 480i and 720p content is suddenly too good. And that seems very wasteful of space.

Second, these proposed targets seem to be more in line with what Apple, Netflix, warez (you know what I mean), etc. are doing now as opposed to what they were doing when the project started.

This makes sense to me and my tests so far indicate that quality is still good with lower target video bitrates.

BTW, you can try any of these targets yourself by setting vbv-maxrate directly like this:

transcode-video --encoder-option vbv-maxrate=4000 "/path/to/Movie.mkv"

So, I'm asking for your feedback. Let me know what you think. Soon. Because I'm liable to make the change as early as next week.

Thanks.

MPEG-TS, subtitles and Video Transcoding

I live in a country where English is a foreign language and movies are
not dubbed so it is important to be able to preserve the subtitles in videos when editing or transcoding.

I have a lot of videos (mostly movies) which have been recorded on either my DVB-S or my DVB-T receiver. In both cases the stored recording is a straight dump of the transport stream received. So far I have not found any program that can convert the transport stream to anything that an editor or a transcoding program will handle and still preserve the subtitles.

Your excellent Video Transcoding suite of scripts seems to be my best possibility so far. The scripts work beautifully when working with e.g. videos ripped from a DVD. Unfortunately I have been unable to make it work for MPEG-TSs. I have a 7 minute recording I use for all my trials. Running it through 'mediainfo' I get the following:

General
ID : 1002 (0x3EA)
Complete name : Kristendommens historie.ts
Format : MPEG-TS
File size : 120 MiB
Duration : 7mn 29s
Overall bit rate mode : Variable
Overall bit rate : 2 233 Kbps

Video
ID : 2111 (0x83F)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : 27
Duration : 7mn 29s
Width : 704 pixels
Height : 576 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : MBAFF
Color primaries : BT.601 NTSC
Transfer characteristics : BT.601
Matrix coefficients : BT.601

Audio
ID : 2121 (0x849)
Menu ID : 1 (0x1)
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Muxing mode : LATM
Codec ID : 17
Duration : 7mn 29s
Bit rate mode : Variable
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Delay relative to video : -907ms
Language : Danish

Text #1
ID : 2031 (0x7EF)-104
Menu ID : 1 (0x1)
Format : Teletext
Language : Danish

Text #2
ID : 2135 (0x857)
Menu ID : 1 (0x1)
Format : DVB Subtitle
Codec ID : 6
Duration : 7mn 25s
Delay relative to video : 3s 878ms
Language : Danish

Text #3
ID : 2136 (0x858)
Menu ID : 1 (0x1)
Format : DVB Subtitle
Codec ID : 6
Duration : 7mn 25s
Delay relative to video : 3s 878ms
Language : Danish

Menu
ID : 2100 (0x834)
Menu ID : 1 (0x1)
Duration : 7mn 29s
List : 90 (0x5A) () / 91 (0x5B) () / 2031 (0x7EF) () / 2111 (0x83F) (AVC) / 2121 (0x849) (AAC, Danish) / 2135 (0x857) (DVB Subtitle, Danish) / 2136 (0x858) (DVB Subtitle, Danish)
Language : / / / / Danish / Danish / Danish

(the title of the video is Danish for 'The History of Christianity')

However, running the video through 'transcode-video –scan' I get this:

`

  • title 1:
    • stream: Kristendommens historie.ts
    • duration: 00:07:24
    • size: 704x576, pixel aspect: 16/11, display aspect: 1.78, 25.000 fps
    • chapters:
      • 1: cells 0->0, 0 blocks, duration 00:07:24
    • audio tracks:
      • 1, Dansk (LC) (2.0 ch) (iso639-2: dan)
    • subtitle tracks:

`
Is there any possiblity to make transcode-video handle subtitle tracks in a MPEG-TS?

transcode-video vs convert-video

been testing convert-video to try ans speed to transcoding to mp4. However encountered an issue that increases the file size significantly of the output mp4. It adds 3 audio streams. I dont know if this is by design or not. However I thought I would raise it

convert-video

Windows: convert-video : ffmpeg version unknown

I looked at the ruby code and it looks like it is looking for a ffmpeg version that starts with 1-9., but the windows builds are all built off source so they look like:
git-21fbc41 (2015-12-06) which obviously fails the version check. Anything we can do here to either not do the check of also allow git-
builds?

Media Duration Cannot be Found (Windows)

Description

Whenever I try to transcode any mkv file, it parses the parameters, then the following message is printed out.

/home/Callum/bin/transcode-video: media duration not found

This happens regardless of the parameters or input files. It happens for all kinds of mkv inputs. I cannot find an mkv that works.

Environment

  • Script Version: 0.1.1
  • Handbrake CLI version: Latest stable version 0.10.1 (2015030800)
  • OS: Win7 x64 Service Pack 1
  • Cygwin version: 2.0.1(0.287/5/3)
  • Ruby version: ruby 2.0.0p598 (2014-11-13) [x86_64-cygwin]

HandBrakeCLI version unknown

I believe this is happening because I am using a nightly version of HandbrakeCLI, and their repository is now hosted on GitHub. Obviously it's not parsing correctly, but even if it did, I think it's going to fail the version number check (which seems based on a svn commit number)

$ HandBrakeCLI --version
[13:11:17] hb_init: starting libhb thread
[13:11:17] thread 700000081000 started ("libhb")
HandBrake 20151209210633-3443f6a-master

Dolby Digital Plus support

Reading the tech specs for the new Apple TV, it supports Dolby Digital Plus 7.1 which Handbrake supports encoding to with aencoder=eac3. Dolby Digital Plus is reportedly twice as efficient as AC3, has more channels, and allows for higher overall bitrate. Would it be possible to add support to use Dolby Digital Plus for surround tracks? Thanks!

detect-crop doesn't work on Lord of rings 3

I ripped a DVD of Lord of the rings 3 and the mkv file is fine for playback but detect-crop only shows 3 dot-lines. It works in general when I supply another film, but only with this one (I also tried renaming it, but it wasn't the name), it doesn't work.

Scripts fail to start on Cygwin

Scripts fail to start on Cygwin

Description

Upon downloading the scripts, I was able to view the help and the version, to verify that I had the latest version.
Trying to use any of the scripts further, however, resulted in the stack trace given below.

Further details

The identical stack trace appears when using any of the scripts, with or without any parameters.
Uninstalling and reinstalling the Ruby gem results in the same error immediately.
I first noticed this after adding the

/home/Callum/bin

directory to the Windows system environment variable path as

C:/cygwin/Callum/bin

but after removing them from the path the error persists.

System information

  • OS: Win7 x64 Service Pack 1
  • Cygwin version: 2.0.1(0.287/5/3)
  • Ruby version: ruby 2.0.0p598 (2014-11-13) [x86_64-cygwin]

Stack trace

$ transcode-video --help
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require': /home/Callum/.gem/ruby/gems/video_transcoding-0.1.0/lib/video_transcoding/media.rb:11: syntax error, unexpected ',' (SyntaxError)
    def initialize(path:, title: nil, autocrop: false,...
                         ^
/home/Callum/.gem/ruby/gems/video_transcoding-0.1.0/lib/video_transcoding/media.rb:11: Can't assign to nil
...f initialize(path:, title: nil, autocrop: false, extended: t...
...                               ^
/home/Callum/.gem/ruby/gems/video_transcoding-0.1.0/lib/video_transcoding/media.rb:11: Can't assign to false
...:, title: nil, autocrop: false, extended: true, allow_direct...
...                               ^
/home/Callum/.gem/ruby/gems/video_transcoding-0.1.0/lib/video_transcoding/media.rb:11: Can't assign to true
...utocrop: false, extended: true, allow_directory: true)
...                               ^
/home/Callum/.gem/ruby/gems/video_transcoding-0.1.0/lib/video_transcoding/media.rb:323: syntax error, unexpected keyword_end, expecting end-of-input
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /home/Callum/.gem/ruby/gems/video_transcoding-0.1.0/lib/video_transcoding.rb:15:in `<top (required)>'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /home/Callum/.gem/ruby/gems/video_transcoding-0.1.0/lib/video_transcoding/cli.rb:8:in `<top (required)>'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /home/Callum/.gem/ruby/gems/video_transcoding-0.1.0/bin/transcode-video:12:in `<top (required)>'
        from /home/Callum/bin/transcode-video:23:in `load'
        from /home/Callum/bin/transcode-video:23:in `<main>'

Trouble Selecting Titles Other Than 1

Hi Don. Thank you for all the work you've put into these scripts. They've been very useful to me.

I had been using the bash scripts for a while and never had any trouble with titles. I've switched to the ruby scripts and can't get the script to use a title other than title 1 when transcoding an .iso file. I keep getting an "invalid title index" message.

For instance, I try the following to transcode title 3:
# transcode-video --title 3 pending/movie.iso
/usr/local/bin/transcode-video: invalid title index: 3
Try /usr/local/bin/transcode-video --help for more information.

If I use HandBrakeCLI to scan the file for titles, it shows that title #3 is present (see attached HandBrakeScanLog.txt).

HandBrakeScanLog.txt

If I go back to the old bash script and specify title 3, it transcodes fine. Is there something I doing wrong with the syntax for the ruby version of the script?

Thanks much!

Feature Request: Write to tmp file during transcode

I'm transcoding a batch of mkv files. My process is:

  1. Put a bunch of .mkv files in a directory.

  2. Manually run detect-crop on each one to get the "transcode-video" recommendations.

  3. Create a transcode.bash script in the source directory with a line for each transcode call. For example:

    #!/bin/bash
    
    transcode-video --mp4 --crop 0:0:0:0 PrettyGoodMovie.mkv
    transcode-video --mp4 --crop 132:132:0:0 AwesomeMovie.mkv
    # etc...
    
  4. Run the script overnight to process as many movies as possible.

  5. Stop the script in the morning when I have to go to work.

  6. Figure out which movie was only partially transcoded.

  7. Delete the partial file so the next time the script is run the full movie gets transcoded.


My suggestion is to update the 'transcode-video' script to write the output file to a temporary location (e.g. "AwesomeMovie.mp4.tmp") during the transcoding. Then, when the transcoding is complete, rename it to its final name (e.g. "AwesomeMovie.mp4").

Aside from batch runs, this will also help avoid confusion for simple calls if the transcoding chokes or is stopped before finishing. It'll be evident by the fact that the file still has a temporary extension that the process didn't complete.

Allow language code as argument to --main-audio option in transcode-video

I called thr script with this:

transcode-video --output titlesmall.mkv --add-audio language=deu --audio-width all=double --no-auto-burn title01.mkv

My file has an audio track 1 with english and a track 4 which is german. According to help, main output is number 1 by default, so shouldn't need to change/specify it as "adding" means additional audio tracks beside the main track. Resulting video only had the german audio track

H.265 Support

I am seeing H265 is becoming very popular (and I can see why). Do you think H265 support could be added? I think moving forward I would like to start using H265 (after running a few more tests) as it looks like I can achieve up to around 50% size reduction with no noticeable quality loss. It appears it will become the new standard in the next few years.

After moving house I will be setting up my HP server probably with VMware and having a new ubuntu 16.04 VM dedicated to automatically converting and transcoding using my automated bash scripts and your scripts. Im looking forward to getting this set up.

Error: "invalid subtitle track information"

Problem

I'm getting an "invalid subtitle track information" error when attempting to transcode an MKV file that contains a subtitle track. In fact, this error is appearing for other MakeMKV rips that do not include subtitles. There are no issues when transcoding these files with the old bash scripts.

Software Versions

  • Windows 8.1
  • Cygwin: 2.0.1
  • Ruby: 2.0.0p598
  • video_transcoding: 0.2.2
  • HandBrake: 0.10.1

Command Output

$ transcode-video -vv title01.mkv 
transcode-video 0.2.2
Copyright (c) 2013-2015 Don Melton
Processing: title01.mkv...
Scanning media title 1 with HandBrakeCLI...
HandBrake 0.10.1 found...
[02:41:30] hb_init: starting libhb thread
HandBrake 0.10.1 (2015030800) - MinGW x86_64 - https://handbrake.fr
4 CPUs detected
Opening title01.mkv...
[02:41:30] CPU: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz
[02:41:30]  - Intel microarchitecture Haswell
[02:41:30]  - logical processor count: 4
[02:41:30] OpenCL device #1: Advanced Micro Devices, Inc. Pitcairn
[02:41:30]  - OpenCL version: 1.2 AMD-APP (1445.5)
[02:41:30]  - driver version: 1445.5 (VM)
[02:41:30]  - device type:    GPU
[02:41:30]  - supported:      YES
[02:41:30] Intel Quick Sync Video support: no
[02:41:30] hb_scan: path=title01.mkv, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening title01.mkv/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening title01.mkv/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(title01.mkv) failed
[02:41:30] 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
[02:41:30] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'title01.mkv':
  Metadata:
    title           : BABYLON 5 IN THE BEGINNING
  Duration: 01:34:17.65, start: 0.000000, bitrate: N/A
    Chapter #0.0: start 0.066733, end 71.771700
    Metadata:
      title           : Chapter 01
    Chapter #0.1: start 71.771700, end 341.074067
    Metadata:
      title           : Chapter 02
    Chapter #0.2: start 341.074067, end 605.371433
    Metadata:
      title           : Chapter 03
    Chapter #0.3: start 605.371433, end 851.750900
    Metadata:
      title           : Chapter 04
    Chapter #0.4: start 851.750900, end 962.261300
    Metadata:
      title           : Chapter 05
    Chapter #0.5: start 962.261300, end 1181.079900
    Metadata:
      title           : Chapter 06
    Chapter #0.6: start 1181.079900, end 1341.239900
    Metadata:
      title           : Chapter 07
    Chapter #0.7: start 1341.239900, end 1429.461367
    Metadata:
      title           : Chapter 08
    Chapter #0.8: start 1429.461367, end 1580.512267
    Metadata:
      title           : Chapter 09
    Chapter #0.9: start 1580.512267, end 1720.852467
    Metadata:
      title           : Chapter 10
    Chapter #0.10: start 1720.852467, end 1962.160200
    Metadata:
      title           : Chapter 11
    Chapter #0.11: start 1962.160200, end 2150.281467
    Metadata:
      title           : Chapter 12
    Chapter #0.12: start 2150.281467, end 2330.761767
    Metadata:
      title           : Chapter 13
    Chapter #0.13: start 2330.761767, end 2465.162700
    Metadata:
      title           : Chapter 14
    Chapter #0.14: start 2465.162700, end 2615.579633
    Metadata:
      title           : Chapter 15
    Chapter #0.15: start 2615.579633, end 2945.208933
    Metadata:
      title           : Chapter 16
    Chapter #0.16: start 2945.208933, end 3079.843433
    Metadata:
      title           : Chapter 17
    Chapter #0.17: start 3079.843433, end 3297.260633
    Metadata:
      title           : Chapter 18
    Chapter #0.18: start 3297.260633, end 3556.119233
    Metadata:
      title           : Chapter 19
    Chapter #0.19: start 3556.119233, end 3743.940200
    Metadata:
      title           : Chapter 20
    Chapter #0.20: start 3743.940200, end 3934.931000
    Metadata:
      title           : Chapter 21
    Chapter #0.21: start 3934.931000, end 4188.951433
    Metadata:
      title           : Chapter 22
    Chapter #0.22: start 4188.951433, end 4330.125800
    Metadata:
      title           : Chapter 23
    Chapter #0.23: start 4330.125800, end 4521.049867
    Metadata:
      title           : Chapter 24
    Chapter #0.24: start 4521.049867, end 4672.701367
    Metadata:
      title           : Chapter 25
    Chapter #0.25: start 4672.701367, end 4890.652433
    Metadata:
      title           : Chapter 26
    Chapter #0.26: start 4890.652433, end 5118.379933
    Metadata:
      title           : Chapter 27
    Chapter #0.27: start 5118.379933, end 5335.897233
    Metadata:
      title           : Chapter 28
    Chapter #0.28: start 5335.897233, end 5604.098500
    Metadata:
      title           : Chapter 29
    Chapter #0.29: start 5604.098500, end 5657.652000
    Metadata:
      title           : Chapter 30
    Stream #0.0(eng): Video: mpeg2video (Main), yuv420p, 720x480 [PAR 32:27 DAR 16:9], 7500 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)
[02:41:30] dxva2:IDirect3D9_GetAdapterIdentifier failed
[02:41:30] dxva2:IDirect3D9_CreateDevice failed
[02:41:30] dxva2:Failed to create Direct3D device
[02:41:30] scan: decoding previews for title 1
[02:41:30] scan: audio 0x1: ac3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
[02:41:31] scan: 2 previews, 720x480, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 32:27
[02:41:31] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: title01.mkv
  + duration: 01:34:17
  + size: 720x480, pixel aspect: 32/27, display aspect: 1.78, 29.970 fps
  + autocrop: 0/0/0/0
  + support opencl: yes
  + support hwd: no
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:01:12
    + 2: cells 0->0, 0 blocks, duration 00:04:29
    + 3: cells 0->0, 0 blocks, duration 00:04:24
    + 4: cells 0->0, 0 blocks, duration 00:04:06
    + 5: cells 0->0, 0 blocks, duration 00:01:51
    + 6: cells 0->0, 0 blocks, duration 00:03:39
    + 7: cells 0->0, 0 blocks, duration 00:02:40
    + 8: cells 0->0, 0 blocks, duration 00:01:28
    + 9: cells 0->0, 0 blocks, duration 00:02:31
    + 10: cells 0->0, 0 blocks, duration 00:02:20
    + 11: cells 0->0, 0 blocks, duration 00:04:01
    + 12: cells 0->0, 0 blocks, duration 00:03:08
    + 13: cells 0->0, 0 blocks, duration 00:03:00
    + 14: cells 0->0, 0 blocks, duration 00:02:14
    + 15: cells 0->0, 0 blocks, duration 00:02:30
    + 16: cells 0->0, 0 blocks, duration 00:05:30
    + 17: cells 0->0, 0 blocks, duration 00:02:15
    + 18: cells 0->0, 0 blocks, duration 00:03:37
    + 19: cells 0->0, 0 blocks, duration 00:04:19
    + 20: cells 0->0, 0 blocks, duration 00:03:08
    + 21: cells 0->0, 0 blocks, duration 00:03:11
    + 22: cells 0->0, 0 blocks, duration 00:04:14
    + 23: cells 0->0, 0 blocks, duration 00:02:21
    + 24: cells 0->0, 0 blocks, duration 00:03:11
    + 25: cells 0->0, 0 blocks, duration 00:02:32
    + 26: cells 0->0, 0 blocks, duration 00:03:38
    + 27: cells 0->0, 0 blocks, duration 00:03:48
    + 28: cells 0->0, 0 blocks, duration 00:03:38
    + 29: cells 0->0, 0 blocks, duration 00:04:28
    + 30: cells 0->0, 0 blocks, duration 00:00:54
  + audio tracks:
    + 1, English (AC3) (5.1 ch) (iso639-2: eng), 48000Hz, 448000bps
  + subtitle tracks:
    + 1, English (iso639-2: eng) (Bitmap)(VOBSUB)

HandBrake has exited.
transcode-video: invalid subtitle track information: 

$ 

Any ideas? Let me know if you need any more info or testing on my end.

Cheers!
David

Stutter in source causes loss of video (possible Handbrake issue), add warning?

I'm ripping and transcoding my Sopranos DVD boxset.
Luckily for me I started also watching the show before finishing all of the episodes (about 25% left) and I noticed S01E01 ended at 53:15 (it's susposed to be around 1 hour).
So I went to look at the log for the particular episode and see this:

Encoding: task 1 of 1, 88.58 % (139.56 fps, avg 137.33 fps, ETA 00h01m15s) 
Encoding: task 1 of 1, 88.62 % (139.56 fps, avg 137.33 fps, ETA 00h01m15s)[18:12:38] reader: done. 1 scr changes

Encoding: task 1 of 1, 88.68 % (139.56 fps, avg 137.33 fps, ETA 00h01m15s)
Encoding: task 1 of 1, 88.68 % (139.56 fps, avg 137.33 fps, ETA 00h01m15s)[18:12:39] work: average encoding speed for job is 137.333069 fps

Encoding: task 1 of 1, 88.68 % (139.56 fps, avg 137.33 fps, ETA 00h01m15s)[18:12:39] sync: got 79895 frames, 90088 expected
[18:12:39] render: lost time: 0 (0 frames)
[18:12:39] render: gained time: 0 (0 frames) (0 not accounted for)
[18:12:39] mpeg2video-decoder done: 79895 frames, 0 decoder errors, 0 drops

I went and checked the raw mkv file (from MakeMKV) and it was full-length, however at the 53:15 mark there is a stutter where it seems to freeze for 1 second (probably from the source dvd being scratched or the dvd-drive being bad I'm guessing.)
I tried encoding the same episode using Handbrake GUI (High Profile, burned in subtitles) and the same issue happened there, so it's an issue with Handbrake, and not your script particularly.

So that's fine, I can just re-rip that particular episode (S01E02 and S01E03 from the same disc seems fine) and hope I don't get a stutter in the same spot again. But I would like if your script warned me with something similar to "This transcode is shorter than the source, possibly bad source." and paused the script so I could acknowledge it and know to make a new rip (I made a shell script with a bunch of transcode-video commands for each episode (because some are interlaced and some aren't for example) so I didn't see when it jumped from Encoding: 88.68% to completion because it had moved on to the next episode.
I'm now gonna have to check every transcoded episode and make sure I see the credits at the end.

I'm attaching mediainfo for the transcode and raw mkv and log from your script.
s01e01.mp4.log.txt
mediainfo_title00.mkv.txt
mediainfo_s01e01.mp4.txt

Here's the transcode-video command I used for S01E01:

transcode-video --mp4 --720p --burn-subtitle 1 --filter deinterlace=1 /Volumes/1tb/SOPRANOS_SEASON1_DISC2/title00.mkv --o "Sopranos S01E04 [swesub-burned, dvdrip, x264, donmelton-script, 2-1-2016].mp4"

Need help automating on windows 10

Sorry if this is the wrong place for this, but my scripting experience is near zero and I figured who better to help automate this than the author.

So I'm just trying to set up a simple script where the transcoder will run on a schedule, search an input directory for .mkv files, transcode them to an output directory, and then delete the original files. I'm just looking for a simple setup for the mother in laws HTPC. I'm trying to take most of the effort out of her ripping her dvd collection.

Thank you for your assistance.

Possibly using incorrect bitrate when scaling down to 480p.

Hi.

When using transcode-video with a 1080p source for example, I like to create both an HD and SD version. For the SD version, I target a max width and height that matches 480p by using args --max-width 854 --max-height 480. This is the standard width and height of 480p.

The problem is that transcode-video has a block that sets vbv_maxrate this way:

...
elsif width > 720 or height > 576
handbrake_options['encoder-level'] = '3.1'
vbv_maxrate = @vbv_maxrate_720p
else
handbrake_options['encoder-level'] = '3.0'
vbv_maxrate = @vbv_maxrate_480p
end

Because 480p has a standard width of 854, the "width > 720" matches, and @vbv_maxrate_720p is used instead of @vbv_maxrate_480p

Perhaps it would be better to use

elsif width > 854 or height > 576

here instead?

Request to allow transcode-video to continue with default crop values if both tests differ when using detect-crop

When using detect-crop in the same argument as transcode-video, if the results differ between mplayer and handbrake, the script will fail. I'd like to request an option to allow the script to continue with default 0:0:0:0 cropping values instead of the script halting.

The is beneficial if you want to attempt to get correct cropping values, but trust if results differ between the two tests, something must be up, so continue safely with default values.

This is even more beneficial when you load up multiple inputs (like DVD extras or multiple movies) and you want to attempt to crop correctly when the tests agree, but don't want to monitor it.

-o isn't passing through file path

Starting with this output from transcode-video --scan against a DVD folder of the most recent Hitchhiker's Guide (not a .mkv file):

+ title 12:
  + Main Feature
  + vts 2, ttn 1, cells 0->25 (2584340 blocks)
  + duration: 01:48:40
  + size: 720x480, pixel aspect: 32/27, display aspect: 1.78, 29.970 fps
  + chapters:
    + 1: cells 0->0, 107651 blocks, duration 00:03:52
    + 2: cells 1->1, 76584 blocks, duration 00:02:54
    + 3: cells 2->2, 155302 blocks, duration 00:06:10
    + 4: cells 3->3, 44048 blocks, duration 00:01:36
    + 5: cells 4->4, 107001 blocks, duration 00:04:01
    + 6: cells 5->5, 165070 blocks, duration 00:07:06
    + 7: cells 6->6, 111907 blocks, duration 00:04:35
    + 8: cells 7->7, 90249 blocks, duration 00:04:16
    + 9: cells 8->8, 121317 blocks, duration 00:05:33
    + 10: cells 9->9, 100528 blocks, duration 00:03:49
    + 11: cells 10->10, 104069 blocks, duration 00:04:46
    + 12: cells 11->11, 81954 blocks, duration 00:03:52
    + 13: cells 12->12, 97624 blocks, duration 00:04:01
    + 14: cells 13->13, 110054 blocks, duration 00:04:29
    + 15: cells 14->14, 113364 blocks, duration 00:05:12
    + 16: cells 15->16, 93784 blocks, duration 00:04:03
    + 17: cells 17->17, 85576 blocks, duration 00:03:43
    + 18: cells 18->18, 113054 blocks, duration 00:04:36
    + 19: cells 19->19, 115980 blocks, duration 00:04:27
    + 20: cells 20->20, 79622 blocks, duration 00:02:55
    + 21: cells 21->21, 110249 blocks, duration 00:04:45
    + 22: cells 22->22, 128655 blocks, duration 00:05:03
    + 23: cells 23->23, 154794 blocks, duration 00:06:04
    + 24: cells 24->24, 115717 blocks, duration 00:06:53
    + 25: cells 25->25, 187 blocks, duration 00:00:01
  + audio tracks:
    + 1, English (AC3) (5.1 ch) (iso639-2: eng), 48000Hz, 448000bps
    + 2, English (DTS) (5.1 ch) (iso639-2: eng), 48000Hz, 768000bps
    + 3, Francais (AC3) (2.0 ch) (Dolby Surround) (iso639-2: fra), 48000Hz, 192000bps
    + 4, Espanol (AC3) (2.0 ch) (Dolby Surround) (iso639-2: spa), 48000Hz, 192000bps
    + 5, English (AC3) (Director's Commentary 1) (1.0 ch) (iso639-2: eng), 48000Hz, 96000bps
    + 6, English (AC3) (Director's Commentary 2) (1.0 ch) (iso639-2: eng), 48000Hz, 96000bps
  + subtitle tracks:
    + 1, English (Closed Caption) (iso639-2: eng) (Bitmap)(VOBSUB)
    + 2, Francais (iso639-2: fra) (Bitmap)(VOBSUB)
    + 3, Espanol (iso639-2: spa) (Bitmap)(VOBSUB)
    + 4, Francais (iso639-2: fra) (Bitmap)(VOBSUB)
    + 5, Espanol (iso639-2: spa) (Bitmap)(VOBSUB)
    + 6, Closed Captions (iso639-2: eng) (Text)(CC)

I tried this command:

transcode-video --title 12 -o /Volumes/Videos/Converted/HGG0NND1.m4v --m4v --crop detect --add-audio 1 --copy-audio 2 --burn-subtitle scan --add-subtitle 1 --add-subtitle 6 --dry-run /Volumes/HGG0NND1/

And received this output:

HandBrakeCLI --input=/Volumes/HGG0NND1/ --output=/Users/ari/.rvm/rubies/HGG0NND1.m4v --markers --encoder=x264 --quality=16 --title=12 --crop=60:64:0:0 --strict-anamorphic --rate=23.976 --audio=1,1 --aencoder=ca_aac,copy --audio-fallback=ac3 --subtitle=scan,1,6 --subtitle-burned --encopts=vbv-maxrate=2000:vbv-bufsize=1000:crf-max=25

the --audio=1,1 --aencoder=ca_aac,copy section seems wrong. I would have expected something more like --audio=1,1,2 --aencoder=ca_aac,ac3,copy:dts

mkv v. mp4: --no-auto-burn works in .mkv but burns-in when output is mp4

Hi Don,

I'm not sure if this is a bug, user error or a "feature" of .mp4 but I've come across a problem with Crouching Tiger, Hidden Dragon and mkv/mp4 subtitle behaviours.

AIM: Chinese track (160 stereo + 640 5.1) + English subtitles (separate track, not burned in)
English dubbed (160 stereo + 640 5.1) + no subtitles

Starting BluRay MKV

screen shot 2015-05-11 at 23 14 47

Command run for Matroska
transcode-video --crop 140:140:0:0 --quick --big --main-audio 2=Chinese --add-audio 1=Engish --audio-width 1=double --add-subtitle 1 --no-auto-burn 'Crouching Tiger Hidden Dragon (2000).mkv'

This outputs the following (correctly achieving the above aim):

[23:07:29] job configuration:
[23:07:29]  * source
[23:07:29]    + Crouching Tiger Hidden Dragon (2000).mkv
[23:07:29]    + title 1, chapter(s) 4 to 4
[23:07:29]    + container: matroska,webm
[23:07:29]  * destination
[23:07:29]    + /Volumes/4TB Hitachi/Rips/test.mkv
[23:07:29]    + container: Matroska (libavformat)
[23:07:29]  * video track
[23:07:29]    + decoder: h264
[23:07:29]    + filters
[23:07:29]      + Framerate Shaper (2:27000000:900000)
[23:07:29]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[23:07:29]      + Crop and Scale (1920:800:140:140:0:0)
[23:07:29]        + source: 1920 * 1080, crop (140/140/0/0): 1920 * 800, scale: 1920 * 800
[23:07:29]    + strict anamorphic
[23:07:29]      + storage dimensions: 1920 * 800, mod 0
[23:07:29]      + pixel aspect ratio: 1 / 1
[23:07:29]      + display dimensions: 1920 * 800
[23:07:29]    + encoder: H.264 (libx264)
[23:07:29]      + options: vbv-maxrate=8000:vbv-bufsize=4000:crf-max=25:ref=1:weightp=1:subme=6:mixed-refs=0:rc-lookahead=30
[23:07:29]      + quality: 16.00 (RF)
[23:07:29]  * subtitle track 1, English (track 3, id 0x3) Picture [PGS] -> Passthrough
[23:07:29]  * audio track 1
[23:07:29]    + name: Chinese
[23:07:29]    + decoder: Chinese (FLAC) (5.1 ch) (track 2, id 0x2)
[23:07:29]      + samplerate: 48000 Hz
[23:07:29]    + mixdown: 5.1 Channels
[23:07:29]    + encoder: AC3 (libavcodec)
[23:07:29]      + bitrate: 640 kbps, samplerate: 48000 Hz
[23:07:29]  * audio track 2
[23:07:29]    + name: Chinese
[23:07:29]    + decoder: Chinese (FLAC) (5.1 ch) (track 2, id 0x2)
[23:07:29]      + samplerate: 48000 Hz
[23:07:29]    + mixdown: Dolby Pro Logic II
[23:07:29]    + encoder: AAC (Apple AudioToolbox)
[23:07:29]      + bitrate: 160 kbps, samplerate: 48000 Hz
[23:07:29]  * audio track 3
[23:07:29]    + name: Engish
[23:07:29]    + decoder: English (FLAC) (5.1 ch) (track 1, id 0x1)
[23:07:29]      + samplerate: 48000 Hz
[23:07:29]    + mixdown: 5.1 Channels
[23:07:29]    + encoder: AC3 (libavcodec)
[23:07:29]      + bitrate: 640 kbps, samplerate: 48000 Hz
[23:07:29]  * audio track 4
[23:07:29]    + name: Engish
[23:07:29]    + decoder: English (FLAC) (5.1 ch) (track 1, id 0x1)
[23:07:29]      + samplerate: 48000 Hz
[23:07:29]    + mixdown: Dolby Pro Logic II
[23:07:29]    + encoder: AAC (Apple AudioToolbox)
[23:07:29]      + bitrate: 160 kbps, samplerate: 48000 Hz
[23:07:29] encx264: min-keyint: 24, keyint: 240
[23:07:29] encx264: encoding at constant RF 16.000000
[23:07:29] encx264: unparsed options: vbv-maxrate=8000:vbv-bufsize=4000:crf-max=25:ref=1:weightp=1:subme=6:mixed-refs=0:rc-lookahead=30
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
x264 [info]: profile High, level 4.0

If you output an mp4 version by adding the --mp4, the subtitle passthrough switches to Render/Burn-in ... which is ok for the default Chinese + English subtitle ... but not good when playing the English sound-track as the English subtitles are burned onto the video track already.

transcode-video --crop 140:140:0:0 --mp4 --quick --big --main-audio 2=Chinese --add-audio 1=Engish --audio-width 1=double --add-subtitle 1 --no-auto-burn 'Crouching Tiger Hidden Dragon (2000).mkv'

[23:09:19] * subtitle track 1, English (track 3, id 0x3) Picture [PGS] -> Render/Burn-in

Am I doing something incorrectly?

Many thanks,
Joe

Feature Request: add command-line options (and HB inputs) to the log output

Hi Don,

Just looking through 150+ transcodes from the last month from the bash scripts/new Ruby ones and would appreciate if you could include the command (and options) as typed in the resultant output log. It would be really useful to see what was run instead of reconstructing it from the HB summary.

Also, could the --dry-run output be included too? Both of these are really useful post-transcoding especially for those of us who retain the logs and historically look back to see what was run.

Thanks again for all the hard work and for sharing these with us.
Joe

Hazel needs fulls paths for the script to work

BACKGROUND
I am getting closer building a full hands-off solution to convert movie files with
Drop in one folder, Hazel transcodes, adds subtitles and more ... final movie lands in Plex without any interaction.

I tell Hazel to run shell script on folder contens with below rule:
transcode-video --quick --add-all-subtitles --add-audio all --m4v "$1"

At first look it seems to work. But I have found out that it is unstable end often ends up with errors. After some googling I found out that:
The which command does not function as expected within a Hazel shell. What does is simply specifying the actual path of each binary and adding an exception to the checkdep function.

I have tried but my knowledge in shell is limited and I am unsure how to get this to work.

I know that I must change above rule in Hazel to
/usr/local/bin/transcode-video --quick --add-all-subtitles --add-audio all --m4v "$1"

skarmavbild 2016-01-23 kl 08 27 22

QUESTIONS

  1. How do I change all the paths in the transcode-video to full paths (eg usr/local/bin/XXXX)
  2. Is it possible to tell the script to trash the original file if the conversion was successfull and delete the converted .mv4 file if the script was unsuccesful. Needed because this is a hands-off solution and I dont want unsuccessfully transcoded movies to show up in Plex, then I would rather take the original file.

FORUM-THREAD TALKING ABOUT HAZEL AND SHELL SCRIPTS
http://www.noodlesoft.com/forums/viewtopic.php?f=4&t=1942&p=8096#p8096

Will post the whole process and get you a link when I get this to work!

Add documentation for handling when handbrake and mplayer disagree

Running detect-crop on a movie returned the following:

Results differ...

# From HandBrakeCLI:

mplayer -really-quiet -nosound -vf rectangle=1920:816:0:132 /path/to/Movie.mkv
mplayer -really-quiet -nosound -vf crop=1920:816:0:132 /path/to/Movie.mkv

transcode-video --crop 132:132:0:0 /path/to/Movie.mkv

# From mplayer:

mplayer -really-quiet -nosound -vf rectangle=1920:818:0:132 /path/to/Movie.mkv
mplayer -really-quiet -nosound -vf crop=1920:818:0:132 /path/to/Movie.mkv

transcode-video --crop 132:130:0:0 /path/to/Movie.mkv

The difference appears very minor in this case but it serves as an example. Are there details and/or a rule of thumb that can be added to the documentation on which transcode-video string would be the better choice?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.