I’m hoping someone could shed some light as to what’s going on here.
I was able to get Handbrake installed on my Synology DS920+ NAS with Intel Quick Sync support. Using the exact same settings that I do on my local installation of Handbrake, the file size and end results appear vastly different.
I’ve tested different video files, but also the exact same one.
For example:
- Original file H.264 1.3 GiB 18.1MBits/s bitrate
- Handbrake local H.265 459 MiB 6.42 Mbits/s bitrate
- Handbrake docker H.265 973 MiB 13.6 Mbits/s bitrate
My settings are:
- Video encoder: H.265 (Intel QSV)
- Framerate: Same as source
- Variable framerate
- Preset: Quality
- Constant Quality: ICQ 32
- Multi-pass encoding enabled.
- Profile: Auto
- Level: Auto
- Filters: off
- Dimensions: default (no resize, rescale, etc.)
- Audio: AAC (avcodec) (mono)
- Web optimized: Yes
- Align A/V start: Yes
- Passthrough Common Metadata: Yes
Is there an oversight that I’m missing that could explain this? I’d rather use the Docker version, since it doesn’t tie up my main laptop.
If all the settings and versions match, my first suspicion would be that there’s some library available on one system that gets used but not the other. Have you taken very verbose logs to see if there’s differences that stand out?
Have you taken very verbose logs to see if there’s differences that stand out?
Nope, but that could be a next step. I was hoping for an easy fix (like I did something wrong in the settings).
Realistically, if this can’t be solved by using the built-in setting options, then it’s not worth the trouble to “fix” anything. It still works, so I’m glad to have the option.
I had a few ideas, I’m suspicious that handbrake is falling back to CPU, maybe check the logs of the container to make sure it isn’t falling back to CPU decoding. Otherwise here are a few things I would check next:
- If you are not using docker locally so you are already doing this, you will need to configure the docker container to pass through the GPU for quicksync to work inside the container.
- If you are already doing that then I would make sure the device is the same name on the synology, it probably is but just to be sure.
- you will likely need to add your user to the video and/or render group on the synology if you haven’t, especially if you are running the container as your user instead of root
- make sure you are reading and writing to volumes that use bind mounts and not docker volumes, overlayfs is not what I would call fast and writing especially.
Thanks for the ideas.
GPU does seem to be passed onto the docker container, not only because of the dramatic increase in speed, but also because the CPU isn’t being maxed out like it was before adding the GPU hardware line.
Volumes are bind mounts.
I experimented with permissions and user groups, and noticed no difference to the behaviour in render output.
For these videos, quality isn’t super important, but file size is. I spent most of yesterday tweaking settings on my local Handbrake install to get the right balance. So, I assumed transferring the settings over would give the same results.
Are you running different versions of the software? (e.g. different versions of ffmpeg, maybe?)
Same version of Handbrake (1.9.2), but I’m not even sure how to check for the ffmpeg version on my NAS, or what Handbrake is using. The system panel in the Handbrake info window doesn’t list ffmpeg at all.
IIRC, presets are machine dependent, or at least they are optimized for the hardware. So if you have a weak machine, veryfast will use even worse encoding because you’re simply saying “I just want it done fast”, while on a more robust machine it may take more liberties. To match it completely I think you need to disregard the presets and set everything yourself, like CRF and everything.
To match it completely I think you need to disregard the presets and set everything yourself, like CRF and everything.
Is there a way to disable the preset completely? There’s no “none” option, just “speed, balanced, and quality”, but I set everything else up manually.
Sorry I usually work directly with ffmpeg and that’s how I had the hunch, those presets are h264 presets that go in. But does it matter, you said you were only curious, I think that’s why, so now you know
What are the specs, hardware wise, of both your laptop and your nas?
The NAS (Synology DS920+):
- CPU: Intel Celeron J4125 4-core 2.0 GHz, burst up to 2.7 GHz
- RAM: upgraded to 20GB
- NVME cache: 256GB
- HDD are all Seagate ironwolf 8GB x 3 and a 4TB.
Laptop (Framework 13 11th Gen intel):
- CPU: Intel Core i5-1135G7 (integrated Iris Xe Graphics 80EU)
- RAM: 64GB
- Storage: 2TB WD Black 770
I would expect a difference in speed between the two, but does the hardware affect the output quality/size if the settings are identical?
but does the hardware affect the output quality/size if the settings are identical?
Yes, your laptop has a much newer quicksync block with proper HEVC hardware-
NAS is Gemini Lake, which uses QS from Broxton/Apollo Lake/Gemini Lake
Laptop is Tiger Lake, which uses about 3 versions newer QS, for Tiger Lake, Alder Lake and Raptor Lake.
Broxton QuickSync doesn’t actually have an asic encoder path for HEVC, it’s all via shaders.
I found my answer then! I appreciate that 👍
No problem :)
Why are you encoding a file that’s already been encoded?
Basically saving space. The dashcam I use records in h264, and I’ve been saving space (50%) by converting them to h265 (through my Samsung phone). Handbrake is far more convenient for these batch conversions.
deleted by creator