PDA

View Full Version : .m2ts and .mp4 container question, and converting between them


KyleG
3rd January 2009, 21:25
Reason For My Questions
I recently bought one of the little WD HD Media players, that plug into your hard drive, and TV and plays all sorts of media formats. I really love it and seems to play every format I throw at it. What I do with my blu ray movies, is take the main .m2ts file, and remux it to just have the main video stream, and the main audio stream (converted to AAC). So I have a blu ray disc, in just one file with the main movie and sound. It plays perfect on the WD HD Media player in 1080p and everything. The tiny inconvenience is that, I can't get thumbnails of the video using the .m2ts format (?).

My Understanding, and I could be way off here, is that the m2ts file is a container format (similar to mp4), but for what ever reason, it doesn't support an area of the file for thumbnails or my media player just doesn't support it. The Media Player does support thumbnails for the mp4 container format though.

So what my goal is, is to put the AAC audio stream, and the Blu Ray Video Stream (.h264??) into the .mp4 container, so I can have my thumbnails (as well as possibly other little meta information) of movies or shows when I plug it into my TV.

My Understanding of the Formats
I'm pretty sure the video part of the .m2ts is some sort of mpeg-4 (.h264 AVC or something?), and the audio part is AAC (5.1 channels or w/e).

The .mp4 container format allows for both the video format of the .m2ts file, and the audio format of AAC

My Progress/Experience
Since I think the two containers are fairly similar, I didn't think it would be such a problem, to put the audio and video into a mp4, so I could have my little thumbnails or whatever I want. I've been trying for several days now, to convert, or get what i want, with very little luck. I've tried quite a few programs, but since I'm still a big noob to video encoding and the formats and what not, I never really know what settings to set or anything. I've got it done a couple times, but the picture quality is always worse. The whole point of the 1080p TV and box that can play 1080p was not to have a crappy picture. I've tried setting all the settings to max and what not with these programs before, but then the time to complete is like 200 hours or something. Which is confusing to me, since I didn't think there was really that much to convert...I thought it would be just as simple to take the video stream, take the audio stream, mux them together into the mp4 container, and fill in whatever else I want.

My Question
Is it possible to easily take the video and audio stream (converted to AAC) of a blu ray .m2ts file. and put it into the mp4 container format? Without losing any quality of the audio, or the video? If so how? Even some nice google search terms would be helpful.


I'm sorry this turned into a longer post than I anticipated, I just wanted to try to explain exactly where I'm at, and why i'm trying to do this. If my question doesn't make any sense, I'll post back trying to explain why/what i'm trying to do better. Also sorry if this a noob question. I've tried lots of things and researched as much as I could before posting the question. Thanks alot.

Oleg Rode
4th January 2009, 11:10
Sorry for my English...

Reason For My Questions
My Understanding, and I could be way off here, is that the m2ts file is a container format (similar to mp4), but for what ever reason, it doesn't support an area of the file for thumbnails or my media player just doesn't support it. The Media Player does support thumbnails for the mp4 container format though.
IMHO It is a problem of your Hardware Media Player. Because it simply can not create thumbnails for your m2ts videos. Well it is not problem, it is a restriction of the player's software. Hope you are understanding me.:rolleyes:

So what my goal is, is to put the AAC audio stream, and the Blu Ray Video Stream (.h264??) into the .mp4 container, so I can have my thumbnails (as well as possibly other little meta information) of movies or shows when I plug it into my TV.
1. MP4 got a little problem - not all hardware players support 64-bit adressing. So, in this case max. size of the file must be less 4GB
2. Your audio receiver supports 5.1 AAC, doesn't it?;)
My Understanding of the Formats
I'm pretty sure the video part of the .m2ts is some sort of mpeg-4 (.h264 AVC or something?), and the audio part is AAC (5.1 channels or w/e).
1. AAC is not allowed in m2ts.
2. Three video codecs are allowed in m2ts - MPEG2, VC-1 and AVC
The .mp4 container format allows for both the video format of the .m2ts file, and the audio format of AAC
VC-1 is not allowed in mp4
My Progress/Experience
Since I think the two containers are fairly similar, I didn't think it would be such a problem, to put the audio and video into a mp4, so I could have my little thumbnails or whatever I want. I've been trying for several days now, to convert, or get what i want, with very little luck. I've tried quite a few programs, but since I'm still a big noob to video encoding and the formats and what not, I never really know what settings to set or anything. I've got it done a couple times, but the picture quality is always worse. The whole point of the 1080p TV and box that can play 1080p was not to have a crappy picture. I've tried setting all the settings to max and what not with these programs before, but then the time to complete is like 200 hours or something. Which is confusing to me, since I didn't think there was really that much to convert...I thought it would be just as simple to take the video stream, take the audio stream, mux them together into the mp4 container, and fill in whatever else I want.
So, you need good mp4 muxer, NOT converter.
My Question
Is it possible to easily take the video and audio stream (converted to AAC) of a blu ray .m2ts file. and put it into the mp4 container format? Without losing any quality of the audio, or the video? If so how? Even some nice google search terms would be helpful.
Yep, it is possible. And we need just some free and easy apps.
But I got a little question to you. Your HW player support MKV. What is about to remux your media content to this container? You just need to download mkvtoolnix (use Google), run MKVmerge GUI and remux your media files to MKV. It is simple enough - just add your media file and press "start muxing"

mediator
4th January 2009, 13:57
VC-1 is not allowed in mp4

http://www.mp4ra.org/specs.html#smptevc1

Oleg Rode
4th January 2009, 19:31
http://www.mp4ra.org/specs.html#smptevc1
Yes, but what program can mux a VC-1 stream to mp4 container?:sly:

KyleG
4th January 2009, 21:45
Thank you very much Oleg Rode, for your response.

Ok, I was wrong about the audio formats. For the .m2ts files, I use AC3, but for mp4s, it looks like I have to use AAC...in the end, this seems like a dumb idea, as not may things support 5.1 AAC, and converting AC3 to AAC isn't the easiest to do either. (Only way I found was to convert the .ac3 to the AAC but within a .mp4, and then demux the .mp4 to .aac...sort of annoying)

browsing around, I saw some posts, about muxing .AC3 and .264 into a mp4, but very few if any hardware devices recognize this. This post was from over a year ago, has there been any progress on this?

I suppose i'll try to find one of these mp4s with AC3, and see if my device can play it.

Right now it looks like my best options for big Blu Ray quality files are.

.m2ts (AVC *i think, and AC-3)
.mkv (h264 and AC-3)
.mp4 (h264, and AAC) -if my device supports 64 bit addressing

I would really like to use mp4s, but right now it's seeming like they are more trouble than they're worth. MKV I guess is the next best option? Unless I missed something of course.

Thanks Again.
Kyle