Page 1 of 1

converting large library to HEVC

Posted: Thu Mar 14, 2019 5:27 am
by lvving
Description of problem or question:
I'm looking for a way to convert a large library consisting of mostly MKV and MP4 in x264 format. Some of the MKV have multiple audio tracks and/or chapters and/or subtitles. I would like to only convert the video to HEVC but keep everything else the exact same including multiple audio tracks if they exist and multiple subtitles if they exist.
The part I can't figure out is how to have all of the audio tracks, if there is more than one, copied. Right now, I can only seem to have the first track copied. I don't really care about non-English tracks but some of the MKVs have both AC3 and/or DTS and/or Dolby Atmos and I would like to leave them all untouched. I did create a profile and I am pointing to it via my CLI but it seems to ignore any audio track past the first it encounters. I'm hoping someone can whip up a simple CLI way to do this. I can't seem to get it right.

HandBrake version (e.g., 1.0.0):
Using the 1.2.2 CLI version.

Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Windows 2012

Re: converting large library to HEVC

Posted: Thu Mar 14, 2019 7:12 am
by Woodstock
You can specify a range of audio tracks, and can specify "copy" as the encoder. As long as your source tracks use codecs that are allowed for "passthru" to your destination container.

Re: converting large library to HEVC

Posted: Thu Mar 14, 2019 2:19 pm
by lvving
This is what I just started using and it seems to be working so far. I found another post in a different forum of someone trying to do something similar.
HandBrakeCLI.exe -i <input file> -e x265 --encoder-preset medium --encoder-profile main -x strong-intra-smoothing=0:rect=0 -q 20 --all-audio --audio-lang-list eng --all-subtitles --subtitle-lang-list eng -E copy -o <output file>

Re: converting large library to HEVC

Posted: Sat Mar 23, 2019 4:49 pm
by vincen
lvving wrote: Thu Mar 14, 2019 2:19 pm This is what I just started using and it seems to be working so far. I found another post in a different forum of someone trying to do something similar.
Would you mind to share your process for doing your large batch conversions ? as I'm in similar situation with a very large video library and lot of mix of formats and to save space (whatever time it takes to convert as I have a lot of power avalaible on server where they are hosted) I'd like to convert everything in H265 ;)

Thanks

Re: converting large library to HEVC

Posted: Wed Sep 25, 2019 7:43 pm
by lvving
vincen wrote: Sat Mar 23, 2019 4:49 pm
lvving wrote: Thu Mar 14, 2019 2:19 pm This is what I just started using and it seems to be working so far. I found another post in a different forum of someone trying to do something similar.
Would you mind to share your process for doing your large batch conversions ? as I'm in similar situation with a very large video library and lot of mix of formats and to save space (whatever time it takes to convert as I have a lot of power avalaible on server where they are hosted) I'd like to convert everything in H265 ;)

Thanks
I converted almost all of my MKV movies to H265 using FFMPEG. There were a few that FFMPEG wasn't able to that I did with handbrake CLI instead. The FFMPEG command I used was:
ffmpeg -n -stats -i "input.mkv" -map 0:v -map 0:a -c:v hevc -crf 20 -c:a copy -c:s copy -threads 4 "output.mkv"

The handbrake cli command I used was:
HandBrakeCLI.exe -i "input.mkv" -e x265 --encoder-preset medium --encoder-profile main -x strong-intra-smoothing=0:rect=0 -q 20 --all-audio --audio-lang-list eng --all-subtitles --subtitle-lang-list eng -E copy -o "output.mkv"

FWIW, FFMPEG seems to be significantly faster.

Re: converting large library to HEVC

Posted: Wed Sep 25, 2019 8:29 pm
by mduell
Different settings will get you different speeds.

Re: converting large library to HEVC

Posted: Wed Sep 25, 2019 8:40 pm
by s55
significantly different at that. HandBrakeCLI has default settings that your not accounting for.