<p>Use MKVToolNix:
Drag and drop your video into the Multiplexer Input and click on "Start multiplexing".
No quality loss, even all metadata is preserved (in my experience).</p>

CC BY-SA 3.0
2018-04-10T07:08:37.310Z
2018-04-10T07:08:37.310Z
damian101
<p>Your command </p>

<pre><code>ffmpeg -i "path/to/file.m4v" -c:v copy -c:a copy "path/to/file.mkv"
</code></pre>

<p>does do a lossless copy since no recompression occurs.</p>

<p>You have to note all warning or error messages during the conversion. The command below will only throw an error if the file properties can't be detected, like stream info.</p>

<pre><code>ffmpeg.exe -v error -i "path/to/file.mkv"
</code></pre>

<p>Run</p>

<pre><code>ffmpeg.exe -i "path/to/file.mkv" -map 0 -f null -
</code></pre>

<p>to see if the entire file decodes fine.</p>

CC BY-SA 3.0
2017-12-03T10:03:47.213Z
I didn't know about this command. Does it complement the one I was using or it does the properties checking as well? Anyway, I ran it and no errors have been reported so I assume I'm safe to delete the M4Vs, right?
user5613506
CC BY-SA 3.0
2017-12-03T10:12:44.350Z
The last command will check both the properties as well as a decode check. If it runs without errors, the mkv is good.
Gyan
CC BY-SA 3.0
2017-12-03T04:55:33.763Z
2017-12-03T04:55:33.763Z
Gyan
<p>I have a bunch of files I've "shrunk" with Handbrake using a custom preset I've built after reading what each of the advanced options of the x264 encoder, at least those listed under "Advanced" tab, does.</p>

<p>When I encoded these files, originally MP4 I don't have anymore, for some reason I don't remember I chose the M4V over MKV.</p>

<p>Then today I was uploading one of the files and got an error that M4V wasn't supported. Thinking I could do a "lossless" conversion with FFMPEG I ran:</p>

<pre><code>ffmpeg -i "path/to/file.m4v" -c:v copy -c:a copy "path/to/file.mkv"
</code></pre>

<p>And all files were converted without problems, at least none FFMPEG could relate with:</p>

<pre><code>ffmpeg.exe -v error -i "path/to/file.mkv"
</code></pre>

<p>But then again I'm no video expert, not even close to that.</p>

<p>Do I have any sort of loss doing that? I would like to know so I could delete the M4V that as I read it more proprietary in favour of the open-source and more acceptable MKV</p>

<ffmpeg><conversion><file-formats>
Do I have any sort of loss converting an M4V file to MKV?
user5613506
# Do I have any sort of loss converting an M4V file to MKV?

(Asked by: username_0 on 2017-12-02)

I have a bunch of files I've "shrunk" with Handbrake using a custom preset I've built after reading what each of the advanced options of the x264 encoder, at least those listed under "Advanced" tab, does.
When I encoded these files, originally MP4 I don't have anymore, for some reason I don't remember I chose the M4V over MKV.
Then today I was uploading one of the files and got an error that M4V wasn't supported. Thinking I could do a "lossless" conversion with FFMPEG I ran:
ffmpeg -i "path/to/file.m4v" -c:v copy -c:a copy "path/to/file.mkv"

And all files were converted without problems, at least none FFMPEG could relate with:
ffmpeg.exe -v error -i "path/to/file.mkv"

But then again I'm no video expert, not even close to that.
Do I have any sort of loss doing that? I would like to know so I could delete the M4V that as I read it more proprietary in favour of the open-source and more acceptable MKV

**Tags:** ffmpeg, conversion, file-formats


---

## 2 answers

### Answer by username_2 on 2017-12-03. Score: 3 | Accepted answer

Your command 
ffmpeg -i "path/to/file.m4v" -c:v copy -c:a copy "path/to/file.mkv"

does do a lossless copy since no recompression occurs.
You have to note all warning or error messages during the conversion. The command below will only throw an error if the file properties can't be detected, like stream info.
ffmpeg.exe -v error -i "path/to/file.mkv"

Run
ffmpeg.exe -i "path/to/file.mkv" -map 0 -f null -

to see if the entire file decodes fine.

> **Comments:**
> **username_0**: I didn't know about this command. Does it complement the one I was using or it does the properties checking as well? Anyway, I ran it and no errors have been reported so I assume I'm safe to delete the M4Vs, right?  
> **username_2**: The last command will check both the properties as well as a decode check. If it runs without errors, the mkv is good.  

---

### Answer by username_1 on 2018-04-10. Score: 0

Use MKVToolNix:
Drag and drop your video into the Multiplexer Input and click on "Start multiplexing".
No quality loss, even all metadata is preserved (in my experience).


---

