Is mpeg2 really better than h.264 for SD DVD's

I’m having a really hard time justifying keeping my mkv rips of SD DVD’s. While mpeg2’s direct play on my living room TV, nobody can perceive the quality difference when I play an optional mp4 version.

Plus, then when playing on mobile devices, and/or remote playing, it has to transcode the mpeg2 to a mp4 anyway.

I see so many people saying that mpeg2 is the best image quality, but I just dont see it. Are they maybe not using good handbrake transcoding to make their mp4’s? Does it make a bigger difference for HD video? Help me understand.

The argument is to avoid the extra transcoding beyond the already applied compression when the media was originally encoded. If you have music one a cassette tape, it won’t improve by copying it to a CD (or digitizing it to an mp3/mp4/flac/…).

That being said and as you pointed out: a good h264 encode of a DVD sourced video doesn’t have to be bad (and whatever quality impact there’s going to be… many won’t notice it).
I’ve transcoded all my DVD content last year, replacing the mpeg2 MKVs and saving 75-80% of disk space (plus the need to transcode the files whenever a client can’t deal with the mpeg2 video)

1 Like

DVDs MPEG2 is h262 encoding, h263 was developed for video telephone calls. BluRays use h264 encoding and UHD 4K BluRays use H265. As you go up in number the compression algorithm gets more efficient (and requires more compute power), ie; a higher resolution image for the same bit rate or file size.
Plex likes to transcode to h264 for remote streaming to keep the stream’s bit rate down to a level that most residential internet services provide. Also it can be done in hardware (with the right hardware) on the fly, so it puts little if any stress on the CPU and you can build a server with commonly available computer hardware. Compressing to h265 requires much more horse power and time

In-so-far-as MKV or MP4, those are just file formats for multiplexing all the video, audio, subtitle & chapter tracks together. IMHO I would stick with MKV since I believe you can loose some metadata capabilities with MP4.

If space is of a concern to you on your system you could have Plex optimize the MPEG2 files which should reencode the video to h264 and make the file size smaller with little to no loss in quality. As for me I use MakeMKV and leave all the encoding exactly the way it is on the original disc since I have enough storage to handle it

When you “optimize” a mpeg2 ahead of time in plex (you actually end up with two files), how is the transcode quality compared to transcoding to h264 in handbrake?

They should both be using more or less the same libraries for encoding the video, so I don’t expect much of a difference — Handbrake will give you more control (e.g. more presets and more granular controls).

Surely there is some rational reason why people think h.264 encodes from a mpeg2 look worse. I was thinking maybe family room screen size or how they’re transcoding has something to do with it…

I guess one option is to just keep mkv rips of high action movies in the library to give the option when playing on a large screen locally. Maybe one day i’ll see the difference.

It comes down to re-encoding a lossy encode (mpeg2) with another lossy codec (h264).

By today’s standards, mpeg2 isn’t a good codec based on image quality per file size. h264/h265 will give you much better results, if you have access to the original video.
However… as your source isn’t the original video but the DVD, that’s not helping much.

Does it really though? It comes down to what can be perceived by viewers on the screen.

All i’m saying is that I was surprised that nobody in the house, including me, could perceive a difference between direct rip mpeg2’s from DVD’s vs the compressed mp4’s. I thought surely I was missing something or doing something special given how much i see about loss of data when transcoding.

As nobody has given me a strong case why, I’m chalking it up to a case of perfectionism.

That comes down to the many quality-degrading things that must be done in order to show a DVD-sourced video on today’s screen devices (i.e. not on a CRT TV device)

  1. DVD stores rectangular pixels (no matter whether it is 4:3 or 16:9 picture). That must be stretched to all the screens which do have square pixels (which is practically all of them), introducing blur.
  2. Most DVDs store interlaced video. This is a method to save video bandwidth and storage space. Problem is that it only looks good on CRT screens. For all digital screens it has to be de-interlaced, which introduces further blur and less-than smooth motion.
  3. Video which was produced in 24fps (i.e. pretty much all movies made for cinema projection), as well as animation, is stored on NTSC DVDs with a weird method to change the 24 fps to 30 fps, called Telecine. It causes weird motion, because it shows every fourth frame twice. (it gets even messier with interlaced video and “2:3 pulldown” which I am not going into here)
    On PAL DVDs it is even worse: here the 24 fps source video is simply played faster at 25fps (usually called “PAL-speedup”)

There is no proper solution. Every method to deal with this has disadvantages and is pretty much always a trade-off between quality and processing time.
The best method quality-wise I’ve found so far is to first revert the Telecine process, followed by upscaling the video with an advanced filter to a higher resolution e.g. 1080p, thereby converting the rectangular pixels to square. Then downscale again to DVD resolution, but without re-introducing the rectangular pixels. All of this requires specialized software (not free) and a fast computer/GPU.

1 Like

A friend of mine is taking his MPEG interlaced videos and running them through handbrake.

I don’t remember all the details but know he’s converting to HEVC Level 5.0 directly with deinterlace and yadif .

He sent me a sample of the original and of the output.
The HEVC output was fantastic. B/W content, motion was smooth & without juttering, hair had texture and shading. nothing was over saturated as is common with most conversions to H264.

I’m pulling out my discs and will redo them as well using this once I get the preset fully worked out

1 Like

Out of about 300 DVD’s so far, one (1) appears to be interlaced. It was a video from the 1970’s. Though, all of the other 1950’s and 60’s DVD’s are fine.

For that one interlaced video, I am using avisynth+ with QTGMC and a temporal degrain and the results are phenomenal. .mkv in and .mkv out, and then it can be transcoded to whatever.

I know QTGMC is a lot better at converting interlaced video than virtual dub or handbrake filters.

Just go too Doom9 forums and have a read up. Anything not covered there is not worth mentioning

If anyone is interested in the Avisynth+ script to deinterlace a lot better than handbrake:

SetFilterMTMode(“DEFAULT_MT_MODE”, MT_MULTI_INSTANCE)

video_org=FFmpegSource2(“NAME OF VIDEO.mkv”, atrack=-1)

cropping

crop_left=6 # | Standard is 0
crop_top=0 # | 720-(8+8)x576-(2+10)=704x564 standard is 2
crop_right=6 # Standard is 16
crop_bottom=0 #standard is 10
video_org_crop=video_org.crop(crop_left,crop_top,-crop_right,-crop_bottom)

deinterlacing

deinterlaced=video_org_crop.AssumetFF().QTGMC(preset=“fast”, EdiThreads=3)

return(deinterlaced)
prefetch(10)

2 Likes

To answer the original question: Yes, h.264 is an improvement over mpeg-2. If you encoded a high bit-rate lossless video to these two codecs at the same bit-rate target, the h.264 would contain more information. It would look better. However, the context your question is being asked in is one where your source file is not a high bit-rate lossless video. It’s a very low bit-rate video by modern standards, which is already encoded to a lossy mpeg-2. Any encode you create from this lossy source will contain less information than the DVD rip does. It’s not a question at this point if h.264 looks better than mpeg-2. It’s a question of how much information are you will to part with to lower the file size? The benefit of encoding new files from DVD rips isn’t improving the image quality. It is reducing file size. You can encode those DVD rips to newer codecs without much if any perceptible quality loss while saving significant disk space as long as you set the encoder software to the right settings.

I should also note that as time progresses players may phase out support for mpeg-2 playback, which will necessitate the live transcoding of mpeg-2 video at playback. Doing this on the fly can look okay, but it isn’t likely to create a viewing experience that is as good. Idk how big an issue this will actually be. I’m pretty sure all Plex clients still play mpeg-2, but don’t quote me.

For the best quality encode at the smallest file size you should skip both handbrake and Plex’s optimize function. Invest the time to learn how to use ffmpeg instead. I recently ripped, and encoded a couple seasons of a show that was only released on DVD. I tried several codecs, and encoders for that SD video to find what could produce files with no visible quality loss at the smallest size. AVC (h.264) wasn’t a bad option, but HEVC (h.265) proved to produce smaller files at the same quality. I also tried encoding to AV1 with a few different encoders for that codec available in ffmpeg. However, AV1 is not a well suited codec for SD content it seems. It obviously works for encoding standard res video, but the files came out larger than HEVC. From what I’ve read this is because AV1 was designed specifically for HD and UHD content.

Handbrake is a decent tool for people just starting out, but ffmpeg produces better results. There are a lot of tools online that can help you create a script file to encode your video files with ffmpeg. I found that using chatGPT was a decent way to learn how to use ffmpeg. The project is also very well documented if you like to read. Use a tool like Losslesscut to create a clip of your source content without re-encoding it, and test how all the functions of the ffpmeg encoders affect your output encodes.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.