PDA

View Full Version : Questions regarding MP4 container/AAC 5.1/AC3/x264/streaming/subs/HD-formats


odyssey
5th June 2007, 15:24
I'm creating a streaming server with backups of all my DVD's. For this I'm considering offline encoding with x264, but I have several unanswered questions in regard to this.

I would like to maintain "future" compatibility, f.ex. be able to burn it on Blu-ray/HDDVD without reencoding, and use it's set of features on my streams.

The requirement for this is:

- Streamability
- Works on XBMC (video, audio streams, subtitles)
- Works with some software/filter. I think Quicktime would be preffered, but from my initial tests, I wouldn't hold my breath for this.

I think the most obvious container format would be MP4, so that's my initial preference.


* AUDIO *

I would prefer to reencode the AC3 streams to AAC, to save space. I saw a claim (don't remember where) that AAC are superior to AC3 in lossy terms, but my test with Nero AAC did not reach transparancy until 400kbit.

(Note: I'm reencoding the audio no matter what format I end up with because of framerate conversion)

1. Does Blu-ray/HDDVD support AAC multichannel?

2. Which AC3 encoder are considered to encode the best quality over bitrate? (The encoder in Besweet cuts off the beginning).

3. At which bitrate should AC3 multichannel be transparant?

4. AC3 is only supported by private streams in the MP4 container. Is it wise to use it?

5. If I choose to add AC3 in my MP4 container, how do I handle multiple audio streams?


* VIDEO *

6. Which framerate is used in Blu-ray/HDDVD? AFAIK the movies are left intact, but should I use 23.98 or 24 fps straight?

7. Are 25 fps supported in Blu-ray/HDDVD?

8. How are fullscreen content handled in HD? HD is square pixel, and widescreen, but would fullscreen content be bordered in the sides, to fit widescreen?

9. Do Blu-ray/HDDVD respect content of arbitrary resolutions, f.ex. cropped video? Would it add black borders anywhere, also if you crop fullscreen content by it's width?

10. Would 1000 kbit be sufficient for the encoding, when I intend to use 480p (maybe upscale to 720p)? I did a small test, and it seemed nice enough, but I'd like your oppinions.

12. How much bitrate can I remove, when I crop the letterboxing of my content, to say 1:2,35?

13. Which settings in x264/MeGUI are preffered NOT to set due to incompatibility? I've made a bunch of tests that did not work or simply crashed the player.


* SUBTITLES *

There are three ways to add subtitles to MP4. The official TTXT type or using BIFS advanced content seems to be the best ways of implementing them, but neigher seem widely supported. Oddly, vobsub in private streams, seem to have most support at least from hardware players.

14. Which of the above methods are the best to use?


* DECODING *

15. What does XBOX support? AAC multichannel/Multiple audio streams/Subtitles etc.?

* TRANSPORT *

16. Which software are preffered to stream these files (also in regards to the different protocols available for streaming content)?


Please answer the questions to which you have an answer. Please don't flame me, there are proberbly many threads with answers to some of my questions, but I'm still in the learning phase of this MP4 world :)

I would like to know, if you have any software recommendations. I saw a LOT of different filters/players, but going thorough them all are a lot of work.

Admins: If you find it inappropiate in this group, sorry for the inconvenience and please move it to another group.

Dark Shikari
5th June 2007, 17:30
I'll answer what I know.


I would prefer to reencode the AC3 streams to AAC, to save space. I saw a claim (don't remember where) that AAC are superior to AC3 in lossy terms, but my test with Nero AAC did not reach transparancy until 400kbit.

(Note: I'm reencoding the audio no matter what format I end up with because of framerate conversion)

AAC is superior to AC3 in most cases; AFAIK even MP3 is.

3. At which bitrate should AC3 multichannel be transparant?

Depends how many channels. If you want to be transparent up to 20khz for 5.1, use 448khz IIRC.

10. Would 1000 kbit be sufficient for the encoding, when I intend to use 480p (maybe upscale to 720p)? I did a small test, and it seemed nice enough, but I'd like your oppinions.

Depends on how much action there is and how high your x264 settings are. In most cases 1000kbit is nowhere near transparent for 480p; its *decent* but not transparent, not even close.


13. Which settings in x264/MeGUI are preffered NOT to set due to incompatibility? I've made a bunch of tests that did not work or simply crashed the player.

Most of this depends on what features the player supports. For example, if the player is Main Profile, don't use High Profile settings.

bond
10th June 2007, 11:49
we dont know yet the exact video specs of hddvd/bluray, therefore we cant yet encode avc video with x264 that is for sure hddvd/bluray compliant

odyssey
10th June 2007, 17:44
we dont know yet the exact video specs of hddvd/bluray, therefore we cant yet encode avc video with x264 that is for sure hddvd/bluray compliant
Video has been cracked, so it should be possible to determine the specs?

shon3i
11th June 2007, 12:56
I would prefer to reencode the AC3 streams to AAC, to save space. I saw a claim (don't remember where) that AAC are superior to AC3 in lossy terms, but my test with Nero AAC did not reach transparency until 400kbit.Well this is totaly impossible. If you can upload part of that AAC encoding, and same part of original AC3 to see where is problem. Problem can be in decoding AC3 and post processing, i recommend you to use BeHappy for transcoding AC3->AAC. Also you should encoder without DRC applyed on AC3 stream.

Nero use mostly HE-AAC for multichannel encoding up to 256kbps, maybe is that reason why 400kbs sound better, if you try to use 256kbps also try to switch to LC-AAC mode manually.

In BeHappy you can try Coding Technologies AAC encoder which if you ask me have better multichannel encoding. For everything upper than 200kbps use LC-AAC, for under use HE-AAC, that is my recommendation.

Which AC3 encoder are considered to encode the best quality over bitrate?In BeHappy you can choose between Aften which is more configurable and HQ, and ffmpeg which is simple but also HQ, aften is my favourite.

At which bitrate should AC3 multichannel be transparant?Like Dark Shikari says, 448kbps is recommended, but i saw some original movies come with 384kbps, and sound ok.

we dont know yet the exact video specs of hddvd/bluray, therefore we cant yet encode avc video with x264 that is for sure hddvd/bluray compliantWith last H264info this is possible.

Henrikx
11th June 2007, 14:09
but my test with Nero AAC did not reach transparency
HE-AAC never reach transparecny, becouse SBR (Spectral Band Replication) produces high frequencies only synthetically .
LC and Main are the better choice..
What does XBOX support? AAC multichannel/Multiple
Xbox360 = AAC Stereo-"low complexity" (LC)
http://blogs.msdn.com/xboxteam/archive/2007/05/09/spring-07-video-playback-faq.aspx

bond
11th June 2007, 22:43
With last H264info this is possible.so tell me the specs :p

SealTooGreat
12th June 2007, 00:48
HE-AAC never reach transparecny, becouse SBR (Spectral Band Replication) produces high frequencies only synthetically .
LC and Main are the better choice..
True...

Terranigma
12th June 2007, 00:52
AAC is superior to AC3 in most cases; AFAIK even MP3 is.

And in which cases are these?

shon3i
12th June 2007, 11:26
HE-AAC never reach transparecny, becouse SBR (Spectral Band Replication) produces high frequencies only synthetically .
LC and Main are the better choice..

True...

Is not true, post you abxing before make that statement, did you even try to use HE-AAC High Bitrate encoder from CT and encode up to 320kbps, and on such high bitrates tell me what isn't transparent.

Even standard HE-AAC can reach transparency on 128kbps, but there is not reason to use it above 96kbps. 128kbps LC-AAC is most transparent for my ears.

And in which cases are these?Always. Compressing Lossy to Lossy (AC3->AAC,MP3) format automaticly make thing worse.

Use original wav stereo source and encode for example to 128kbps with all codecs, and you will see the the effeciency of AC3 at lower rates. MP3 at higher rates now days have some problems, i recommend to use Lame 3.96 and earlier because don't have these problems, about this is already discussed on Hydrogen Audio forums.

so tell me the specs :)

Terranigma
12th June 2007, 15:39
Always. Compressing Lossy to Lossy (AC3->AAC,MP3) format automaticly make thing worse.

Use original wav stereo source and encode for example to 128kbps with all codecs, and you will see the the effeciency of AC3 at lower rates. MP3 at higher rates now days have some problems, i recommend to use Lame 3.96 and earlier because don't have these problems, about this is already discussed on Hydrogen Audio forums.

:)

Ok thanks. I'll do some tests myself. I'll encode to ac-3 via Sony's Soundforge using the dolby digital pro version & SomeJoe's guide (http://forum.doom9.org/showthread.php?t=56020) by setting the dialog normalization level equaled or close to the rms level, mild compression; the works, then compare mp3 and aac at the same bitrates.

SealTooGreat
12th June 2007, 18:21
For everything upper than 200kbps use LC-AAC, for under use HE-AAC, that is my recommendation.


Even standard HE-AAC can reach transparency on 128kbps, but there is not reason to use it above 96kbps.
Could You be more specific?:rolleyes:
Is not true, post you abxing before make that statement,
Funny, how did you forget to post one.;)

Henrikx
12th June 2007, 18:30
Even standard HE-AAC can reach transparency on 128kbps, but there is not reason to use it above 96kbps. 128kbps LC-AAC is most transparent for my ears.


No, itīs not true !
Whatīs your exact definition of transparent ?
And please read again ...
becouse SBR (Spectral Band Replication) produces high frequencies only synthetically .

Only AAC without SBR reach transparency !
HE-AAC is always with SBR !
http://de.wikipedia.org/wiki/MPEG-4_High_Efficiency_Advanced_Audio_Coding
(German ) Sorry ...

Brother John
12th June 2007, 19:46
Saying that SBR cannot reach transparency is wrong. Transparency is heavily dependent on listener and listening environment anyway. With SBR it's only more difficult to reach transparency because the "faking" of high frequencies creates an additional layer of possible artefacts.

Henrikx
12th June 2007, 20:19
@Brother John

I do not agree with you.

Transparency is heavily dependent on listener
Yes thatīs true, but then discussion is senseless, because subjective.

transparency because the "faking" of high frequencies creates an additional layer of possible artefacts

"Faking" is the right word, so itīs a faked transparency !

If faked transparecy= transparency ...then you are right.

Then we can talk about, if Transparency and Synthetic excludes themselves ? But it will be the same...subjective.

foxyshadis
12th June 2007, 20:43
SBR isn't all faking, that's the thing. It stores a lot of high frequency information at higher bitrates, even though the base is "faked"; from what I understand, it first generates the harmonic replication, then it starts encoding the residue/difference from that, instead of encoding it from scratch. At the bitrates where such a strategy can make up for the harmonic replication noise (since high is never a perfect mirror of low in real-life), it's already transparent in LC already, so HE transparency is generally not particularly useful when it takes more power and isn't supported in every AAC player.

Henrikx
12th June 2007, 21:08
@foxyshadis
I checked now additionally again.(Spectral volume Replication, not He-AAC) There stands the same written.
Translated with Google
Transparency cannot be attained with such an algorithm, since the high frequencies are completely synthetically produced. The employment of such compression procedures offers itself only in order still subjectively to some extent to obtain within the lowest bit rate range pleasant results. Accordingly this technology is usually used below zirka 64 kbit/s for Stereo signals.

But I do not want to discuss here also endlessly,if someone means he feels transparency , ok, why not.

SeeMoreDigital
12th June 2007, 21:47
But I do not want to discuss here also endlessly,if someone means he feels transparency , ok, why not.Agreed....

All forms of "lossy" encoding (whether it be audio or video) is about what you as an individual, feel is acceptable to you. It's a personal choice, and as such is highly subjective!

Personally, I like listening to 6Ch AAC-LC audio encoded using CT's encoder at around 192-256Kbps. I have to use AAC-LC because I'm playing it back via a "hardware" device (that can only decode AAC-LC) connected to an surround sound amplifier.

Anyway.... I suggest any further discussions regarding the pros and cons of audio codecs be submitted within the "Audio Encoding" section of the forum....


Cheers

Brother John
12th June 2007, 21:54
Transparency is 100% subjective and always has been. It's defined as the point where a lossy encoding is indistinguishable from the source in a blind test. Depending on the listener, equipment and environment transparent quality can vary tremendously even for exactly the same source and encoding.

But I agree, this discussion probably doesn't belong in this thread.

So, back on topic:
I tried it once and could absolutely not ABX a 6 channel 160 kbit/s CBR Winamp HE-AAC from the original AC3. And that was comparing individual channels with headphones. So, using a quite low bitrate for 6ch HE-AAC generally should be no problem regarding quality.

Stux
15th June 2007, 09:13
Basically, if you're slightly deaf, especially in the higher frequency range. Perhaps you listened to too much loud music, then HE-AAC can be transparent, if not then you will be able to hear the synthetic effects in an ABX.

LC-AAC can reach transparency relatively easily... Some people will find 160kbps dual channel encodings transparent, others with slightly better hearing ranges will find 192kbps transparent... others with golden ears may even be able to hear a difference at 192kbps... but then 256kbps will be transparent.

For 5.1 you need a mono channel and 2 stereo channels plus an LFX, so for true AAC transparency you would need 160x2.5 + a bit for LFX. Which is about 400kbps. Amazing.

Now, if you drop your "pure transparency" back to sanity, say 128kbps per dual-channel you get 320kbps.

Which is better than AC3. And should be more transparent than AC3 at the same bitrate... AAC is a much better codec. BUT I have not done the ABXing tests... not much point... see the bit about being slightly deaf ;)

HE-AAC allows you to encode a similar quality as the 128kbps AAC in 64 or 96kbps per dual channel... yes there are synthetic highs... but there are highs, and that's what most people miss from lower bitrate AAC, that and low bitrate distortions :).

64 x 2.5 = 160kbps... wow... So we get good results in HE-AAC 5.1 in the same bitrate which is required for stereo transparency to most people in straight LC-AAC.

That's fairly compelling, just the same as people can hear the lack/presence of highs much more easily than the artifacts in highs, the end result of having multichannel vs stereo is much greater presence. So do you get a better subjective result from :

1) Transparent Stereo at 160kbps

or

2) Over compressed Multichannel with No Highs and plenty of distortions at 160kbps

or

3) Good Multichannel with Synthetic Highs at 160kbps

The normal listener will prefer the experience from 5.1 playback with highs... even if its not totally transparent... after all... if you don't have the original reference... how are you going to know its not transparent to that reference?

So, if you want 160 or 256kbps Multichannel encoding, go for HE-AAC. If you want virtually transparent, then go for LC-AAC at 320kbps.

But if you're going for 320kbps, why not just go for 320/384kbps AC3 if that is a direct, no-recoding form your source, then it WILL be transparent to the source!

PS: I've got a little bit of experience in this subject, having been involved in a project to write one of the only multichannel HE-AAC decoders on the market.

Henrikx
15th June 2007, 12:07
The problem with this discussion is, gives it a definition for transparency?

1.I found different definitions (German, i canīt translate,try Google)
http://de.wikipedia.org/wiki/Durchsichtigkeit_%28Akustik%29
Tranzparenz : C = 0 ą 1.6 DB

2.Compressed music - Original = not to differentiate (subjektiv)

Is there an accurate definition?
A term and no accurate definition, how is to be discussed?
To feel transparency is no definition.

Brother John
15th June 2007, 12:28
Wow! Did you understand a single word from this Wikipedia article? It seems to be written by an acoustics expert for acoustics experts. Impressive, but totally incomprehensible for me. :)

English Wikipedia says this:
If a lossily compressed result is perceptually indistinguishable from the uncompressed input, then the compression can be declared to be transparent. In other words, transparency is the situation where compression artifacts are nonexistent or imperceptible.
Imo a good definition and a good article on the whole.

Henrikx
15th June 2007, 12:35
@Brother John
but totally incomprehensible for me
That is exactly the point! If written transparency is reached, or not, where is then the definition of transparency, which I/We also understand.
We talk about a term, without definition.

foxyshadis
15th June 2007, 13:38
HA has always used the simple definition, it is transparent if it cannot be ABXed, typically in 10 or 20 rounds, since ABXing is the only reliable test for perceptual distinguishability. A codec setting is said to be generally transparent if many testors with good ears and good speakers pass the test, but I don't remember specifics. The same tests can apply to video, although prepping and testing is a bit tougher with so much more information competing for your attention.

odyssey
26th May 2008, 16:25
Time to bump this up a bit, as I think more people have gotten into Blu-ray specs now ;)

Depends on how much action there is and how high your x264 settings are. In most cases 1000kbit is nowhere near transparent for 480p; its *decent* but not transparent, not even close.
So, how much would - in general - be sufficient?

Most of this depends on what features the player supports. For example, if the player is Main Profile, don't use High Profile settings.
Can I assume that most players would support Main Profile? What does Blu-ray specs say about this?

we dont know yet the exact video specs of hddvd/bluray, therefore we cant yet encode avc video with x264 that is for sure hddvd/bluray compliant
Can we now? :) I'm also interrested in what Blu-ray specs say about framerate and eventually relation to resolution - Which are supported and are there any limitations like in DVD?