Which way to encode H264(X264) or H264(NVEnc)

MKV playback, recompression, remuxing, codec packs, players, howtos, etc.
Post Reply
Bsmooth
Posts: 33
Joined: Thu Feb 06, 2025 3:31 am

Which way to encode H264(X264) or H264(NVEnc)

Post by Bsmooth »

Seems the more I get into this the more confusing it gets. I haven't solved the SRT files not showing, but maybe NVToolNix may solve that. But this is about encoding in handbrake after the MKV file is done. I didn't realize how long encoding takes. But today I happened upon something called hardware encoding, and supposedly its much faster. But how much faster and how much quality do you lose. Granted I'm only going to be watch 1080P, but how bad does it get?
I also was doing some reading of older threads here and came upon one by somone that said this:
"There are other things you can do if you chose software encoding. If you are encoding a bluray source, you should make sure you have deinterlacing turned off. That will make the encode about 5% faster, and BD sources typically aren't interlaced. Filter choices affect encode speed." I found out it was Woodstock.
Sorry not sure who the author was. I'm trying to do this right the first time, so all I can learn now will help in the long run. I'd rather not have to come back and do some of my earlier attempts over again. I'm sure some of you have already had to do that and I'm sure its a big pain. So hasn't someone written this all down somewhere ? Lots of good info to be learned.
Woodstock
Posts: 10512
Joined: Sun Jul 24, 2011 11:21 pm

Re: Which way to encode H264(X264) or H264(NVEnc)

Post by Woodstock »

Hardware encoding (NVenc) is faster, but you get a more generalized encode. If you want highest quality, using x264 is better, but MUCH SLOWER.

Only you can judge which is more important to you, based on what you're encoding. The quality issue won't be as critical if you're encoding anime, but something with a lot of detail can be a visual nightmare at times.
Bsmooth
Posts: 33
Joined: Thu Feb 06, 2025 3:31 am

Re: Which way to encode H264(X264) or H264(NVEnc)

Post by Bsmooth »

Well thanks for that original thread, told me about something I never knew. I just wish there were a good tutorial with all this great info, instead of reading it spread all over the internet. I have to say this site probably has the most technical info, but finding it all is quite a puzzle.
Right now I can encode a MKV file in handbrake in about 45 minutes to 1 hour using X264.
What would a PC that had a better CPU get me as far as time?
dcoke22
Posts: 3531
Joined: Wed Jul 22, 2020 11:25 pm

Re: Which way to encode H264(X264) or H264(NVEnc)

Post by dcoke22 »

It kinda depends on what's important to you. Some people prioritize super small files and aren't as worried about the visual quality. Some people prioritize visual quality above everything else. Some people want smaller files but don't want to wait too long for an encode.

As Woodstock says, hardware encoding is often faster than software encoding, but you get the encode the hardware can encode. There are a lot more adjustments and things that can be tweaked with the software encoding. If you have an Intel CPU, you probably have Intel Quick Sync which can do hardware encoding. If you have an Nvidia card, they have their own hardware encoding. AMD GPUs have their own hardware encoding. And Macs have Apple Video Toolbox, which is whatever hardware encoding the computer supports.

There are two (maybe 3) major flavors of encoding. There's h.264 encoding, which is older and well supported everywhere. There's h.265 encoding, which is newer, slower, but higher quality compared to h.264. h.265 playback is well supported these days, but quite as widely supported as h.264. Finally, there's AV1 which seems to be what the world is moving towards, but the encoding is the slowest and the playback support is still quite low. It probably isn't a good choice at the moment.

You have to think about all the places where you might want to play the encoded files and what kind of files those places can play.
Post Reply