Body: <p>The following exemplary FFmpeg command takes an MP4 file, doesn't do any re-encoding, but simply writes the output to an MKV file:</p>
  <pre><code>ffmpeg -i input.mp4 -c copy output.mkv
  </code></pre>
  <p>If I run the same command twice, with two different output files:</p>
  <pre><code>ffmpeg -i input.mp4 -c copy output1.mkv
  ffmpeg -i input.mp4 -c copy output2.mkv
  </code></pre>
  <p>The resulting files will have differing checksums:</p>
  <pre><code>aa46d308197cb08d71f271c61d5412ad  output1.mkv
  8b48c3ebdbf2384705fcb78e864d12e3  output2.mkv
  </code></pre>
  <p>This difference disappears if I convert them back to an MP4 container:</p>
  <pre><code>ffmpeg -i output1.mkv -c copy output1.mp4
  ffmpeg -i output2.mkv -c copy output2.mp4
  </code></pre>
  <p>For differing MKV input files I'm getting the same checksum for the MP4 output files:</p>
  <pre><code>24e92b3e228db780b5feab14255870e4  output1.mp4
  24e92b3e228db780b5feab14255870e4  output2.mp4
  </code></pre>
  <p>So obviously the video itself hasn't been modified and there's some metadata in the MKV container that's responsible. What data is it and how do I prevent this data from being added?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-04-16T11:20:19.043Z
Comments.Text: See [answer](https://stackoverflow.com/a/78319520/17502540) for the same question.
Comments.UserDisplayName: Alain1A45
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-04-16T11:41:40.913Z
Comments.Text: Original question has been closed and when voting to close, it seems like migration from StackOverflow to here isn't an option. I've already messaged Gyan to post their answer here again. However, feel free to post an answer yourself. :) For example, I'm still wondering if `-bitexact` has further implications, other than avoiding random track ids.
Comments.UserDisplayName: finefoot
Tags: <ffmpeg><encoding><mp4><mkv><metadata>
Title: Same FFmpeg command produces different Matroska MKV output file checksum
UserDisplayName: finefoot
ThreadText: # Same FFmpeg command produces different Matroska MKV output file checksum
  
  (Asked by: username_0 on 2024-04-15)
  
  The following exemplary FFmpeg command takes an MP4 file, doesn't do any re-encoding, but simply writes the output to an MKV file:
  
  ```
  ffmpeg -i input.mp4 -c copy output.mkv
  
  ```
  
  If I run the same command twice, with two different output files:
  
  ```
  ffmpeg -i input.mp4 -c copy output1.mkv
  ffmpeg -i input.mp4 -c copy output2.mkv
  
  ```
  
  The resulting files will have differing checksums:
  
  ```
  aa46d308197cb08d71f271c61d5412ad  output1.mkv
  8b48c3ebdbf2384705fcb78e864d12e3  output2.mkv
  
  ```
  
  This difference disappears if I convert them back to an MP4 container:
  
  ```
  ffmpeg -i output1.mkv -c copy output1.mp4
  ffmpeg -i output2.mkv -c copy output2.mp4
  
  ```
  
  For differing MKV input files I'm getting the same checksum for the MP4 output files:
  
  ```
  24e92b3e228db780b5feab14255870e4  output1.mp4
  24e92b3e228db780b5feab14255870e4  output2.mp4
  
  ```
  
  So obviously the video itself hasn't been modified and there's some metadata in the MKV container that's responsible. What data is it and how do I prevent this data from being added?
  
  **Tags:** ffmpeg, encoding, mp4, mkv, metadata
  
  > **Comments:**
  > **username_1**: See [answer](https://stackoverflow.com/a/78319520/17502540) for the same question.  
  > **username_0**: Original question has been closed and when voting to close, it seems like migration from StackOverflow to here isn't an option. I've already messaged Gyan to post their answer here again. However, feel free to post an answer yourself. :) For example, I'm still wondering if `-bitexact` has further implications, other than avoiding random track ids.  
  
  ---
  
  ## 0 answers
  
  