Open TheNickOfTime opened 3 months ago
hi, I am using the docker version(jlesage/handbrake:v24.09.1) of handbrake(v1.8.2) in my NAS, with intel N5105 CPU. I duplicated the default hardware preset 'H.265 QSV', and export it from GUI, it shows: "VideoEncoder": "qsv_h265", then import it into this app, the Encoder part is missing in my preset: the wired thing is that it still works, but exit after several minutes transcoding, with a 100-200M mp4 file left.
when I export it with the cli, HandBrakeCLI --preset-export 'preset name' however, it shows: "VideoEncoder": "x264", not sure if it is a bug of cli.
hope this helps. really want to use your web app for transcoding, the docker version is quite difficult for using, from GUI PoV, but it works. please just ask if you need more information.
br
hi, it turns out that the cli export is not an exporting but a creation. that's why the exported one is using the x264 encoder.
br
Hi, for the other encoders, here is my exported presets from handbrake1.8.1 presets.json
hi, @TheNickOfTime I did some test and found out there might be some bugs with hb cli, it always fails with preset, but work with the cli options, so I did some changes in code to hardcode to use the cli opts for my transcoding.
if (jobData.preset_id == '2m-x265') {
jobLogger.info(
`[worker] with preset 2m-x265, ${jobData.preset_id}, using qsv_h265 encoder.`
);
handbrake = spawn('HandBrakeCLI', [
'-e',
'qsv_h265',
'-b',
'2000',
'-B',
'160',
'-x',
'lowpower=1:force-cqp=1',
'-i',
jobData.input_path,
'-o',
tempOutputName,
'--json',
]);
} else if (jobData.preset_id == '4m-x265') {
jobLogger.info(
`[worker] with preset 4m-x265, ${jobData.preset_id}, using qsv_h265 encoder.`
);
handbrake = spawn('HandBrakeCLI', [
'-e',
'qsv_h265',
'-b',
'4000',
'-B',
'160',
'-x',
'lowpower=1:force-cqp=1',
'-i',
jobData.input_path,
'-o',
tempOutputName,
'--json',
]);
} else {
jobLogger.info(`[worker] with another preset, using ${jobData.preset_id}`);
handbrake = spawn('HandBrakeCLI', [
'--preset-import-file',
presetPath!,
'--preset',
jobData.preset_id,
'-i',
jobData.input_path,
'-o',
tempOutputName,
'--json',
]);
and it works well.
I suggest maybe you can add the cli opts in the preset creation feature, we can create a simplified preset with a few of opts. and here are some other suggestions:
really like your work, appreciate it if you can consider my suggestions. (I used to work on backend development with Java and Golang, not good at typescript, but I am trying to do the changes in my local env)
br
Michael
Thank you for this information, as far as the encoder not appearing in the UI goes - that's definitely what is covered by this issue. In terms of the preset not exporting properly, I'll have to look into it. I need to look at the code, but I'm pretty sure when a preset is imported, no modifications are applied so the program shouldn't be changing any of the preset options.
I'll look into updating the handbrake version, right now it is just using the version available in the Debian repo.
This is a byproduct of how HandBrake itself handles exposing presets to users - if HandBrake cannot detect a type of hardware encoding is available, it disables/obfuscates the information about that hardware transcoder.
This is the case via the desktop version of HandBrake, which leaves the default presets .json file with a blank encoder value. This is also the case for the CLI, which when using the command
HandBrakeCLI --preset-export 'preset name'
will say the encoder is simply 'x264'.Unfortunately HandBrake's own documentation must have been written by someone who has an nvidia machine, because their own CLI reference only lists nvidia hardware encoders. While I could likely guess at what these values are based on how other presets are formatted, I would prefer to leave them blank until I have a more definitive answer.
I believe the current list of unknown encoders is:
If you find yourself using a platform where you could provide any of this information here is how to help:
Desktop
CLI
HandBrakeCLI --preset-export 'preset name'
If you are able to obtain any of that information (even the unsupported encoders), it would be great if you could leave a comment below!