Why .MKV instead of .MP4?Edit:New Problem-Look at New Post

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
someone800
Posts: 28
Joined: Tue Jan 01, 2008 5:12 am

Why .MKV instead of .MP4?Edit:New Problem-Look at New Post

Post by someone800 »

Hi,

There is a new problem I am getting. Please scroll down to my most recent post on this thread.

Original Post:
Hi,

I have been using an Intel iMac for the last several months to encode H.264 (iPod) DVDs for my iPod Touch. I think they always end up as .MP4s.

However, recently, I upgraded my PC, so now I plan to do my encoding work on it instead. Over the past few days I have been experimenting with some DVDs on both machines to see how they come out.

On the iMac, the DVD I ripped came out nicely as usual and weighed in at 1.58 GB. I used the same settings on my PC and the movie came out at the same size; however, the difference I noticed was the file format. It was .MKV instead of .MP4.

I can't get this to play in Quicktime and it won't import into iTunes. The thing is, I believe I used the exact same settings on the PC as on the iMac. How can I get it to come out in the MPEG-4 file container? Also, the video plays in VLC. The video came out great by the way. The quality seems just barely below DVD quality and everything is great. However, when I seek foreword is has to seek through all the movie before that to get to the part I requested. Additionally, in the properties for the video file in VLC, it says the codec is mp4a. I have searched for the answer on this forum and have not found anything to completely suit my needs. What should I do?

Thanks!
Last edited by someone800 on Wed Jan 02, 2008 5:06 am, edited 1 time in total.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Post by jbrjake »

If you had really used the same settings, it wouldn't have been an MKV.
charlesr
Posts: 10
Joined: Tue Jan 01, 2008 10:28 pm

Post by charlesr »

I just discovered handbrake this afternoon. I tried out the windows gui. I found the same problem so checked the forum. Good to see it's not just me. It doesn't let you output as .mp4 even if you select it from the dropdown "save as type". It always names the file .m4v instead.

Would just changing the end of the filename in the destination box to .mp4 solve this or would this cause problems?

I've uploaded a couple of screenshots to show you what happened.

Image

The above is what I put into the save box (after pressing browse in the destination bit). The below is what appears in the destination bit after pressing ok.

Image
charlesr
Posts: 10
Joined: Tue Jan 01, 2008 10:28 pm

Post by charlesr »

I also notice the 2nd comment at the link below has the same problem (see "Posted December 11, 2007 by thundar")

http://www.videohelp.com/tools/HandBrake#usercomments
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Post by s55 »

mkv != m4v


m4v = mp4. There is no difference. Quicktime needs the extension to be m4v for chapter makers to work. The file itself is identical though.
charlesr
Posts: 10
Joined: Tue Jan 01, 2008 10:28 pm

Post by charlesr »

Ah sorry, bloomin extensions all look the same :(

What about trying to stream to the xbox360? Will renaming the m4v to mp4 work fine? I don't know if the 360 will notice m4v files.
charlesr
Posts: 10
Joined: Tue Jan 01, 2008 10:28 pm

Post by charlesr »

Gah. Sorry about hijacking your thread with my incompetance man.
someone800
Posts: 28
Joined: Tue Jan 01, 2008 5:12 am

Post by someone800 »

sr55 wrote:mkv != m4v


m4v = mp4. There is no difference. Quicktime needs the extension to be m4v for chapter makers to work. The file itself is identical though.
Then why was it that when I renamed the file extension from "MKV" to "M4V", I got this error from Quicktime:

Code: Select all

Error -2048 Couldn't open the file DVD.M4V because it is not a file that QuickTime understands.
And then this is also what I get when I try opening the MKV file:

Code: Select all

Error -2048 Couldn't open the file DVD.MKV because it is not a file that QuickTime understands.
Additionally, you mentioned that it needs to be the .M4V file extension instead of .MP4 for the chapter markers. However, I just looked at my encodes done the same way on the iMac that have chapter markers and the imported movie files in my iTunes Movie folder are of the .mp4 extension.

What is wrong that I am doing?

Thanks!
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Post by s55 »

mkv files are not the same as mp4 or m4v.

You can't rename mkv to mp4 or m4v.


The error message indicates the encode never finished. Either it crashed or you never let it finished.
someone800
Posts: 28
Joined: Tue Jan 01, 2008 5:12 am

Post by someone800 »

sr55 wrote:mkv files are not the same as mp4 or m4v.

You can't rename mkv to mp4 or m4v.


The error message indicates the encode never finished. Either it crashed or you never let it finished.
Thanks, but as I said earlier in my first post, was that I was able to open and play the file in VLC and it looked great. However, something I noticed was that when I tried to seek foreword, it would have to seek through the movie part before it.

Any ideas?

Thanks!
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Post by s55 »

it would have to seek through the movie part before it.
This is normal. Handbrake doesn't add cue markers to mkv files. (It's not required by the mkv specification) This is why VLC seems to seek to the point you selected. This is something that may/may not be added in the future. I don't know.

Also QuickTime doesn't support MKV files, hence why it won't recognize the file

Make sure you are using MP4/M4V file extension (in Handbrake) for QT / iTunes compatibility. This will mean a re-encode if your file is currently mkv
someone800
Posts: 28
Joined: Tue Jan 01, 2008 5:12 am

Post by someone800 »

sr55 wrote:
it would have to seek through the movie part before it.
This is normal. Handbrake doesn't add cue markers to mkv files. (It's not required by the mkv specification) This is why VLC seems to seek to the point you selected. This is something that may/may not be added in the future. I don't know.

Also QuickTime doesn't support MKV files, hence why it won't recognize the file

Make sure you are using MP4/M4V file extension (in Handbrake) for QT / iTunes compatibility. This will mean a re-encode if your file is currently mkv
Thanks. I think I got it working now. For some reason my custom preset I made (basically the iPod High-Rez preset except with 2-passes) when I would load it (or change presets in general I believe) after selecting where to save my movie as a .mp4 file, it would automatically change it to a .mkv file. However, this was changed when I would just tell it where to save the file again as a .mp4 and it would say that it is going to save it as a .m4v file.

It should work fine, but I am ripping the movie again.

Thanks for your help!
someone800
Posts: 28
Joined: Tue Jan 01, 2008 5:12 am

Post by someone800 »

Whoa. Once you think you have everything figured out a new problem pops up.

This encode seemed to go successfully without Handbrake telling me about any problems. I got the .M4V file I was wanting to get. It also plays in QuickTime.

However, for some reason, across the entire movie, there is a lot of white, multicolored blocks jittering all around the movie distorting the image. Sound plays back fine and you can also see that it went through and encoded the entire movie from start to finish, but for some reason, there is this white, multicolored blockiness jittering all around the screen. I played it back in VLC to see if Quicktime was the problem and it wasn't. I got the same problem-it seems like it is hard-coded into the video. I guess you could say it looks pixilated. Not all of the movie though-just parts of the foreground. Also, for some reason, instead of the 640x272 resolution I think it should be, it is 640x320. Is the resolution what is causing this problem? I created my own setting for Handbrake as I said before, but for some reason unlike the Mac version, it won't show up in the Preset list (I have to load it every time from a file) and thus won't let me set it as default in the main list for every time the program starts.

What is strange is that when I did the original encode on the PC in .MKV, it came out perfectly fine and looked great except for the container.

What should I do?

Thanks!
royone
Enlightened
Posts: 124
Joined: Thu Sep 06, 2007 6:06 pm

Post by royone »

I'd try using VLC to put the MKV in a MOV container. There's a Wizard under the File menu that will walk you through it. Don't check the boxes for transcoding, and it will leave the content unchanged. In fact, that's what I'm going to try the next time I screw up and generate an MKV. Like you, I find the always-search-from-the-beginning navigation to be a deal-breaker.

Of course, there may be features in the MKV encode that you didn't notice that aren't compatible with Quicktime.

No idea what the blockiness you're seeing is. I get something similar when I play a DVD in VLC with DVD43 running, but that doesn't have anything to do with a Handbrake-encoded file.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Post by jbrjake »

someone800 wrote:However, for some reason, across the entire movie, there is a lot of white, multicolored blocks jittering all around the movie distorting the image. Sound plays back fine and you can also see that it went through and encoded the entire movie from start to finish, but for some reason, there is this white, multicolored blockiness jittering all around the screen. I played it back in VLC to see if Quicktime was the problem and it wasn't. I got the same problem-it seems like it is hard-coded into the video. I guess you could say it looks pixilated. Not all of the movie though-just parts of the foreground. Also, for some reason, instead of the 640x272 resolution I think it should be, it is 640x320. Is the resolution what is causing this problem? I created my own setting for Handbrake
How about you share those settings? Or do you enjoy forcing us to guess at random?

I'd start by turning off 2-pass since. As has been explained again and again and again and again on this form, 2-pass is incompatible with the vbv options the iPod presets use to ensure a steady bitrate within the device's limits. Whether or not that's your problem is impossible for me to say as long as you refuse to describe your settings in exact detail.
someone800
Posts: 28
Joined: Tue Jan 01, 2008 5:12 am

Post by someone800 »

jbrjake wrote:
someone800 wrote:However, for some reason, across the entire movie, there is a lot of white, multicolored blocks jittering all around the movie distorting the image. Sound plays back fine and you can also see that it went through and encoded the entire movie from start to finish, but for some reason, there is this white, multicolored blockiness jittering all around the screen. I played it back in VLC to see if Quicktime was the problem and it wasn't. I got the same problem-it seems like it is hard-coded into the video. I guess you could say it looks pixilated. Not all of the movie though-just parts of the foreground. Also, for some reason, instead of the 640x272 resolution I think it should be, it is 640x320. Is the resolution what is causing this problem? I created my own setting for Handbrake
How about you share those settings? Or do you enjoy forcing us to guess at random?

I'd start by turning off 2-pass since. As has been explained again and again and again and again on this form, 2-pass is incompatible with the vbv options the iPod presets use to ensure a steady bitrate within the device's limits. Whether or not that's your problem is impossible for me to say as long as you refuse to describe your settings in exact detail.
My settings is basically the iPod High-Rez preset with 2-passes enabled and chapter markers.

Currently, I am trying it again (made sure the CLI said the correct resolution this time).
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Post by jbrjake »

someone800 wrote:My settings is basically the iPod High-Rez preset with 2-passes enabled and chapter markers.

Currently, I am trying it again (made sure the CLI said the correct resolution this time).
I didn't ask what your settings "basically" are I asked for what they are exactly, in detail. And I already told you not to use 2-pass.
someone800
Posts: 28
Joined: Tue Jan 01, 2008 5:12 am

Post by someone800 »

Thanks for the help, but I got it working with 2-passes. Turns out the resolution was the problem for some reason.

Thanks!
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Post by dynaflash »

someone800 wrote:Thanks for the help, but I got it working with 2-passes.
Well, at least til you hit a *very* dirty or complex source and the local bitrate spikes through the roof since the vbv buffer will be ignored that is in the preset because your using two pass encoding ... ;)
someone800
Posts: 28
Joined: Tue Jan 01, 2008 5:12 am

Post by someone800 »

dynaflash wrote:
someone800 wrote:Thanks for the help, but I got it working with 2-passes.
Well, at least til you hit a *very* dirty or complex source and the local bitrate spikes through the roof since the vbv buffer will be ignored that is in the preset because your using two pass encoding ... ;)
Yeah, thanks for suggesting not to use 2-passes, but since backing up takes hours per movie in this format, I'd rather try to get the best quality for the size the first time.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Post by jbrjake »

someone800 wrote:Yeah, thanks for suggesting not to use 2-passes, but since backing up takes hours per movie in this format, I'd rather try to get the best quality for the size the first time.
Err...but as we're trying to tell you, 1-pass gets the best quality with VBV enabled. I don't understand why you're saying you want to use 2-pass "since backing up takes hours" when 2-pass just makes it take longer and leads to unpredictable results...
someone800
Posts: 28
Joined: Tue Jan 01, 2008 5:12 am

Post by someone800 »

jbrjake wrote:
someone800 wrote:Yeah, thanks for suggesting not to use 2-passes, but since backing up takes hours per movie in this format, I'd rather try to get the best quality for the size the first time.
Err...but as we're trying to tell you, 1-pass gets the best quality with VBV enabled. I don't understand why you're saying you want to use 2-pass "since backing up takes hours" when 2-pass just makes it take longer and leads to unpredictable results...
Thanks, I see what you mean; however, with my selected ABR of 1500kbps, the most I've seen it spike to is 1648kbps or something like that. Additionally, it seems fine considering the iPod Video 5/5.5 Gens limit is 2500kbps and the Classics and the Touch's (not sure about the Nano) is apparently 10,000kbps according to the stickied chart.
Post Reply