Page 1 of 1

Want to Batch encode 28 video files

Posted: Sat Sep 22, 2018 8:36 pm
by T-buch
Description of problem or question:

I want to encode 28 video files to This Image Image http://i67.tinypic.com/rii1rb.jpg

The source file is of the container format .ts -> AVC High@L4.1, Variable Bit rate mode, Maximum bit rate: 35.0 Mb/s, 1.920 x 1.080 pixels, 16:9, 23.976 (24000/1001) FPS,
5 audio tracks / Audio Format DTS 1.509 kb/s, 6 channels 48.0 kHz
10 text stream

Windows 10

Re: Want to Batch encode 28 video files

Posted: Sat Sep 22, 2018 10:31 pm
by Woodstock
Having the actual activity log from one encode would help a lot, since then we could see what the actual structure of the input is. You describe it, but which tracks are which? Need the activity log to see how handbrake saw it.

Re: Want to Batch encode 28 video files

Posted: Sun Sep 23, 2018 9:12 am
by T-buch

Re: Want to Batch encode 28 video files

Posted: Sun Sep 23, 2018 9:15 am
by rollin_eng
Could you please post your HB logs, instructions can be found here:

https://handbrake.fr/docs/en/latest/hel ... y-log.html

Re: Want to Batch encode 28 video files

Posted: Sun Sep 23, 2018 10:47 am
by T-buch

Re: Want to Batch encode 28 video files

Posted: Sun Sep 23, 2018 3:28 pm
by Woodstock
Your source has 3 audio tracks, you say you want 5 output. That means that 1 or more of the audio tracks is used multiple times. The settings to do that vary wildly, depending on your choices. You have two different audio formats involved (DTS and DTS HD MA), both of which can be passed through, but what are the other two tracks you want to output, and which of the three is the source?

The subtitles are easy. --subtitle 1-10 will copy them to the output, assuming your output is MKV; MP4 can only have one PGS subtitle, and it must be burned in.

Re: Want to Batch encode 28 video files

Posted: Sun Sep 23, 2018 6:08 pm
by T-buch
Thanks for your reply - please see the http://oi67.tinypic.com/rii1rb.jpg Audio for what I want
first track to aac Bitrate: 96 in mono and only track 4 sub - Yes in MKV

Re: Want to Batch encode 28 video files

Posted: Sun Sep 23, 2018 7:09 pm
by Woodstock
OK, changing the rules. So, now you want 1 audio and 1 subtitle stream.

-a 1 -E av_aac -B 96 -6 mono --subtitle 4

I'd suggest executing handbrakecli with the --help parameter, and direct the output to a file that you can review. Pretty much every setting available in your current version of the CLI is explained there.

Re: Want to Batch encode 28 video files

Posted: Sun Sep 23, 2018 7:26 pm
by T-buch
Woodstock wrote: Sun Sep 23, 2018 7:09 pm OK, changing the rules. So, now you want 1 audio and 1 subtitle stream.

-a 1 -E av_aac -B 96 -6 mono --subtitle 4

I'd suggest executing handbrakecli with the --help parameter, and direct the output to a file that you can review. Pretty much every setting available in your current version of the CLI is explained there.
Okay ;-) - Thanks I guess - You can see this http://oi67.tinypic.com/rii1rb.jpg ??? (its not only the audio and subs ;-)

The problem is that I have to do this in the interface for every videofile - so I have been reeding in this forum that if you want to automatic / Batch this for all files - I have to do it in a "command line" way. But I have never tried to do it in the socalled CLI-way - and I cannot find a beginners guide :?

Re: Want to Batch encode 28 video files

Posted: Sun Sep 23, 2018 8:41 pm
by Woodstock
You can create presets in the graphic user interface (GUI) and use those for the command line interface (CLI).

The "problem" with doing batch adds in the GUI is that audio and subtitle selection is not the most flexible thing in the program. You can't easily say, "Always take the first audio track and convert it to 96k mono, and use the fourth subtitle track", if there aren't languages associated with them. That's where the command line and batch jobs/shell scripts come into play.

Everything the GUI can do, the CLI can do. But not the other way around. The question is, is 28 files worth of GUI manipulation enough effort to offset learning to use the command line to do the same thing? I cannot answer that for you.

Re: Want to Batch encode 28 video files

Posted: Mon Sep 24, 2018 6:22 am
by T-buch
Good point - and the answer is yes - OR more precisely:- but only a script with can do "take the first audio track and convert it to AAC 96k mono" and take "x" sub track (here It varies) - This I need one time (with about 25 files) in a week - so it could be good with such a script

Re: Want to Batch encode 28 video files

Posted: Mon Sep 24, 2018 7:49 am
by Woodstock
My advise would be to start with the closest preset to what you need, and save it under a new name. Make any changes to things like interlacing and such, using one of the files as a test (you do NOT have to encode the whole thing to test changes!), and save the changes to your new preset.

The CLI command --preset-import-gui will load the presets from the GUI, and --preset <string> will select the preset named <string> for use. You should be able to select the audio/subtitle tracks as above, and let the preset handle all the other details.

From the CLI help information:

Code: Select all

   -Z. --preset <string>   Select preset by name (case-sensitive)
                           Enclose names containing spaces in double quotation
                           marks (e.g. "Preset Name")
   -z, --preset-list       List available presets
   --preset-import-file <filespec>
                           Import presets from a json preset file.
                           'filespec' may be a list of files separated
                           by spaces, or it may use shell wildcards.
   --preset-import-gui     Import presets from GUI config preset file.