can ffmpeg muxer mux any encoded data packet into a container?

1

2

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

Posted 2014-04-24T02:56:11.377

Reputation: 11

Possibly the mkv container is very versatile and can contain many kinds of codecs and metadata. Is this what you are asking? – Rajib – 2014-04-24T05:02:05.800

i not asked for the most versatile container,but , you still solved my problem, i'm wondering is there a ffmpeg official docs about what kinds of codecs each container can contain – Noncz – 2014-04-24T07:52:51.227

Please edit your question to include your specific query regarding codecs and containers. – Rajib – 2014-04-24T13:27:07.543

Answers

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

Posted 2014-04-24T02:56:11.377

Reputation: 182 472

Perfect answer!!! That's exactly what i'm ask for.Thank you~ – Noncz – 2014-04-29T05:55:26.390