Most efficient way to re encode H.264 10-Bit to High profile or HEVC 10-Bit
For an odd reason my OLED TV can play HEVC 10-Bit files but only H.264 non-10-Bit.
This output (video stream) from ffmpeg is played fine with HEVC 10-Bit:
Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
while this file won't play:
Stream #0:0: Video: h264 (High 10), yuv420p10le(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
and this encode seems to be the max that will work on my TV:
Stream #0:0(jpn): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
I use the following command to convert to HEVC:
ffmpeg -i in.mkv -map 0:0 -map 0:2 -map 0:4 -vcodec hevc -preset ultrafast -x265-params lossless=1 -acodec copy -scodec copy out.mkv
That of course takes a while and require the lossless switch or video gets extremely pixelated. I tried to look at hevc_nvenc
but it said “no compatible devices” (maybe need to provide more info for it, I have an NVIDIA GeForce 980 TI).
Also tried using -vcodec h264
with -preset high
and got an error saying:
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Any encoding gurus able to help with faster conversion to HEVC or conversion to a lower preset of H.264, or help getting NVENC to work if it provides significant performance gains…?
ffmpeg video-conversion encoding h.264 h.265
add a comment |
For an odd reason my OLED TV can play HEVC 10-Bit files but only H.264 non-10-Bit.
This output (video stream) from ffmpeg is played fine with HEVC 10-Bit:
Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
while this file won't play:
Stream #0:0: Video: h264 (High 10), yuv420p10le(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
and this encode seems to be the max that will work on my TV:
Stream #0:0(jpn): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
I use the following command to convert to HEVC:
ffmpeg -i in.mkv -map 0:0 -map 0:2 -map 0:4 -vcodec hevc -preset ultrafast -x265-params lossless=1 -acodec copy -scodec copy out.mkv
That of course takes a while and require the lossless switch or video gets extremely pixelated. I tried to look at hevc_nvenc
but it said “no compatible devices” (maybe need to provide more info for it, I have an NVIDIA GeForce 980 TI).
Also tried using -vcodec h264
with -preset high
and got an error saying:
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Any encoding gurus able to help with faster conversion to HEVC or conversion to a lower preset of H.264, or help getting NVENC to work if it provides significant performance gains…?
ffmpeg video-conversion encoding h.264 h.265
add a comment |
For an odd reason my OLED TV can play HEVC 10-Bit files but only H.264 non-10-Bit.
This output (video stream) from ffmpeg is played fine with HEVC 10-Bit:
Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
while this file won't play:
Stream #0:0: Video: h264 (High 10), yuv420p10le(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
and this encode seems to be the max that will work on my TV:
Stream #0:0(jpn): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
I use the following command to convert to HEVC:
ffmpeg -i in.mkv -map 0:0 -map 0:2 -map 0:4 -vcodec hevc -preset ultrafast -x265-params lossless=1 -acodec copy -scodec copy out.mkv
That of course takes a while and require the lossless switch or video gets extremely pixelated. I tried to look at hevc_nvenc
but it said “no compatible devices” (maybe need to provide more info for it, I have an NVIDIA GeForce 980 TI).
Also tried using -vcodec h264
with -preset high
and got an error saying:
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Any encoding gurus able to help with faster conversion to HEVC or conversion to a lower preset of H.264, or help getting NVENC to work if it provides significant performance gains…?
ffmpeg video-conversion encoding h.264 h.265
For an odd reason my OLED TV can play HEVC 10-Bit files but only H.264 non-10-Bit.
This output (video stream) from ffmpeg is played fine with HEVC 10-Bit:
Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
while this file won't play:
Stream #0:0: Video: h264 (High 10), yuv420p10le(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
and this encode seems to be the max that will work on my TV:
Stream #0:0(jpn): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
I use the following command to convert to HEVC:
ffmpeg -i in.mkv -map 0:0 -map 0:2 -map 0:4 -vcodec hevc -preset ultrafast -x265-params lossless=1 -acodec copy -scodec copy out.mkv
That of course takes a while and require the lossless switch or video gets extremely pixelated. I tried to look at hevc_nvenc
but it said “no compatible devices” (maybe need to provide more info for it, I have an NVIDIA GeForce 980 TI).
Also tried using -vcodec h264
with -preset high
and got an error saying:
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Any encoding gurus able to help with faster conversion to HEVC or conversion to a lower preset of H.264, or help getting NVENC to work if it provides significant performance gains…?
ffmpeg video-conversion encoding h.264 h.265
ffmpeg video-conversion encoding h.264 h.265
edited Jan 1 at 20:06
slhck
160k47444466
160k47444466
asked Dec 31 '18 at 5:36
Jason WrightJason Wright
1
1
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
TVs are sometimes very picky about what profiles and levels they support for a given codec.
In any case, you should not have to resort to lossless encoding to retain quality when converting from H.264 to H.265. Please read the H.265 encoding guide for the available options w.r.t. quality and conversion speed.
While setting the ultrafast
preset will definitely improve the overall speed of the encode, it'll significantly increase the file size (when using a constant quality encoding mode) or decrease the video quality (when using a target bitrate).
For HEVC, this should work:
ffmpeg -i <input> -c:v libx265 -crf 28 -preset fast <output>
Decrease the CRF value to increase the quality. A value of ±6 should result in half or double the bitrate, but it'll depend on the complexity of the content you're encoding.
I tried to look at hevc_nvenc but it said no compatible devices (maybe need to provide more info to it, I have 980Ti)
The 980 TI supports NVENC
(see complete list).
Generally though, once you have a compatible device, in order to get support for hevc_nvenc
, the NVIDIA libraries have to be installed on your system, and your ffmpeg
needs to be compiled with support for nvenc
. See this wiki entry for more info.
conversion to a lower preset of h264
This may help, but I assume that you want to keep the 10-bit color depth in your files? If you're converting, you might as well convert to HEVC – I wouldn't recommend converting to 8-bit H.264.
980 Ti has 2 nvenc chips as per the given link - see the complete tables.
– Gyan
Dec 31 '18 at 12:40
thanks -vcodec hevc -crf 15 -pix_fmt yuv420p10le was what worked for me and just left a queue running hevc_nvenc does work as I got it working simply using handbrake but it seems to have quality issues and introduces jerkiness to panning shots by default but it does triple my encoding speed
– Jason Wright
Dec 31 '18 at 13:59
@Gyan Thanks, did not see that button. Corrected.
– slhck
Dec 31 '18 at 15:27
@JasonWright The quality with NVENC for HEVC should be quite good when setting-vbr_hq
. You can also play with the presets. If you ask a new question about those settings specifically, it might be possible to improve those options.
– slhck
Dec 31 '18 at 15:31
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1389153%2fmost-efficient-way-to-re-encode-h-264-10-bit-to-high-profile-or-hevc-10-bit%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
TVs are sometimes very picky about what profiles and levels they support for a given codec.
In any case, you should not have to resort to lossless encoding to retain quality when converting from H.264 to H.265. Please read the H.265 encoding guide for the available options w.r.t. quality and conversion speed.
While setting the ultrafast
preset will definitely improve the overall speed of the encode, it'll significantly increase the file size (when using a constant quality encoding mode) or decrease the video quality (when using a target bitrate).
For HEVC, this should work:
ffmpeg -i <input> -c:v libx265 -crf 28 -preset fast <output>
Decrease the CRF value to increase the quality. A value of ±6 should result in half or double the bitrate, but it'll depend on the complexity of the content you're encoding.
I tried to look at hevc_nvenc but it said no compatible devices (maybe need to provide more info to it, I have 980Ti)
The 980 TI supports NVENC
(see complete list).
Generally though, once you have a compatible device, in order to get support for hevc_nvenc
, the NVIDIA libraries have to be installed on your system, and your ffmpeg
needs to be compiled with support for nvenc
. See this wiki entry for more info.
conversion to a lower preset of h264
This may help, but I assume that you want to keep the 10-bit color depth in your files? If you're converting, you might as well convert to HEVC – I wouldn't recommend converting to 8-bit H.264.
980 Ti has 2 nvenc chips as per the given link - see the complete tables.
– Gyan
Dec 31 '18 at 12:40
thanks -vcodec hevc -crf 15 -pix_fmt yuv420p10le was what worked for me and just left a queue running hevc_nvenc does work as I got it working simply using handbrake but it seems to have quality issues and introduces jerkiness to panning shots by default but it does triple my encoding speed
– Jason Wright
Dec 31 '18 at 13:59
@Gyan Thanks, did not see that button. Corrected.
– slhck
Dec 31 '18 at 15:27
@JasonWright The quality with NVENC for HEVC should be quite good when setting-vbr_hq
. You can also play with the presets. If you ask a new question about those settings specifically, it might be possible to improve those options.
– slhck
Dec 31 '18 at 15:31
add a comment |
TVs are sometimes very picky about what profiles and levels they support for a given codec.
In any case, you should not have to resort to lossless encoding to retain quality when converting from H.264 to H.265. Please read the H.265 encoding guide for the available options w.r.t. quality and conversion speed.
While setting the ultrafast
preset will definitely improve the overall speed of the encode, it'll significantly increase the file size (when using a constant quality encoding mode) or decrease the video quality (when using a target bitrate).
For HEVC, this should work:
ffmpeg -i <input> -c:v libx265 -crf 28 -preset fast <output>
Decrease the CRF value to increase the quality. A value of ±6 should result in half or double the bitrate, but it'll depend on the complexity of the content you're encoding.
I tried to look at hevc_nvenc but it said no compatible devices (maybe need to provide more info to it, I have 980Ti)
The 980 TI supports NVENC
(see complete list).
Generally though, once you have a compatible device, in order to get support for hevc_nvenc
, the NVIDIA libraries have to be installed on your system, and your ffmpeg
needs to be compiled with support for nvenc
. See this wiki entry for more info.
conversion to a lower preset of h264
This may help, but I assume that you want to keep the 10-bit color depth in your files? If you're converting, you might as well convert to HEVC – I wouldn't recommend converting to 8-bit H.264.
980 Ti has 2 nvenc chips as per the given link - see the complete tables.
– Gyan
Dec 31 '18 at 12:40
thanks -vcodec hevc -crf 15 -pix_fmt yuv420p10le was what worked for me and just left a queue running hevc_nvenc does work as I got it working simply using handbrake but it seems to have quality issues and introduces jerkiness to panning shots by default but it does triple my encoding speed
– Jason Wright
Dec 31 '18 at 13:59
@Gyan Thanks, did not see that button. Corrected.
– slhck
Dec 31 '18 at 15:27
@JasonWright The quality with NVENC for HEVC should be quite good when setting-vbr_hq
. You can also play with the presets. If you ask a new question about those settings specifically, it might be possible to improve those options.
– slhck
Dec 31 '18 at 15:31
add a comment |
TVs are sometimes very picky about what profiles and levels they support for a given codec.
In any case, you should not have to resort to lossless encoding to retain quality when converting from H.264 to H.265. Please read the H.265 encoding guide for the available options w.r.t. quality and conversion speed.
While setting the ultrafast
preset will definitely improve the overall speed of the encode, it'll significantly increase the file size (when using a constant quality encoding mode) or decrease the video quality (when using a target bitrate).
For HEVC, this should work:
ffmpeg -i <input> -c:v libx265 -crf 28 -preset fast <output>
Decrease the CRF value to increase the quality. A value of ±6 should result in half or double the bitrate, but it'll depend on the complexity of the content you're encoding.
I tried to look at hevc_nvenc but it said no compatible devices (maybe need to provide more info to it, I have 980Ti)
The 980 TI supports NVENC
(see complete list).
Generally though, once you have a compatible device, in order to get support for hevc_nvenc
, the NVIDIA libraries have to be installed on your system, and your ffmpeg
needs to be compiled with support for nvenc
. See this wiki entry for more info.
conversion to a lower preset of h264
This may help, but I assume that you want to keep the 10-bit color depth in your files? If you're converting, you might as well convert to HEVC – I wouldn't recommend converting to 8-bit H.264.
TVs are sometimes very picky about what profiles and levels they support for a given codec.
In any case, you should not have to resort to lossless encoding to retain quality when converting from H.264 to H.265. Please read the H.265 encoding guide for the available options w.r.t. quality and conversion speed.
While setting the ultrafast
preset will definitely improve the overall speed of the encode, it'll significantly increase the file size (when using a constant quality encoding mode) or decrease the video quality (when using a target bitrate).
For HEVC, this should work:
ffmpeg -i <input> -c:v libx265 -crf 28 -preset fast <output>
Decrease the CRF value to increase the quality. A value of ±6 should result in half or double the bitrate, but it'll depend on the complexity of the content you're encoding.
I tried to look at hevc_nvenc but it said no compatible devices (maybe need to provide more info to it, I have 980Ti)
The 980 TI supports NVENC
(see complete list).
Generally though, once you have a compatible device, in order to get support for hevc_nvenc
, the NVIDIA libraries have to be installed on your system, and your ffmpeg
needs to be compiled with support for nvenc
. See this wiki entry for more info.
conversion to a lower preset of h264
This may help, but I assume that you want to keep the 10-bit color depth in your files? If you're converting, you might as well convert to HEVC – I wouldn't recommend converting to 8-bit H.264.
edited Dec 31 '18 at 15:26
answered Dec 31 '18 at 11:44
slhckslhck
160k47444466
160k47444466
980 Ti has 2 nvenc chips as per the given link - see the complete tables.
– Gyan
Dec 31 '18 at 12:40
thanks -vcodec hevc -crf 15 -pix_fmt yuv420p10le was what worked for me and just left a queue running hevc_nvenc does work as I got it working simply using handbrake but it seems to have quality issues and introduces jerkiness to panning shots by default but it does triple my encoding speed
– Jason Wright
Dec 31 '18 at 13:59
@Gyan Thanks, did not see that button. Corrected.
– slhck
Dec 31 '18 at 15:27
@JasonWright The quality with NVENC for HEVC should be quite good when setting-vbr_hq
. You can also play with the presets. If you ask a new question about those settings specifically, it might be possible to improve those options.
– slhck
Dec 31 '18 at 15:31
add a comment |
980 Ti has 2 nvenc chips as per the given link - see the complete tables.
– Gyan
Dec 31 '18 at 12:40
thanks -vcodec hevc -crf 15 -pix_fmt yuv420p10le was what worked for me and just left a queue running hevc_nvenc does work as I got it working simply using handbrake but it seems to have quality issues and introduces jerkiness to panning shots by default but it does triple my encoding speed
– Jason Wright
Dec 31 '18 at 13:59
@Gyan Thanks, did not see that button. Corrected.
– slhck
Dec 31 '18 at 15:27
@JasonWright The quality with NVENC for HEVC should be quite good when setting-vbr_hq
. You can also play with the presets. If you ask a new question about those settings specifically, it might be possible to improve those options.
– slhck
Dec 31 '18 at 15:31
980 Ti has 2 nvenc chips as per the given link - see the complete tables.
– Gyan
Dec 31 '18 at 12:40
980 Ti has 2 nvenc chips as per the given link - see the complete tables.
– Gyan
Dec 31 '18 at 12:40
thanks -vcodec hevc -crf 15 -pix_fmt yuv420p10le was what worked for me and just left a queue running hevc_nvenc does work as I got it working simply using handbrake but it seems to have quality issues and introduces jerkiness to panning shots by default but it does triple my encoding speed
– Jason Wright
Dec 31 '18 at 13:59
thanks -vcodec hevc -crf 15 -pix_fmt yuv420p10le was what worked for me and just left a queue running hevc_nvenc does work as I got it working simply using handbrake but it seems to have quality issues and introduces jerkiness to panning shots by default but it does triple my encoding speed
– Jason Wright
Dec 31 '18 at 13:59
@Gyan Thanks, did not see that button. Corrected.
– slhck
Dec 31 '18 at 15:27
@Gyan Thanks, did not see that button. Corrected.
– slhck
Dec 31 '18 at 15:27
@JasonWright The quality with NVENC for HEVC should be quite good when setting
-vbr_hq
. You can also play with the presets. If you ask a new question about those settings specifically, it might be possible to improve those options.– slhck
Dec 31 '18 at 15:31
@JasonWright The quality with NVENC for HEVC should be quite good when setting
-vbr_hq
. You can also play with the presets. If you ask a new question about those settings specifically, it might be possible to improve those options.– slhck
Dec 31 '18 at 15:31
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1389153%2fmost-efficient-way-to-re-encode-h-264-10-bit-to-high-profile-or-hevc-10-bit%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown