Getting Started with CLI

Discussion of the HandBrake command line interface (CLI)
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
gunguy7
Posts: 3
Joined: Wed Oct 22, 2014 8:21 pm

Getting Started with CLI

Post by gunguy7 »

I have been using the GUI for a while now. I wanted to give the CLI a try since just setup a ubuntu server just to see how that works. I am just using a basic encode to get started and it isn't working. HandBrakeCLI -i source -o destination

Is anyone willing to give me a clue what the problem is? Thanks in advance

HandBrakeCLI -i /home/doug/mkv/iceage -o /home/doug/movies/iceage.mp4
[15:14:42] hb_init: starting libhb thread
HandBrake rev5474 (2014032499) - Linux i686 - http://handbrake.fr
1 CPU detected
Opening /home/doug/mkv/iceage...
[15:14:42] hb_scan: path=/home/doug/mkv/iceage, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /home/doug/mkv/iceage/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /home/doug/mkv/iceage/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(/home/doug/mkv/iceage) failed
[15:14:42] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 4.2.1
libdvdread: Couldn't find device name.
libdvdnav:DVDOpenFilePath:findDVDFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFilePath:findDVDFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[15:14:42] dvd: not a dvd - trying as a stream/file instead
[15:14:42] batch: scanning /home/doug/mkv/iceage/title11.mkv
Input #0, matroska,webm, from '/home/doug/mkv/iceage/title11.mkv':
Duration: 00:10:51.11, start: 0.000000, bitrate: N/A
Chapter #0.0: start 0.000000, end 138.371567
Metadata:
title : Chapter 01
Chapter #0.1: start 138.371567, end 256.556300
Metadata:
title : Chapter 02
Chapter #0.2: start 256.556300, end 458.791667
Metadata:
title : Chapter 03
Chapter #0.3: start 458.791667, end 651.117133
Metadata:
title : Chapter 04
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, 29.97 tbr, 1k tbn, 59.94 tbc
Stream #0.1(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)
Metadata:
title : Stereo
[15:14:43] scan: decoding previews for title 1 (/home/doug/mkv/iceage/title11.mkv)
Input #0, matroska,webm, from '/home/doug/mkv/iceage/title11.mkv':
Duration: 00:10:51.11, start: 0.000000, bitrate: N/A
Chapter #0.0: start 0.000000, end 138.371567
Metadata:
title : Chapter 01
Chapter #0.1: start 138.371567, end 256.556300
Metadata:
title : Chapter 02
Chapter #0.2: start 256.556300, end 458.791667
Metadata:
title : Chapter 03
Chapter #0.3: start 458.791667, end 651.117133
Metadata:
title : Chapter 04
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, 29.97 tbr, 1k tbn, 59.94 tbc
Stream #0.1(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)
Metadata:
title : Stereo
[15:14:43] scan: audio 0x1: AC-3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch)
[15:14:43] scan: 10 previews, 720x480, 23.976 fps, autocrop = 58/62/0/0, aspect 1.78:1, PAR 32:27
[15:14:43] libhb: scan thread found 1 valid title(s)
+ title 1:
+ stream: /home/doug/mkv/iceage/title11.mkv
+ duration: 00:10:51
+ size: 720x480, pixel aspect: 32/27, display aspect: 1.78, 23.976 fps
+ autocrop: 58/62/0/0
+ chapters:
+ 1: cells 0->0, 0 blocks, duration 00:02:18
+ 2: cells 0->0, 0 blocks, duration 00:01:58
+ 3: cells 0->0, 0 blocks, duration 00:03:22
+ 4: cells 0->0, 0 blocks, duration 00:03:12
+ audio tracks:
+ 1, English (AC3) (2.0 ch) (iso639-2: eng), 48000Hz, 192000bps
+ subtitle tracks:
[15:14:43] 1 job(s) to process
[15:14:43] starting job
[15:14:43] work: mixdown not specified, track 1 setting mixdown Stereo
[15:14:43] work: bitrate not specified, track 1 setting bitrate 160 Kbps
[15:14:43] sync: expecting 15611 video frames
ERROR: Invalid audio codec: 0x100
[15:14:43] render: lost time: 0 (0 frames)
[15:14:43] render: gained time: 0 (0 frames) (0 not accounted for)
[15:14:43] libhb: work result = 0

Encode done!

HandBrake has exited.
Woodstock
Veteran User
Posts: 4619
Joined: Tue Aug 27, 2013 6:39 am

Re: Getting Started with CLI

Post by Woodstock »

Does the input file name really not have an extension?
User avatar
JohnAStebbins
HandBrake Team
Posts: 5723
Joined: Sat Feb 09, 2008 7:21 pm

Re: Getting Started with CLI

Post by JohnAStebbins »

Woodstock wrote:Does the input file name really not have an extension?
He's batch scanning a directory, which is probably not what he wants, but it finds the mkv file in it during scan. I'm not sure what happens when you do batch scan and then don't specifiy a title number with the "-t N" option. Perhaps this is the issue, but the error message in the log isn't very helpful :(

Code: Select all

ERROR: Invalid audio codec: 0x100
gunguy7
Posts: 3
Joined: Wed Oct 22, 2014 8:21 pm

Re: Getting Started with CLI

Post by gunguy7 »

I have tried just using the title00.mkv as the source and does the same thing.

doug@deadeye-ubuntu:~/movies$ HandBrakeCLI -i /home/doug/mkv/iceage/title04.mkv -o /home/doug/movies/iceage
Output format couldn't be guessed from file name, using default.
[15:13:22] hb_init: starting libhb thread
HandBrake rev5474 (2014032499) - Linux i686 - http://handbrake.fr
1 CPU detected
Opening /home/doug/mkv/iceage/title04.mkv...
[15:13:22] hb_scan: path=/home/doug/mkv/iceage/title04.mkv, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /home/doug/mkv/iceage/title04.mkv/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening /home/doug/mkv/iceage/title04.mkv/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(/home/doug/mkv/iceage/title04.mkv) failed
[15:13:22] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 4.2.1
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav: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:13:22] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/home/doug/mkv/iceage/title04.mkv':
Duration: 01:27:47.09, start: 0.000000, bitrate: N/A
Chapter #0.0: start 0.000000, end 204.037167
Metadata:
title : Chapter 01
Chapter #0.1: start 204.037167, end 307.307000
Metadata:
title : Chapter 02
Chapter #0.2: start 307.307000, end 573.406167
Metadata:
title : Chapter 03
Chapter #0.3: start 573.406167, end 788.788000
Metadata:
title : Chapter 04
Chapter #0.4: start 788.788000, end 955.321033
Metadata:
title : Chapter 05
Chapter #0.5: start 955.321033, end 1102.634867
Metadata:
title : Chapter 06
Chapter #0.6: start 1102.634867, end 1343.709033
Metadata:
title : Chapter 07
Chapter #0.7: start 1343.709033, end 1556.555000
Metadata:
title : Chapter 08
Chapter #0.8: start 1556.555000, end 1757.956200
Metadata:
title : Chapter 09
Chapter #0.9: start 1757.956200, end 1977.642333
Metadata:
title : Chapter 10
Chapter #0.10: start 1977.642333, end 2174.338833
Metadata:
title : Chapter 11
Chapter #0.11: start 2174.338833, end 2321.652667
Metadata:
title : Chapter 12
Chapter #0.12: start 2321.652667, end 2628.792833
Metadata:
title : Chapter 13
Chapter #0.13: start 2628.792833, end 2729.727000
Metadata:
title : Chapter 14
Chapter #0.14: start 2729.727000, end 2978.976000
Metadata:
title : Chapter 15
Chapter #0.15: start 2978.976000, end 3229.559667
Metadata:
title : Chapter 16
Chapter #0.16: start 3229.559667, end 3442.939500
Metadata:
title : Chapter 17
Chapter #0.17: start 3442.939500, end 3751.080667
Metadata:
title : Chapter 18
Chapter #0.18: start 3751.080667, end 4088.417667
Metadata:
title : Chapter 19
Chapter #0.19: start 4088.417667, end 4270.466200
Metadata:
title : Chapter 20
Chapter #0.20: start 4270.466200, end 4394.723667
Metadata:
title : Chapter 21
Chapter #0.21: start 4394.723667, end 4613.442167
Metadata:
title : Chapter 22
Chapter #0.22: start 4613.442167, end 4763.091667
Metadata:
title : Chapter 23
Chapter #0.23: start 4763.091667, end 5267.095167
Metadata:
title : Chapter 24
Stream #0.0(eng): Video: mpeg2video (Main), yuv420p, 720x480 [PAR 32:27 DAR 16:9], 9801 kb/s, PAR 186:157 DAR 279:157, 29.97 fps, 29.97 tbr, 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): 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(fre): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Metadata:
title : Stereo
Stream #0.5(eng): Subtitle: dvdsub (default)
Stream #0.6(spa): Subtitle: dvdsub
Stream #0.7(spa): Subtitle: dvdsub
Stream #0.8(fre): Subtitle: dvdsub
[15:13:22] scan: decoding previews for title 1
[15:13:22] scan: audio 0x1: AC-3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
[15:13:22] scan: audio 0x2: AC-3, rate=48000Hz, bitrate=384000 English (AC3) (5.1 ch)
[15:13:22] scan: audio 0x3: AC-3, rate=48000Hz, bitrate=192000 Espanol (AC3) (Dolby Surround)
[15:13:22] scan: audio 0x4: AC-3, rate=48000Hz, bitrate=192000 Francais (AC3) (Dolby Surround)
[15:13:22] scan: 10 previews, 720x480, 23.976 fps, autocrop = 58/62/0/2, aspect 1.78:1, PAR 32:27
[15:13:22] libhb: scan thread found 1 valid title(s)
+ title 1:
+ stream: /home/doug/mkv/iceage/title04.mkv
+ duration: 01:27:47
+ size: 720x480, pixel aspect: 32/27, display aspect: 1.78, 23.976 fps
+ autocrop: 58/62/0/2
+ chapters:
+ 1: cells 0->0, 0 blocks, duration 00:03:24
+ 2: cells 0->0, 0 blocks, duration 00:01:43
+ 3: cells 0->0, 0 blocks, duration 00:04:26
+ 4: cells 0->0, 0 blocks, duration 00:03:35
+ 5: cells 0->0, 0 blocks, duration 00:02:47
+ 6: cells 0->0, 0 blocks, duration 00:02:27
+ 7: cells 0->0, 0 blocks, duration 00:04:01
+ 8: cells 0->0, 0 blocks, duration 00:03:33
+ 9: cells 0->0, 0 blocks, duration 00:03:21
+ 10: cells 0->0, 0 blocks, duration 00:03:40
+ 11: cells 0->0, 0 blocks, duration 00:03:17
+ 12: cells 0->0, 0 blocks, duration 00:02:27
+ 13: cells 0->0, 0 blocks, duration 00:05:07
+ 14: cells 0->0, 0 blocks, duration 00:01:41
+ 15: cells 0->0, 0 blocks, duration 00:04:09
+ 16: cells 0->0, 0 blocks, duration 00:04:11
+ 17: cells 0->0, 0 blocks, duration 00:03:33
+ 18: cells 0->0, 0 blocks, duration 00:05:08
+ 19: cells 0->0, 0 blocks, duration 00:05:37
+ 20: cells 0->0, 0 blocks, duration 00:03:02
+ 21: cells 0->0, 0 blocks, duration 00:02:04
+ 22: cells 0->0, 0 blocks, duration 00:03:39
+ 23: cells 0->0, 0 blocks, duration 00:02:30
+ 24: cells 0->0, 0 blocks, duration 00:08:24
+ audio tracks:
+ 1, English (AC3) (5.1 ch) (iso639-2: eng), 48000Hz, 448000bps
+ 2, English (AC3) (5.1 ch) (iso639-2: eng), 48000Hz, 384000bps
+ 3, Espanol (AC3) (Dolby Surround) (iso639-2: spa), 48000Hz, 192000bps
+ 4, Francais (AC3) (Dolby Surround) (iso639-2: fra), 48000Hz, 192000bps
+ subtitle tracks:
+ 1, English (iso639-2: eng) (Bitmap)(VOBSUB)
+ 2, Spanish (iso639-2: spa) (Bitmap)(VOBSUB)
+ 3, Spanish (iso639-2: spa) (Bitmap)(VOBSUB)
+ 4, French (iso639-2: fra) (Bitmap)(VOBSUB)
[15:13:22] 1 job(s) to process
[15:13:22] starting job
[15:13:22] work: mixdown not specified, track 1 setting mixdown Dolby Pro Logic II
[15:13:22] work: bitrate not specified, track 1 setting bitrate 160 Kbps
[15:13:22] sync: expecting 126283 video frames
ERROR: Invalid audio codec: 0x100
[15:13:22] render: lost time: 0 (0 frames)
[15:13:22] render: gained time: 0 (0 frames) (0 not accounted for)
[15:13:23] libhb: work result = 0

Encode done!

HandBrake has exited.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: Getting Started with CLI

Post by mduell »

gunguy7 wrote:I have tried just using the title00.mkv as the source and does the same thing.

doug@deadeye-ubuntu:~/movies$ HandBrakeCLI -i /home/doug/mkv/iceage/title04.mkv -o /home/doug/movies/iceage
Output format couldn't be guessed from file name, using default.
[15:13:22] hb_init: starting libhb thread
HandBrake rev5474 (2014032499) - Linux i686 - http://handbrake.fr
Where did you get this 7 month old build?

Update to the current nightly or beta from the official HB repo (not some Ubuntu-provided broken build).
Smithcraft
Veteran User
Posts: 2697
Joined: Thu Jan 22, 2009 8:04 pm

Re: Getting Started with CLI

Post by Smithcraft »

Am I missing it, or are no encode settings being given to Handbrake to encode the source with?

SC
Deleted User 11865

Re: Getting Started with CLI

Post by Deleted User 11865 »

The (pretty horrible) defaults would be used then.
gunguy7
Posts: 3
Joined: Wed Oct 22, 2014 8:21 pm

Re: Getting Started with CLI

Post by gunguy7 »

I tried some encoding settings, but then went back to the default just to see if I could get it to do anything. I will try to update it, I just followed another thread on installing it. Thanks for the help
Post Reply