1

I just want to know is there a restriction, that one type of container only can contain numbers of special codecs encoded data packet.

I afraid i don't explain myself well. To be more specific, is there some kind of encoded data packet that "ogg" container can not contain, or no matter what container it is, it can contain any kind of encoded data packet

Noncz
  • 11

1 Answers1

2

Generally, multimedia containers are restricted to certain codecs that can be embedded. Some more than others. For example, the Matroska container can include virtually any video, audio, or subtitle codec. On the other hand, containers such as MPEG-4 Part 14 (.mp4) are quite limited. Containers such as MPEG-2 Transport Streams are very flexible since they allow you to define "private streams" in which non-standardized codecs may be transmitted.

You will find an extensive overview on Wikipedia.

Of course, in principle, you could embed any random data that disguises itself as video or audio into a container. The container is just there to bundle the payload. But I don't see any practical use for it, since you couldn't decode the data without a parser that understands the payload.

You might also be interested in: What is a Codec (e.g. DivX?), and how does it differ from a File Format (e.g. MPG)?

Regarding your specific question, you will find that Ogg containers can carry the following codecs:

  • Video: Theora, Dirac, OggUVS, MNG
  • Audio: Vorbis, FLAC, Speex, Opus, OggPCM

And even more specifically, ffmpeg cannot mux arbitrary data into a container. It will tell you when a certain codec is not valid for a format.

slhck
  • 235,242