Personal computing discussed

Moderators: renee, Dposcorp

 
Skullzer
Gerbil First Class
Topic Author
Posts: 125
Joined: Thu Feb 17, 2011 10:45 pm

How to convert Mkv to m4v?

Sat Mar 23, 2013 10:59 pm

I've used handbrake to encode mkv to m4v and I've been having some issues. Some google searches resulted some discussions saying that it is faster to just change the container type from mkv to m4v instead of encoding. Does anyone have any experience in this? Recommendations for software to change the container type?
Office PC:
AMD Phenom II x4 955 | ASUS M4A87TD Evo | 8GB ddr3 | EVGA GTX 970 4GB | Antec BP 550 | Antec 300 | Win 7 64
HTPC:
Intel i5-4570 | ASRock H87M | 8GB ddr3 | EVGA GTX 960 2GB | Corsair CX430M | Fractal Design Node 605 | Win 7 64
 
chuckula
Minister of Gerbil Affairs
Posts: 2109
Joined: Wed Jan 23, 2008 9:18 pm
Location: Probably where I don't belong.

Re: How to convert Mkv to m4v?

Sat Mar 23, 2013 11:39 pm

Encoding & changing container types are not the same operation (although it could be possible to re-encode while changing a container type, so the two operations could seem to take place at once). Simply changing the container type should be *very* fast (seconds). This is *not* the same operation as re-encoding from one audio/video codec to another. You will *not* have any meaningful reduction in the size of the output file unless the original container happens to include audio/video tracks that you omit from the final output file. The native resolution & quality of the output file will be the same as what is present in the input.

Here is a video tutorial of the process: http://www.youtube.com/watch?v=i8FNteRQ-8A
Note the limitations on what has to already be present in the mkv container to successfully convert over to .m4v! Not every file will work, the *contents* of the original .mkv need to be in certain supported formats for the finished m4v container to work properly.

Here's another tutorial: http://osxdaily.com/2012/03/23/convert- ... th-subler/
4770K @ 4.7 GHz; 32GB DDR3-2133; Officially RX-560... that's right AMD you shills!; 512GB 840 Pro (2x); Fractal Define XL-R2; NZXT Kraken-X60
--Many thanks to the TR Forum for advice in getting it built.
 
nanoflower
Gerbil Team Leader
Posts: 281
Joined: Wed Mar 04, 2009 1:10 pm

Re: How to convert Mkv to m4v?

Sat Mar 23, 2013 11:48 pm

I'm not sure that what you want to do is possible. I just did a quick test taking a MKV file with an audio and video section and converted it to MP4 and M4V by using http://www.mediacoderhq.com
With MediaCoder you can choose to copy the video and/or audio to the resulting file as well as your output container. The original MKV plays fine in any of my players, as does the MP4 file. The M4V doesn't play in Windows Media Player, VLC or Mediaplayer HC. That suggests to me that something is being lost in the conversion to M4V container but I'm not aware of the limitations of that container. When I run the file through MediaInfo it shows nothing so either Mediacoder isn't producing a valid m4v file or there's some reason that such a conversion will not produce a playable file.
 
sjl
Gerbil
Posts: 71
Joined: Tue Dec 07, 2004 5:14 pm

Re: How to convert Mkv to m4v?

Sun Mar 24, 2013 2:35 am

Skullzer wrote:
Recommendations for software to change the container type?

Okay, let's backtrack a bit.

MKV is a container format. So is M4V. Both hold audio and video. The key difference is the codecs that they support. MKV files can be found with audio and video in just about any codec you care to name - eg, video in MPEG2, H.264, VC-1, etc. M4V files, as defined by Apple, are strictly H.264 video, and either AAC or Dolby Digital audio.

So as long as the MKV file contains H.264 video and AAC or Dolby Digital audio, sure, you can pull the audio/video data out and just dump it into an M4V container, and it should work (as long as the bitrates are within the end device's allowable specifications). But if it doesn't meet that - eg, if it's VC-1 video - you have no alternative but to transcode.

What it comes down to is, what device are you using; and which codecs are in use in the source file? If the codecs in the source are supported by the target device, no need to transcode; if they aren't, you must transcode.
 
Skullzer
Gerbil First Class
Topic Author
Posts: 125
Joined: Thu Feb 17, 2011 10:45 pm

Re: How to convert Mkv to m4v?

Sun Mar 24, 2013 2:57 am

Thanks for the replies guys,

sjl wrote:
What it comes down to is, what device are you using; and which codecs are in use in the source file? If the codecs in the source are supported by the target device, no need to transcode; if they aren't, you must transcode.


The reason for my original inquiry is because my source files (MKV) can't be seen by my Sony TV that is reading from my media server. I also use iTunes for my mobile needs and iTunes also keeps my library organized. So i need a file format that can be used for ALL of my devices and I would prefer to only have 1 copy of said file. I've been using handbrake to transcode the MKV to M4V. It would take anywhere between 1 hour - 2 hours for each file.

I recently found out that I could convert the MKV container to M4V and it would be much faster. Through another forum I learned about a software Xmedia-Recode. It can copy the Mpeg 4AVC/H.264 video file and the AAC audio file in the source MKV file and convert the whole thing into a M4V container, the process only took like 8 minutes on a 6GB file, which is much faster than transcoding through handbrake. The video file seems to work on the devices, the audio on the other hand I'm having some issues with, but I think it's my lack of knowledge and user error that's causing the problems. I just need to fiddle with the options the software is giving me. for some reason it keeps defaulting the source DTS audio to convert to AAC stereo with a low bitrate, I just now changed some settings and we'll see how this attempt goes.

As soon as I can save enough money to build a proper HTPC the whole process will be obsolete. I will be able to hook my computer up directly to my TV, but as of right now I don't have that option.
Office PC:
AMD Phenom II x4 955 | ASUS M4A87TD Evo | 8GB ddr3 | EVGA GTX 970 4GB | Antec BP 550 | Antec 300 | Win 7 64
HTPC:
Intel i5-4570 | ASRock H87M | 8GB ddr3 | EVGA GTX 960 2GB | Corsair CX430M | Fractal Design Node 605 | Win 7 64
 
sjl
Gerbil
Posts: 71
Joined: Tue Dec 07, 2004 5:14 pm

Re: How to convert Mkv to m4v?

Sun Mar 24, 2013 6:53 am

Skullzer wrote:
The reason for my original inquiry is because my source files (MKV) can't be seen by my Sony TV that is reading from my media server. I also use iTunes for my mobile needs and iTunes also keeps my library organized. So i need a file format that can be used for ALL of my devices and I would prefer to only have 1 copy of said file.


Ok. So you need m4v for iTunes, and it absolutely must be (ttbomk) H.264. That defines the parameters of the problem.

The video file seems to work on the devices, the audio on the other hand I'm having some issues with, but I think it's my lack of knowledge and user error that's causing the problems. I just need to fiddle with the options the software is giving me. for some reason it keeps defaulting the source DTS audio to convert to AAC stereo with a low bitrate, I just now changed some settings and we'll see how this attempt goes.


Fairly sure iTunes can't handle DTS, so you'll have to re-encode the audio. Also, check to make sure that each MKV you're transferring over to m4v is indeed H.264; anything in VC-1, or (I'm fairly certain) MPEG-2, can't be used by iTunes, and will have to be transcoded.

Good luck!
 
Dposcorp
Minister of Gerbil Affairs
Posts: 2771
Joined: Thu Dec 27, 2001 7:00 pm
Location: Detroit, Michigan

Re: How to convert Mkv to m4v?

Sun Mar 24, 2013 8:57 pm

Free converter for a limited time linked here:

viewtopic.php?f=30&t=87210

The above posted found it; I am just passing it along, but cant beat the price. Worked for what I needed


Supported Input Format:
High Definition Video:
High Definition Video: AVCHD Video (*.mts, *.m2ts), H.264/MPEG-4 AVC (*.mp4), MPEG2 HD Video (*.mpg; *.mpeg), MPEG-4 TS HD Video (*.ts), MPEG-2 TS HD Video (*.ts), Quick Time HD Video (*.mov), WMV HD Video (*.wmv, *.xwmv), Blu-ray Video (*.mts, *.m2ts), HDTV Video (*.ts), Matroska Video (*.mkv)
HD-Camcorder Video:
JVC HD camcorder Video (*.mod, *.tod), Sony HD camcorder Video(*.mts, *.m2ts), Panasonic & Canon HD camcorder Video
Regular Video:
AVI, MPEG, WMV, MP4, FLV, H.264/MPEG-4, DivX, Xvid, MOV, RM, RMVB, VOB, ASF, 3GP, 3G2, QT, DAT, Google TV, WebM, VPX 8
Website Video:
YouTube, HD YouTube, Dailymotion, Yahoo! Video, Metacafe, Myspace, etc


Supported Output Format:
General Videos:
AVI, DivX, Xvid, MP4, FLV, AVC, MPEG, DVD, WMV, MOV, YouTube
DVD:
DVD Format VOB (*.vob), DVD Folder
High Definition Video:
HD AVI Video (*.avi), HDAVC Video (*.mp4), MPEG4 HD Video (*.mp4), MPEG-2 TS HD Video (*.ts), WMV HD Video (*.wmv), Quick Time HD Video (*.mov), YouTube HD Video (*.mp4)
Other:
MP3, JPEG, BMP
 
Deanjo
Graphmaster Gerbil
Posts: 1212
Joined: Tue Mar 03, 2009 11:31 am

Re: How to convert Mkv to m4v?

Sun Mar 24, 2013 10:43 pm

nanoflower wrote:
The M4V doesn't play in Windows Media Player, VLC or Mediaplayer HC.


M4V plays fine under vlc, Mediaplayer and many others. The only times they shouldn't play is if they are drm protected files. The allowance of DRM is main difference between M4V and MP4.

sjl wrote:
M4V files, as defined by Apple, are strictly H.264 video, and either AAC or Dolby Digital audio.


m4v will also handle other audio as well. The stipulation is that the first stream must be AAC and if an AC3 stream is present it should be in the second stream. You can unofficially add DTS/DTS-ES etc to a third stream but those extra audio streams however will not play on Apple devices.

For simplicities sake however and compatibility with more devices I tend to use mp4 containers through a nice little bash script that watches for folder for files that does a direct copy of the video and transcode via ffmpeg the audio into AAC, keeps a present AC3 or transcode an AC-3 stream if only a DTS/DTS-ES/DTS-HD stream and puts the DTS stream in as a third audio stream.
 
tanker27
Gerbil Khan
Posts: 9444
Joined: Tue Feb 26, 2002 7:00 pm
Location: Georgia

Re: How to convert Mkv to m4v?

Mon Mar 25, 2013 7:28 am

Skullzer wrote:
The reason for my original inquiry is because my source files (MKV) can't be seen by my Sony TV that is reading from my media server.


Thats odd. I have an older Sony TV that reads MKV just fine. Have you looked into updating firmware for the TV?
(\_/)
(O.o)
(''')(''')
Watch out for evil Terra-Tron; He Does not like you!
 
jihadjoe
Gerbil Elite
Posts: 835
Joined: Mon Dec 06, 2010 11:34 am

Re: How to convert Mkv to m4v?

Thu Mar 26, 2015 12:33 am

Dude, just ffmpeg -i "filename.mkv" -vcodec copy -acodec copy "filename.m4v"

Super fast since it only copies the streams to a new container and doesn't do any transcoding.

If the audio is not AAC, then change -acodec copy to -acodec AAC. You may need to add -strict -2 depending on the build you have.
 
travbrad
Gerbil XP
Posts: 423
Joined: Mon Dec 08, 2008 5:39 pm

Re: How to convert Mkv to m4v?

Thu Mar 26, 2015 12:50 am

tanker27 wrote:
Skullzer wrote:
The reason for my original inquiry is because my source files (MKV) can't be seen by my Sony TV that is reading from my media server.


Thats odd. I have an older Sony TV that reads MKV just fine. Have you looked into updating firmware for the TV?


I have two Sony Blu-Ray players and both of them play MKV just fine too, both locally and from my media server. I agree it seems strange that one specific Sony TV model wouldn't support it, but we are talking about Sony after all. :P
6700K @ 4.6ghz || ASUS Sabertooth Z170 S || Crucial Ballistix DDR4-2400 16GB
ASUS STRIX GTX 970 || EVGA Supernova 750W G2 || Noctua NH-D15 || Fractal Define R5
Crucial MX200 500GB || 2x WD Blue 6TB || 2x WDGreen 2TB
Philips 272G5DYEB || Dell U2312HM

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On