A container is what the name implies, a container for video data and audio data (and other misc. data).
This might go a little bit under your know-how but just to make it easy to understand:
A video is made up by frames which are made up by pixels. A codec like h265/HEVC is there to take this pixel information and process it in a way that makes it a lot smaller than the raw pixel array, this process is called encoding.
Most codecs do this in a lossy way which discards certain pixel information but trys to keep the image still look the same. The encoded image frame is mathematically not identical with the source but aims to look identical for the human eye.
The container is there to take this raw encoded stream and wrap it, many container formats provide extra meta information about the streams contained in it and support a variety of content other than video, like subtitles and audio information. The container is there to hold all this information, it doesn't alter the information like an encoder alters video or audio, it just holds on to them.
In order to mux (the term used when you mean you want to put a audio or video stream into a container, muxing will give you a lot of google results) your video into a container with ffmpeg you just have to tell ffmpeg to copy the existing stream instead of encoding it (in your case you provided it with no further information and it will just encode it to h264 which is the standard codec in ffmpeg when nothing is provided).
You do that by using -c copy
which tells it to copy both audio and video from the source. You can also do -vcodec copy
or -acodec copy
to treat audio and video differently but this is more relevant to re-mux from an existing container which has audio and video data to another container.
In your case -c copy
does the job just fine. Just add that to your command line and it should mux an avi for you. Though mkv is favorable over avi for h265 as its already the supported h265 container that DIVX uses for their h265 implementation.
If just providing a filetype exension to your output file doesn't work like you expect you can also enforce a container by using -f mkv
or -f avi
.
This does what your client asked for, the h265 stream muxed into a container format without touching it.