<p>The choice of container has no bearing on stream quality, which is determined solely by encoder parameters.</p>

<p>What may happen is that the stream could have non-standard or at least unexpected colorimetry properties and some containers can't store that metadata or may have stored them incorrectly. Also possible is that the metadata is correct but the <em>player</em> doesn't parse them correctly or at all depending on the container. This can lead to a difference in rendering, which you perceive as a change in quality.</p>

CC BY-SA 4.0
2018-12-04T00:14:00.013Z
Is there anything I should look for to become aware of when this may happen? Or is it just a trial and error approach where I try different containers with different players and see how it shows itself on playback? With the .mp4 format I notice the difference across multiple players and streaming sites for example. I'm just stuck cause I can't find information online to help me move forward, perhaps I'm using the wrong keywords. avi is well supported but has failed due to that 2gb limitation on many players. Mkv hasn't been working on streaming, i need a format that can fit a .wav and stream
kite
CC BY-SA 4.0
2018-12-03T05:57:22.463Z
2018-12-03T05:57:22.463Z
Gyan
<p><a href="https://en.wikipedia.org/wiki/Comparison_of_video_container_formats" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Comparison_of_video_container_formats</a></p>

<p><a href="https://video.stackexchange.com/questions/23263/understanding-containers-and-codecs">Understanding containers and codecs</a></p>

<p>I'm just confused because the information above seems to indicate containers are simply chosen based on what codecs you want in your video, and that they are independent of the actual output which is determined by the codecs.
But then why is it when i output a h.264 in an .mp4 container the quality is much worse and shading different than h.264 in an .avi or .mkv?
And  if there is a reason is there a table or compilation somewhere showing this kind of information for each container so I know short of trying them all?</p>

<p><strong>Extra</strong><br>
I ask because I'm trying to find an acceptable container to hold a .wav32 (or mbe .wav 16bit signed) and 4k h.265 video that will be supported by youtube specifically in this case, .avi isn't working. .mkv isnt listed as beings supported but does upload. it seems to be the same as a working .avi, but I don't pretend to understand what's really going on....it re-encodes anyways so its irrelevant so long as it seems to be the same as a supported format..?<br>
People say to convert .mkv to mp4 but I don't see any reason why....mkv supports going to mp4 without a re-encode but whyyy would you limit your audio options and do so....? Especially when mp4 seems to degrade quality as talked about above, although I don't know if going mkv to mp4 produces similar quality changes as straight out rendering into such a container. Other non supported containers like .ts produces favourable visual results as well.<br>
So this is relating to the posed question of does ur video container just hold the codecs and not affect anything really whether it be "supported" by a streaming site or not? It's all irrelevant and its the codecs that determine everything?</p>

<ffmpeg><video-quality><codec><audio-quality>
Do video containers influence the video quality?
kite
# Do video containers influence the video quality?

(Asked by: username_0 on 2018-12-02)

<https://en.wikipedia.org/wiki/Comparison_of_video_container_formats>

[Understanding containers and codecs](https://video.stackexchange.com/questions/23263/understanding-containers-and-codecs)

I'm just confused because the information above seems to indicate containers are simply chosen based on what codecs you want in your video, and that they are independent of the actual output which is determined by the codecs.
But then why is it when i output a h.264 in an .mp4 container the quality is much worse and shading different than h.264 in an .avi or .mkv?
And if there is a reason is there a table or compilation somewhere showing this kind of information for each container so I know short of trying them all?

**Extra**  
I ask because I'm trying to find an acceptable container to hold a .wav32 (or mbe .wav 16bit signed) and 4k h.265 video that will be supported by youtube specifically in this case, .avi isn't working. .mkv isnt listed as beings supported but does upload. it seems to be the same as a working .avi, but I don't pretend to understand what's really going on....it re-encodes anyways so its irrelevant so long as it seems to be the same as a supported format..?  
People say to convert .mkv to mp4 but I don't see any reason why....mkv supports going to mp4 without a re-encode but whyyy would you limit your audio options and do so....? Especially when mp4 seems to degrade quality as talked about above, although I don't know if going mkv to mp4 produces similar quality changes as straight out rendering into such a container. Other non supported containers like .ts produces favourable visual results as well.  
So this is relating to the posed question of does ur video container just hold the codecs and not affect anything really whether it be "supported" by a streaming site or not? It's all irrelevant and its the codecs that determine everything?

**Tags:** ffmpeg, video-quality, codec, audio-quality


---

## 1 answers

### Answer by username_1 on 2018-12-03. Score: 2 | Accepted answer

The choice of container has no bearing on stream quality, which is determined solely by encoder parameters.

What may happen is that the stream could have non-standard or at least unexpected colorimetry properties and some containers can't store that metadata or may have stored them incorrectly. Also possible is that the metadata is correct but the *player* doesn't parse them correctly or at all depending on the container. This can lead to a difference in rendering, which you perceive as a change in quality.

> **Comments:**
> **username_0**: Is there anything I should look for to become aware of when this may happen? Or is it just a trial and error approach where I try different containers with different players and see how it shows itself on playback? With the .mp4 format I notice the difference across multiple players and streaming sites for example. I'm just stuck cause I can't find information online to help me move forward, perhaps I'm using the wrong keywords. avi is well supported but has failed due to that 2gb limitation on many players. Mkv hasn't been working on streaming, i need a format that can fit a .wav and stream  

---

