Video sources I want to (re)encode:DVD: MPEG2 720x576/540 (Amount: >200 DVDs)BluRay: VC1/H264/MPEG2 1920x1080 (Amount: >30 BluRays)Others: various formats with various resolutions, going down to 100x100 pixel (Amount: at least several hundreds I want to archive, some with rather old codecs like Duck TrueMotion)

What I want to achieve:
Encoding the various videos into a (mostly) single video format, placing them on my NAS. File size most probably isn't a problem (20 TB space), so I'm trying to achieve quality videos (yet I'd like not to have BluRays with 25 GB but maybe 10 or less after reencoding).

My questions:x264 or x265?
I've read quite some sites and found various comments. Some say, x265 is better for streaming and x264 is better for archiving. Then again they say, x265 is better for videos in lower resolution. Considering my sources, which format should I choose? The input videos will have material of all kinds (real life, CGI, animations). Somewhere I've read, that starting from around 2500kbit/s x264 and x265 make a significant less difference in encoding.

CPU (x264/x265) or GPU (NVEnc)?
Should I encode with my CPU (which, depending on the quality settings, might be rather slow) or on my GPU (which runs like ten times faster)? Most comments I've read about this have stated, that NVEnc is better for streaming e.g. game play and such. Of course GPU runs faster, but it looks like the quality isn't close to the one via CPU encoded x264.

Encoding mode?
Which encoding mode should I use to achieve a suitable good quality to file size ratio? CBR with a specific bitrate per medium (e.g. 2500kbit for DVD, higher for BluRay etc.), VBR, CQ? Single Pass, Two Pass, Triple Pass?
I know that depending on the encoding mode, the encoding time will raise significantly.

Cropping black borders?
Something I have to admit I don't have looked up in the internet yet. Is it good or bad cropping away the black borders from a video? Does it even make the file any smaller? After all there always would be the same color, which should make it easy to be encoded as the pixels never will change during the whole video length. Or is it a bad idea when thinking about subtitles? But aren't they placed from the software? Let's say I crop a video from 720x576 to 720x500. When activating subtitles, the software most probably will place the subtitles beneath the video anyway, if I would watch the video in full screen, that is.

MKV or MP4?
More a less important question. Should I use MKV container or MP4 container? I'm used to work with MKVToolNix. Mp4ToolBox is something unknown for me.

x264, x265 is very slow and at 1080p or lower HVEC doesn't off too much more efficiency. x265 is better when you are targeting only slightly worse quality than the source, if you want transparent encodes the advantage of HVEC is very minor or non-existent (and it is a LOT slower). For UHD video x265 is preferred.

x264 is much better quality than NVEnc.

CRF single pass, faster than two pass and size goes up and down as needed for each source.

No cropping, with that many encodes to do it is more trouble than it is worth. Encoding the black area is easy but the sharp line between the image and black border does take bits to encode. Depending on the way the subtitles were authored cropping could be fine or it could cause problems.

So let's say I have a bit more time, then I think using Two or Three Pass would slightly give more quality, right? But that also means I have to set up a kbit setting for the quality.

Currently when I reencode TV recordings, I use x264 with Quality "19 - High" and preset "Slower". This usually encodes with 25 to 50 fps for 720x576.
MediaInfo then shows me the total bitrate of those videos is between 1200 and 2000 kbit/s.

So let's say I have a bit more time, then I think using Two or Three Pass would slightly give more quality, right? But that also means I have to set up a kbit setting for the quality.

No, at the same size crf and two pass give the same quality. Two pass is only useful when targeting a specific bitrate. Three pass is never useful as far as I know (use placebo instead if you have time to waste).

Quote:

Originally Posted by Bahamuth

Currently when I reencode TV recordings, I use x264 with Quality "19 - High" and preset "Slower". This usually encodes with 25 to 50 fps for 720x576.
MediaInfo then shows me the total bitrate of those videos is between 1200 and 2000 kbit/s.

For archival I would use quality 17 (or lower), preset veryslow, and tune film, but otherwise that sounds good to me.

Another question:8 bit or 10 bit?
x264 executable comes in both ways. Would it even make any difference for me?

oh an another thingsare B-frames bad?
I've read a sentence or two about B frames making the playback bad depending on the device.

There is literally no hardware support for 10 bit h.264 and not a whole lot of software support either.

B-frames aren't bad as long as you stick to blu-ray specs, max 4 ref and max 3 b frames for 1080, for lower resolutions you can use more. But I suppose just using intra frame encoding will make your encodes have less generational loss if that is a concern. It will make files sizes a lot bigger though.

So the size will go down a bit more than half of the original, which is I think more than enough for my purpose. Of course it takes long (16 hours for the BluRay) but then again I only will do this once.

A many players and televisions wont play High@L5.
So do yourself a favour and crank your encoding settings down to High@L4.1 or for the safe side High@L4.0.
And why did you encode your interlaced sources as progressive?
Did you deinterlace them with Avisynth or similars?

Of course it takes long (16 hours for the BluRay) but then again I only will do this once.

As a long time video user, I would say that all people that I met here or elsewhere said that, at least twice

The archival purpose is only then fulfilled when the stored/archived video (in your case) would be also playable after a certain time. This is why those people I mentioned, had to recode their videos once again, from AVI/DivX to MKV then to MP4.

Also in time, people start seeing the differences from the original, and go back to 1:1 copies. Which is my advice as well - do a rip without reencoding, this is fast, keep what it's needed and future-proof. And if you have to play them at your bro's home nobody has to hunt for drivers, codecs and whatever else needed to play them.

So for DVDs it would be e.g. a MKV with MPEG2 inside. Do all hardware players who support MKV also support MPEG2-Streams inside? I would have thought x264 is a bit more compatible in there.

Well technically mkv does support MPEG files and some players that support mkv might be able to play them like a new Samsung tv. But more "official" containers would be vob, mpg or .ts. On DVD's vobs are split into 1GB chunks, so I'm not sure what other players will think about vobs that are larger. Or if you want to include internal subtitles .ts supports those in the right format. You know what I don't think .mpg supports AC3 nor DTS, so you might want to go with .ts.

A M2TS or simply TS would be more appropriate, not only for DVDs, but also for many others. The problem is the muxing overhead which is rather large, and increases with every new stream (so keep the audios and subtitles to a minimum).

I have one computer-animated movie, which even grows in size around 3GB (to around 24GB) if I use the settings above. Even using one step lower, Quality "18 Higher" and Preset "Slower" ends in a file with rougly the same size as the original (Video bitrate around 25mbit).
Looks like some movies already have "perfect" quality ;D

When re-encoding already compressed material the video is first decoded. Then the decoded video is compressed again. Any artifacts are treated as detail since it is all just pixels. This means that it is much harder to compress an already compressed video to near the same quality.

This is also why re-compressing already highly compressed video is generally a bad idea, using the same encoder you would need to lose a lot more quality to hit the same file size again, compared to compressing the original source. Remember, raw uncompressed 4:2:0 1080p24 8 bit video is 583200 Kbps or 250.3 GB/hour.

It is not that some movies already have "perfect" quality, it is simply that you are starting with a much lower quality video if all you have is the highly compressed version instead of the original master. In fact it is common for terrible quality video to generate very large files if re-compressed, all that blocking, mosquito noise, etc. is very hard to compress. Encoders waste a lot of bits trying to preserve the edges of the blocking and the noise.