Answers.Body: <p>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:</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>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).</p>
  
  <p>You do that by using <code>-c copy</code> which tells it to copy both audio and video from the source. You can also do <code>-vcodec copy</code> or <code>-acodec copy</code> 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.</p>
  
  <p>In your case <code>-c copy</code> 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 <code>-f mkv</code> or <code>-f avi</code>.</p>
  
  <p>This does what your client asked for, the h265 stream muxed into a container format without touching it.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-03T18:06:48.317Z
Answers.Text: Thanks that helped me understand things. Maybe you have idea why, but when i play the hevc in ffplay, its laggy but runs. After muxing, It plays the first 2 seconds and then freezes
Answers.UserDisplayName: Mr. MonoChrome
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-03T21:15:27.243Z
Answers.Text: You can try muxing it into mp4 instead, that might be better supported by ffplay.
Answers.UserDisplayName: timonsku
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-03T13:34:47.640Z
Answers.LastActivityDate: 2014-10-03T16:55:55.540Z
Answers.LastEditDate: 2014-10-03T16:55:55.540Z
Answers.UserDisplayName: timonsku
Body: <p>Let me start by saying I'm not a video production guy. I am a programmer so I'm in over my head in certain areas. I've been trying to use ffmpeg to mess around with HEVC encoded video. </p>
  
  <p>I was told it needs to be an HEVC encoded video, with the filetype of mkv, mov, avi, or something real common like that. I though mkv, mov, etc was their own encoding. </p>
  
  <ol>
  <li><p>Can someone help me understand what's being asked for? If I use the command <code>ffmpeg command -i input.265 output.avi</code>, won't it convert and encode it? I don't want that.</p></li>
  <li><p>How do I know what's an encoding and what a container?</p></li>
  <li><p>What commands or links can I look at so I can accomplish this task?</p></li>
  </ol>
  
Tags: <ffmpeg><h.265>
Title: Using a 265 encoded video with a container
UserDisplayName: Mr. MonoChrome
ThreadText: # Using a 265 encoded video with a container
  
  (Asked by: username_0 on 2014-10-03)
  
  Let me start by saying I'm not a video production guy. I am a programmer so I'm in over my head in certain areas. I've been trying to use ffmpeg to mess around with HEVC encoded video.
  
  I was told it needs to be an HEVC encoded video, with the filetype of mkv, mov, avi, or something real common like that. I though mkv, mov, etc was their own encoding.
  
  1. Can someone help me understand what's being asked for? If I use the command `ffmpeg command -i input.265 output.avi`, won't it convert and encode it? I don't want that.
  2. How do I know what's an encoding and what a container?
  3. What commands or links can I look at so I can accomplish this task?
  
  **Tags:** ffmpeg, h.265
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-10-03. Score: 4
  
  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.
  
  > **Comments:**
  > **username_0**: Thanks that helped me understand things. Maybe you have idea why, but when i play the hevc in ffplay, its laggy but runs. After muxing, It plays the first 2 seconds and then freezes  
  > **username_1**: You can try muxing it into mp4 instead, that might be better supported by ffplay.  
  
  ---
  
  