-
Notifications
You must be signed in to change notification settings - Fork 12
how to transcode h264 into h265 without losing quality? #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is not an easy task, given that any kind of decode - encode process does cause some kind of quality loss unless very high bitrates are used. How much compression you can achieve also depends on the quality of the source file. If for example the source video is low quality, the compression will not be effective, because you are at some point starting to compress the compression artifacts and noise causing a larger file size. For the best compression / quality ratio, I would suggest you to try to use a constant quality (CQ) setting (try values around 18) instead of a constant bitrate one together with the encoder preset set to at least This setting should work for any kind of video, but ofc it can mean that on some videos the resulting file is larger than the source, in which case converting to h265 might be pointless. One last thing: generally using x265 gives a better compression / quality ratio than using NVEnc and using newer NVEnc hardware (e.g. RTX 4000 series) will also give better results than using older ones like 1000 or 2000 series GPUs. |
this is my preset, happy to share with you. But honestly I am not the HD/Blueray/et al. guy. Happy to have a nice quality on min. Filesize - so please adjust as you like... And for sure, may someone also had a better idea about my version, always up for suggestions ;-)
|
May I ask you what resolution your source files are and what your hardware is? I can create a preset for you, if you would like to give it a try. |
so my hardware is GeForce RTX 3050 and i am using h265_nvenc. Having good results with my preset so far. |
Any reason why you are using 10bit? Are the source files 10bit? |
I realized better results in color and dark areas when using 10bit encoding. input files are mixed, sometimes 10bit, sometimes h264/h265, really mixed |
Understood. For 1080p for example, 1050 kbit is simply not enough to produce any kind of useful quality in my opinion. As I mentioned above, I personally would rather opt to using the constant quality setting set to something around 18. |
my files vary from 360p to 4k, mostly is 1080p h264 mp4, but the bitrate is various, from 3000k to 10000k |
i am using this docker on my unraid to transcode my h264 files to h265 to reduce their size,
here is the preset i made,
PresetName": "h265",
"SubtitleAddCC": false,
"SubtitleAddForeignAudioSearch": true,
"SubtitleAddForeignAudioSubtitle": false,
"SubtitleBurnBDSub": true,
"SubtitleBurnBehavior": "foreign",
"SubtitleBurnDVDSub": true,
"SubtitleLanguageList": [],
"SubtitleTrackSelectionBehavior": "none",
"Type": 1,
"UsesPictureFilters": true,
"VideoAvgBitrate": 6000,
"VideoColorMatrixCodeOverride": 0,
"VideoEncoder": "nvenc_h265",
"VideoFramerate": "auto",
"VideoFramerateMode": "vfr",
"VideoGrayScale": false,
"VideoHWDecode": 0,
"VideoLevel": "auto",
"VideoMultiPass": true,
"VideoOptionExtra": "",
"VideoPreset": "fast",
"VideoProfile": "auto",
"VideoQSVDecode": false,
"VideoQualitySlider": 33.0,
"VideoQualityType": 2,
"VideoScaler": "swscale",
"VideoTune": "",
"VideoTurboMultiPass": true,
"x264Option": "",
"x264UseAdvancedOptions": false
}
is there any better options that i can use to transcode them only reducing the size without reducing the quality?
my files are in different resolution, different bitrate,
i hope there is one preset that could be used for all video
The text was updated successfully, but these errors were encountered: