View Full Version : h.264 video and ac3 audio - what container besides mkv?
carmat06
1st September 2007, 04:19
Are there any mainstream containers that can put ac3 audio in with h.264 video? I thought avi could do this but staxrip says that the muxer and encoder are not compatible. Can anyone shed some light on this for me?
Thanks,
Matt
potatochobit
1st September 2007, 04:53
I can only think of MKV or MP4
AVI will not support AC3 if that is what you were trying to do.
honestly, I wouldn't put H264 in AVI, anyway.
carmat06
1st September 2007, 05:08
Can you recommend a utility for putting h.264 and ac3 audio into a mp4 container? Staxrip says the audio is not supported by the container if I try to do that. It will only allow mp3, aac and ogg. I'm trying to preserve the DD 5.1 for s/pdif passthrough to a receiver. I'd like to use mkv but I use SageTV and its mkv support is unofficial and very bad. Thanks!
Matt
foxyshadis
1st September 2007, 20:29
You can put ac3 and h264 in avi just fine, all you need is avimux_gui (and some people manage to get it working with vdubmod). Whether this will work with sage is anyone's guess. You'll never be able to easily edit the stream again, so keep the source somewhere safe so you can reconvert if you ever want to in the future.
ffmpeg or mencoder might be able to mux ac3 in mp3. Normally only nero does. Doing it is non-standard, only nero-certified devices and players can read it.
Bigmango
1st September 2007, 21:14
You can mux h264 + ac3 in m2ts (this container also supports mpeg2, dts, dts-hd, dd-hd, pcm,...). This is the industry standart container, also recognized by the blu-ray players and the ps3 etc...
A good muxer for this is the Elecard Xmuxer. Mkv2ts is also a nice tool (will remux an mkv into a ts file); tsremux is another good choice to mux m2ts/ts or avchd output (but may still be somewhat buggy with avc files).
mahsah
5th September 2007, 00:38
You can put anything in anything, its getting it to play back that is the trick :)
mp4 and avi can have support for ac3 hacked into them, but why not just use MKV? I also suppose you could use .TS as Bigmango mentioned, but that format is not good for file seeking if I remember correctly...
Bigmango
5th September 2007, 01:39
... its getting it to play back that is the trick :)
Yep, that's the point of the discussion :)
mp4 and avi can have support for ac3 hacked into them, but why not just use MKV? I also suppose you could use .TS as Bigmango mentioned, but that format is not good for file seeking if I remember correctly...
Mkv is technically the best container. The problem is that it's not a standard, so it's very difficult to play back outside of a PC. Avi playback is also limited.
2 of the new HD standards are mp4 and the ts containers. "IF" you find the tool to mux it, Mp4/ac3 is also limited to PC or some rare select devices (if they even exist?). So if you are going the mp4 path you will chose aac.
If you are looking for compatibility, this leaves you with the m2ts/ts container. I have no problem with file seeking on my PC and the ps3. Seeking in AVCHD discs and on blu-ray devices also works fine... (well, how could blu-ray and avchd be on the market if there were seeking problems? :) )
Dark Shikari
5th September 2007, 04:21
Mkv is technically the best container. The problem is that it's not a standard, so it's very difficult to play back outside of a PC.What do you mean its "not a standard"? The bitstream standard was finalized ages ago.
Bigmango
5th September 2007, 14:47
What do you mean its "not a standard"? The bitstream standard was finalized ages ago.
Mkv is not a standard recognized by the industry, you can't play it anywhere outside of a PC and less than a couple of very rare devices. Today there still is no evidence that it will once be widely supported.
Just look at the new HD standard. They had the choice and instead of taking both they preferred the sucky mp4 compared to the better mkv...
Dark Shikari
5th September 2007, 21:00
Mkv is not a standard recognized by the industry, you can't play it anywhere outside of a PC and less than a couple of very rare devices. Today there still is no evidence that it will once be widely supported.
Just look at the new HD standard. They had the choice and instead of taking both they preferred the sucky mp4 compared to the better mkv...Some devices have already announced support for MKV.
On the other hand, MP4 is "technically" supported, but in order to even have a chance of working on any device you need to completely re-encode the bitstream to very specific specifications anyways...
Bigmango
6th September 2007, 01:38
On the other hand, MP4 is "technically" supported, but in order to even have a chance of working on any device you need to completely re-encode the bitstream to very specific specifications anyways...
Yes. Actually you are having problems with your files because they do not follow the standard. You need to re-encode your file to follow the "standard" specs (here I am not talking about the iso avc specs, I am talking about the specs chosen by the industry; i.e level 4.1).
Usually the commercial and professional tools will always output standard compliant files (matching one of the avc levels). With most (all?) of the commercial tools you just can't output files that are not standard compliant.
The problem arises with the open source geeky apps coded by the common Joe. With those tools if 3 people compress the same file you will get 3 different outputs. This is imho a huge ridiculous mess. The common geeky Joe thinks his app is powerful because it boasts a zillon settings, instead of making a professional tool with standard compliant settings and hiding the advanced features behind options settings. This way, if 3 people encode the same file you get the same standard compliant output, and the power user who knows what he is doing can tweak it in the advanced options if he wants.
This is also a problem that was raised by some of the PS3 firmware developers in interviews. The PS3 plays industry standard files; they are still adding support to play more files but it takes time.
So yes, unfortunately the industry has not chosen to adopt the full avc iso specs and made only part of them their standard (with the different avc levels). You can't do anything about this in the short term. The only thing that can be done today is for the open source tools developers to make "industry standard" tools. Untill then, 3 different users will still output 3 different files from the same source without knowing what they are doing.
foxyshadis
6th September 2007, 05:17
Most of the time, any low-bitrate encode made with MeGUI or Recode will be on par or simpler than HD disc specs. The HD specs allow nearly all the features of AVC, long GOPs being the only major holdout (and that's not hard to implement), while also using more advanced features like interlacing. Supporting the video isn't the issue, it's the container and the audio stream that's difficult, and Apple & Nero's no better about supporting an industry standard spec than any open source solution. It has nothing to do with commercial vs open source, but simply meeting the needs of different customers (content providers vs home users).
Surprising to me, but mkv hardware appears to be coming just like avi hardware eventually did. Build it and they will come, I guess.
jeffnoone
7th September 2007, 18:11
Can I ask for some specifc directions on the issue of getting a H264 video stream and and AC3 stream into a .mkv container, and then playable by consoles/STB (specifically such as the PS3, XBox360)
The starting point would be one of these high definition H264/AC3 .ts files that can be downloaded from various places
I would demux the file first
I have read a number of posts on this issue, but there seem to be multiple approaches and frequently updating of tools, so can I get the current advice on
1. best demuxer in this situation
2. best way to remux into .mkv
3. any adjustments I have to make to the H264 or AC3 streams after demuxing
I have read also the idea of converting the AC3 to AAC 6-channel; is there any significant loss of quality in this?
Particularly if the answer to the first set of questions is "no" (cant easily do this and get PS3/XBox4360 to play), what is best way to pursue .mp4 idea, so that PS3/XBox4360 can play
In terms of choosing methods, I would look for a reliable method without sync problems and with minimum number of input points from me - long processing/remuxing/conversion time is not an issue
Thanks
Jeff
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.