Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

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
DUGUJACK
Posts: 7
Joined: Wed May 01, 2019 1:31 pm

Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

Post by DUGUJACK » Wed May 01, 2019 2:06 pm

Description of problem or question:

Run handbrakecli.exe and it exits automatically after a few seconds.I don't how to run the cli because it just exits.

Steps to reproduce the problem (If Applicable):

Run handbrakecli.exe from the commandline

HandBrake version (e.g., 1.0.0):

1.2.2 CLI


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

Windows 10 RS4(10.0.17134)

HandBrake Activity Log ***required*** (see How-to get an activity log)

Cannot load nvEncodeAPI64.dll
Cannot load nvEncodeAPI64.dll
Cannot load nvEncodeAPI64.dll
Cannot load nvEncodeAPI64.dll
[21:26:59] hb_init: starting libhb thread
[21:26:59] thread 47a9910 started ("libhb")
Missing input device. Run d:/HandBrakeCLI-1.2.2-win-x86_64/HandBrakeCLI.exe --help for syntax.

HandBrake has exited.


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

Re: Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

Post by Woodstock » Wed May 01, 2019 6:09 pm

The Command Line Interface is just that - something you use from the CMD prompt. Clicking on it won't work, because you aren't telling it what to do.

DUGUJACK
Posts: 7
Joined: Wed May 01, 2019 1:31 pm

Re: Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

Post by DUGUJACK » Thu May 02, 2019 6:42 pm

Woodstock wrote:
Wed May 01, 2019 6:09 pm
The Command Line Interface is just that - something you use from the CMD prompt. Clicking on it won't work, because you aren't telling it what to do.
Now I know how to use it to encode the video with a bat file after watching a video of YouTube(https://www.youtube.com/watch?v=zn6k4YuQR98&t=81s). But I still can't run it with CMD prompt. And I also tried to run it with PowerShell, but it didn't perform better than CMD prompt except not exiting automatically. It seems that you can also encode the video with a ps1 file though I don't fingure it out yet(https://www.youtube.com/watch?v=EVEpjKLXvBo&t=194s). So I still don't know how to use the Command line such as "help". After downloading the nvEncodeAPI64.dll and putting it into the SysWOW64 folder, I couldn't register it because it was invalid. I wonder if it's my NoteBook which can't get or register the nvEncodeAPI64.dll because it's supposed to be there with the update of NVIDIA Geforce Experience(My GPUs are Intel UHD 620 and NVIDIA Geforce MX150).

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

Re: Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

Post by Woodstock » Fri May 03, 2019 3:13 am

If you've always worked using a graphic user interface, the command line is VERY different. It doesn't present any way for you to control it, other than what you present to it when opening it. The reward for learning to use it can be great, but the learning is often difficult.

Here is one line out of a batch file I used a couple of weeks ago:
title %time% TeasingMaster HD01 & "C:\Program Files\Handbrake\HandBrakeCLI.exe" -i "Z:\Teasing Master Takagi-San\Teasing Master Takagi-San HD01.mkv" -o "V:\anime\dubbed\t\Teasing Master Takagi-San\Teasing Master Takagi-San HD01.mkv" -f mkv --loose-anamorphic --modulus 2 -e x264 -q 20 --vfr -a 1,2,3,4 -E ac3,copy:dts,ac3,copy:dts -6 dpl2,none,dpl2,none -R Auto,Auto,48,Auto -B 160,0,160,0 -D 0,0,0,0 --gain 0,0,0,0 --audio-fallback ac3 --subtitle 2,1 --markers="C:\Users\username\AppData\Local\Temp\Teasing Master Takagi-San HD01-1-chapters.csv" --encoder-preset=slow --encoder-profile=main --verbose=1
The first part just puts some information in the "title" part of the CMD window the process is running in. The part in this color is the path to the executable, which will vary with where you installed it. This color depicts the "basic" arguments to HandbrakeCLI.exe; -i tells the CLI the path and name of the source file. -o gives the path and name of the output file, and -f says what type of file to use for the output.

The balance of the line is really optional, but it tells the CLI which audio streams to include, parameters about them, which subtitle strings to include, where to find a list of "chapter marker names", and some choices to use for the encoder. These are the things that the GUI and presets can do for you, but the CLI requires you to make choices yourself.

You CAN make use of GUI presets, but you will really want to use the GUI to try those presets out before incorporating them into CLI commands.

I highly recommend picking a portion of a video and try encoding it with different parameters, then viewing the results. You can use the -c command to specify a subset of chapters, like -c 1-2 to only encode chapters 1 and 2 of a longer video.

I find that the same command line, with just a change of the file names, works for "almost everything" published by particular vendors - Funimation usually puts the Forced/Everything subtitle tracks as 2/1, respectively, so most batch jobs I use for Funimation titles have --subtitle 2,1 as part of them.

Oh, and do this command from the CMD prompt to get the CLI help into a file you can view or print:

Code: Select all

"C:\Program Files\Handbrake\HandBrakeCLI.exe" -h >"c:\some\filename.txt"
"c:\some\filename.txt" has to be a valid path on your system.

DUGUJACK
Posts: 7
Joined: Wed May 01, 2019 1:31 pm

Re: Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

Post by DUGUJACK » Fri May 03, 2019 3:32 am

Woodstock wrote:
Fri May 03, 2019 3:13 am
If you've always worked using a graphic user interface, the command line is VERY different. It doesn't present any way for you to control it, other than what you present to it when opening it. The reward for learning to use it can be great, but the learning is often difficult.

Here is one line out of a batch file I used a couple of weeks ago:
title %time% TeasingMaster HD01 & "C:\Program Files\Handbrake\HandBrakeCLI.exe" -i "Z:\Teasing Master Takagi-San\Teasing Master Takagi-San HD01.mkv" -o "V:\anime\dubbed\t\Teasing Master Takagi-San\Teasing Master Takagi-San HD01.mkv" -f mkv --loose-anamorphic --modulus 2 -e x264 -q 20 --vfr -a 1,2,3,4 -E ac3,copy:dts,ac3,copy:dts -6 dpl2,none,dpl2,none -R Auto,Auto,48,Auto -B 160,0,160,0 -D 0,0,0,0 --gain 0,0,0,0 --audio-fallback ac3 --subtitle 2,1 --markers="C:\Users\username\AppData\Local\Temp\Teasing Master Takagi-San HD01-1-chapters.csv" --encoder-preset=slow --encoder-profile=main --verbose=1
The first part just puts some information in the "title" part of the CMD window the process is running in. The part in this color is the path to the executable, which will vary with where you installed it. This color depicts the "basic" arguments to HandbrakeCLI.exe; -i tells the CLI the path and name of the source file. -o gives the path and name of the output file, and -f says what type of file to use for the output.

The balance of the line is really optional, but it tells the CLI which audio streams to include, parameters about them, which subtitle strings to include, where to find a list of "chapter marker names", and some choices to use for the encoder. These are the things that the GUI and presets can do for you, but the CLI requires you to make choices yourself.

You CAN make use of GUI presets, but you will really want to use the GUI to try those presets out before incorporating them into CLI commands.

I highly recommend picking a portion of a video and try encoding it with different parameters, then viewing the results. You can use the -c command to specify a subset of chapters, like -c 1-2 to only encode chapters 1 and 2 of a longer video.

I find that the same command line, with just a change of the file names, works for "almost everything" published by particular vendors - Funimation usually puts the Forced/Everything subtitle tracks as 2/1, respectively, so most batch jobs I use for Funimation titles have --subtitle 2,1 as part of them.

Oh, and do this command from the CMD prompt to get the CLI help into a file you can view or print:

Code: Select all

"C:\Program Files\Handbrake\HandBrakeCLI.exe" -h >"c:\some\filename.txt"
"c:\some\filename.txt" has to be a valid path on your system.
Thank you so much for your quick reply, I will try it later when I have spare time.

DUGUJACK
Posts: 7
Joined: Wed May 01, 2019 1:31 pm

Re: Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

Post by DUGUJACK » Wed May 08, 2019 1:56 pm

It seems that x265_10bit and x265_12bit don't support two-pass mode both in HandBrakecli and HandBrake GUI, and I also hope that HandBrake can support an ass file and pass-through video without conversion as a brilliant video transcoder, because MeGUI, ShanaEncoder and MKVtoolnix can all do so.

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

Re: Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

Post by Woodstock » Wed May 08, 2019 5:31 pm

Support for .ssa files being imported is coming (in nightly builds now, waiting for v1.3 to be released).

Support for "video pass-through" is not.

mduell
Veteran User
Posts: 6680
Joined: Sat Apr 21, 2007 8:54 pm

Re: Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

Post by mduell » Wed May 08, 2019 6:05 pm

DUGUJACK wrote:
Wed May 08, 2019 1:56 pm
pass-through video without conversion as a brilliant video transcoder
You can stop there. A video transcoder isn't going to do video passthrough because that's not video transcoding. HandBrake is a video transcoder.

If you want some more flexible muxer that may also perform transforms on some streams, use one of the many existing applications targeting that.

DUGUJACK
Posts: 7
Joined: Wed May 01, 2019 1:31 pm

Re: Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

Post by DUGUJACK » Thu May 09, 2019 12:35 pm

Woodstock wrote:
Wed May 08, 2019 5:31 pm
Support for .ssa files being imported is coming (in nightly builds now, waiting for v1.3 to be released).

Support for "video pass-through" is not.
I konw it, and Nightly version adds two more languages—Chinese and French. However, after saving ASS as SSA with Aeguisub, I find that SSA doesn't support some effects which ASS has. Actually, ASS is the advanced version of SSA and it absolutely has more effects. So I have to burn ASS into video with MeGUI. But MeGUI's MP4 muxer can't pass-through E-AC3. In order to pass-through E-AC3 in MP4, I merge(mux) video and audio(E-A3) into MKV. Then I import MKV into HnadBrake GUI, but I have to encode the video again. Thus, I also want video to be pass-throughed without conversion. :x

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

Re: Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

Post by Woodstock » Thu May 09, 2019 1:19 pm

I've processed .ass subtitles that were embedded in the source MKV file for several years. Which "advanced effects" are you referring to, that aren't supported by handbrake? Burned-in .ass subtitles have animation effects that I have been unable to get to display on players that claim to handle Advanced SubStation Alpha files. As long as the fonts needed for that are embedded in the source along with the .ass stream.

Embedded fonts are one thing that importing the file (not embedded in source) isn't supported, though.

User avatar
JohnAStebbins
HandBrake Team
Posts: 5442
Joined: Sat Feb 09, 2008 7:21 pm

Re: Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

Post by JohnAStebbins » Thu May 09, 2019 1:40 pm

Woodstock wrote:
Thu May 09, 2019 1:19 pm
Embedded fonts are one thing that importing the file (not embedded in source) isn't supported, though.
Hmm, good point. Maybe someone should open an 'enhancement' issue for this. :mrgreen:

DUGUJACK
Posts: 7
Joined: Wed May 01, 2019 1:31 pm

Re: Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

Post by DUGUJACK » Thu May 09, 2019 7:20 pm

I attempted to burn ASS file which was embedded in the source MKV file before, but It turned out that the Italic effect could't be processed properly because there were two "<i>" words appearing both in the beginning and the ending of all "Italic" lines of the subtitle. Of course, the rest text of those lines weren't Italic.

User avatar
Ritsuka
HandBrake Team
Posts: 1064
Joined: Fri Jan 12, 2007 11:29 am

Re: Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

Post by Ritsuka » Thu May 09, 2019 7:47 pm

"<i>" doesn't mean italic in the ASS subtitles format.

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

Re: Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

Post by Woodstock » Fri May 10, 2019 2:58 am

JohnAStebbins wrote:
Thu May 09, 2019 1:40 pm
Hmm, good point. Maybe someone should open an 'enhancement' issue for this. :mrgreen:
You can't enhance a feature until it officially exists. ;)

I could post a feature request, but I won't have any logs, and probably no samples, to post with it. The OP on this topic probably has samples, though.


DUGUJACK
Posts: 7
Joined: Wed May 01, 2019 1:31 pm

Re: Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

Post by DUGUJACK » Sat Jun 01, 2019 10:15 am

Ritsuka wrote:
Thu May 09, 2019 7:47 pm
"<i>" doesn't mean italic in the ASS subtitles format.
Actually, you can make it italic simply with ''<i>'' which can be displayed correctly by video players and subtitle editors. However, it may can't be burned properly by video encoders such as HandBrake and ShanaEncoder.

User avatar
Ritsuka
HandBrake Team
Posts: 1064
Joined: Fri Jan 12, 2007 11:29 am

Re: Cannot load nvEncodeAPI64.dll and Cannot run the handbrakecli.exe

Post by Ritsuka » Sat Jun 01, 2019 2:24 pm

Maybe in SRT, but italic in ASS doesn't work that way.

Post Reply