I have a lot of TV shows in avi format that I would like to convert over to MP4 without losing any quality, Is this possible and if so what is the best way to go about doing this?
I saw this video on how to use VLC to convert it - but will I lose any quality?
TLDR: You will likely lose a small amount of quality. It may not be perceivable, and you can use a different conversion utility if you want to adjust the quality.
AVI and MP4 are both “container” formats. Inside those containers are compressed media streams. An AVI container file often has DIVX-flavor MPEG4 video inside. The MP4 container frequently has AVC/H.264 video.
It’s worth converting your media because the AVI container isn’t well supported any more, and because the DIVX-flavor MPEG-4 codec isn’t well supported any more. Because the video codecs are different, you need to transcode between them.
Any time you “transcode”, which means “decode + encode”, the new encoding process introduces a change in quality.
I would recommend you test a few and see if you are comfortable with the new quality and file size. VLC is a great quick-and-dirty tool, but doesn’t provide straightforward control over file quality.
If you want more control over the quality, or if you have many files to convert, I would suggest using something like Handbrake. You can control quality with a slider, and can queue up many items to process in a batch.
If you’re not married to the idea of using the MP4 container, you can use MKVToolNix to re-multiplex the AVI container to MKV. There should be no loss of quality as it just copies (with no modification) the streams from the AVI file in to a new MKV file.
Thanks I’m aware that AVI is an old dying and ancient container. Which is why I want to convert all my AVI to MP4. I am fully invested in the Apple ecosystem. iPhones, iPads, Macs, Apple TV, etc. the only exception are 1 Windows PC and the rest are running Plex on Samsung Tizen OS.
I want to avoid transcoding at all costs. If there’s no noticeable difference when converting AVI to MP4 then I rather go with that route. But not sure how much of a loss in quality we’re talking about here. Most of my TV shows are from the 70’s, 80’s and early 90’s. They’re quite old. So I’m not even sure if I would even see the difference in loss of quality if there is one.
Ahh! That’s a good point. Video streams can be moved between containers without modification. It would preserve quality exactly, and would be very fast.
It depends a little bit on your goals for the conversion.
I’m betting that your AVI files contain video in the DIVX/XVID MPEG4 codec. Depending on the age of your files, many of them were encoded in a way that isn’t great for streaming, or isn’t directly compatible with modern playback devices. The entire DIVX/XVID codec has a bit of a sordid history. It got a LOT better towards the end, but it was an “outlaw” codec at one point.
Importantly, Plex can transcode them at playback to a format your player device can use.
So if your goal is to get them into a better container, that’s a great, fast, and quality-preserving option.
If your goal is to “modernize” the files, and make them directly playable on most devices, then transcoding them to H.264 might make sense. MP4 container + H.264 video is almost universally supported today.
Like @pshanew, I like MKV better, but if you’re a Mac user MP4 is pretty compelling.
My suggestion would be to grab Handbrake, drop a file on it, leave every setting alone, and convert a file. See if you like the quality.
It’s really easy to get lost in near-imaginary, hypothetical quality changes.
Here are the native video/audio file format specs that the Apple TV 4K supports:
H.264/HEVC SDR video up to 2160p, 60 fps, Main/Main 10 profile
HEVC Dolby Vision (Profile 5)/HDR10 (Main 10 profile) up to 2160p
H.264 Baseline Profile level 3.0 or lower with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
MPEG-4 video up to 2.5 Mbps, 640 by 480 pixels, 30 fps, Simple profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
iPhone playback formats
M4V, MP4, MOV file formats encoded with: H.265/H.264 video, up to 4K/60 fps, High Profile level 4.2 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio.
M4V, MP4, MOV file formats encoded with: MPEG-4 video up to 2.5 Mbps, 480p/30 fps, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio;
AVI file formats encoded with: Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio.
So with these settings does this mean that I should encode my audio at 160kbps or less using AAC? I have some files that are encoded with AAC 256kbps and was wondering if the Apple TV would need to transcode.
Also I have been encoding my TV shows using MP4/H.264 (NVENC) with variable frame rate, High Level 4.0 because that is what Plex suggests for direct play. But the specs show a Baseline Profile with level 3.0 or lower. Does this mean anything higher than level 3.0 will be transcoded? I’m confused and want to be sure I am using the right encoding settings in Handbrake for optimal quality without Plex server having to trigger a transcode.
Apple’s specs page, like almost all vendor “supported codec” specs pages, sucks for clarity. It’s just a bunch of terms all blended together.
That’s a great choice. That’s MP4 container, H.264 video algorithm, using the NVENC hardware encoder.
Also a great choice, and supported by almost everything that can decode H.264. It’s conservative - almost everything can do at least 4.1. But your TV shows don’t need anything more.
Levels are a way of describing a stream’s dimensions, framerate, and bitrate, the amount of “working memory” needed to decode a stream. Level 4.0 means up to 40 Mbps and 1080p30.
No, the specs are just confusing. That bullet item means that for video encoded with the Baseline Profile, it’s limited to Level 3.0.
Profiles are a way of describing the sneaky compression techniques used, the math involved, and how difficult the encoding and decoding process is.
Baseline Profile is dumb as a box of rocks, and useful if you have a potato encoding your video. It doesn’t have many encoding features, so it’s really wasteful with bandwidth.
You aren’t using Baseline profile so you don’t care what Levels of Baseline are supported.
I don’t want to 100% swear about this one, but I’ve played significantly higher-bitrate AAC. And more channels. Hrm. I may test. I think this is the same “confusing documentation” issue, and it’s constrained because this bullet refers to Baseline Profile video.
I don’t think you need to re-encode anything that’s already 256 Kbps. Test it - I’m curious to be wrong. I’ll bet a pizza it works.
Unless you have original, pristine source audio, I don’t think there’s any reason to encode stereo audio higher than 160 Kbps, however.
The iPhone specs include “High Profile level 4.2” and “4K/60” in the same bullet. That’s nonsensical. “High Profile level 4.2” doesn’t include “4K/60”.
In reality I think both the ATV 4K and (modern) iPhones can do H.264 High Profile level 4.2, and can do H.265 Main/Main10 level 5.1, and the bullets are just scrambled together and confusing.
Just to add to the confusion, where it says HEVC Dolby Vision (Profile 5) - that’s referring to a Dolby Vision profile, something else completely.
Download and install MKVToolNix (if you don’t already have it.)
Convert the avi file in this program. You will end up with a .mkv file.
Grab a copy of FFMPEG and in the command line copy this: