Post Reply 
MPEG-4 AVC/AAC
Perfect format?
Author Message
ZiNgA BuRgA
Smart Alternative

Posts: 17,022.2988
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
Offline
Post: #21
RE: MPEG-4 AVC/AAC
bboy_sonik Wrote:and the settings you provided Hot 'n' Spicy burger, but my final settings [below] from TMPGEnc turned out better quality at a lower filesize!
That's because you're using a bitrate based encode - duh, of course it'll be smaller than a quantizer encode if you force a lower bitrate.  For x264, just up the quantizer and you'll get smaller files.

bboy_sonik Wrote:Anyway, here is a video of the MAX PAYNE Trailer, encoded with the above settings in TMPGEnc 4 Xpress. Have a gander everyone! It is playable on PC and the PSP and is decent quality for both platforms! Unknown if desirable for PS3 or 360 I don't have these [my 360 is broken right now and CBF getting it fixed]
How long is the video?  That's 18MB - pretty horrible size.  My typical ~23 minute anime episodes' PSP encodes' video streams range from around 25-35MB using --crf 26.
06/11/2008 02:57 AM
Visit this user's website Find all posts by this user Quote this message in a reply
bboy_sonik
Byeeeeeeeeee

Posts: 132.3019
Threads: 8
Joined: 9th Aug 2007
Reputation: 0.76198
E-Pigs: 2.8344
Offline
Post: #22
RE: MPEG-4 AVC/AAC
You are encoding Anime. Anime compresses like a billion percent better than any "real footage" will! This is a full motion trailer that will definately push any codec to it's extreme limits - super fine detail [snow scene, among others], low lighting [most of the transitions], high movement action [again, half of the scenes], as opposed to, what, the single-shade skin colours of cartoons and a girl standing there for 10 seconds with a drip on her forehead!?!?! Srsly you can't compare them really you should know this man :) im not saying x264 sucks hey, I seriously am just getting better results from this encoder right now and I'm admitting being a noob at the AVC encoder its way mo0re tech than DivX! Just look at the video man and give me some advice if you have any i won't throw it back or anything lol im tryin to find out what is best is all for the good of all of us :) x264 is too crazy to tweak!

But for consistency's sake, I will encode the first epsiode of HELLSING right now with these settings. And I have no idea what CRF means by the way. Does x264 support 2-Pass Quantization-based encoding? And is that 'CRF' anyway? 2-Pass VBR will produce a better result than 1-Pass CQ [Constant Quality/Quantization] for.... well it's self explainatory isn't it, it lowers the bitrate on repeated frames and raises it on high motion ones :P But with anime I could set the ABR to 200kbps and it'd still look near DVD quality LOL!

Anyway please jus check out the video, its only 18MB, and give your suggestions.... correct me if im wrong man im not challenging anyone here hey I'm sorry if i offended.... :(

P.S. Feel free to hold off until my Hellsing encode finishes and I write back and, probably, prove myself wrong in thinking my settings are uber l33t :)
06/11/2008 04:15 AM
Find all posts by this user Quote this message in a reply
blessedhands
Paradigmatic Entity

Posts: 199.7880
Threads: 18
Joined: 15th Dec 2007
Reputation: -1.64513
E-Pigs: 26.8526
Offline
Post: #23
RE: MPEG-4 AVC/AAC
hey zinga its a lil off topic. but hey how do you use MeGui?
i Tried converting avi file to mp4. i converted the video but can't hear anything. i tried encoding/extracting the audio with megui but i got an error using nero aac. i tried extracting the audio with another app mux it with the video. and yeah it goes perfect, but can't play it on PSP =( ...
06/11/2008 05:33 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Assassinator
...

Posts: 6,646.6190
Threads: 176
Joined: 24th Apr 2007
Reputation: 8.53695
E-Pigs: 140.8363
Offline
Post: #24
RE: MPEG-4 AVC/AAC
bboy_sonik Wrote:You are encoding Anime. Anime compresses like a billion percent better than any "real footage" will!

Not necessarily. Depends on lots of factors. Real footage with little movement (like person sitting there talking) will compress FAR better than anime with craploads of motion. So you can just say "anime always compress better than real footage".

I know you said your thing was full of motion, and the anime you compared with is still. Well, it's the motion and still that's making the difference, not really the anime and film.

Another thing is that real footage "hides" compression artifacts better than anime imo, so you can get away with higher quantizers.

bboy_sonik Wrote:Srsly you can't compare them really you should know this man :) im not saying x264 sucks hey, I seriously am just getting better results from this encoder right now and I'm admitting being a noob at the AVC encoder its way mo0re tech than DivX! Just look at the video man and give me some advice if you have any i won't throw it back or anything lol im tryin to find out what is best is all for the good of all of us :) x264 is too crazy to tweak!

I'll have a look at it later. (too late now)

Also give me the source from which you encoded it. I'll try encoding it myself.

And what frame size are you going to encode Hellsing at? 640x480 or 480x272? (also for comparison purposes).

bboy_sonik Wrote:And is that 'CRF' anyway? 2-Pass VBR will produce a better result than 1-Pass CQ [Constant Quality/Quantization]for.... well it's self explainatory isn't it, it lowers the bitrate on repeated frames and raises it on high motion ones :P

Ok, you obviously didn't understand the concept of constant quantizer.

Simplified explaination: CQ mode will lower and increase bitrate according to the complexity of the frame in question so that everything is exactly the same quality (quantizer). So stuff that need more bitrate will get more bitrate, and stuff that needs less will get less.

Constant quantizer will lower/increase bitrate more than 2-pass will, which is exactly opposite to your argument (2-pass more than CQ). What you're thinking is constant bitrate (which, as the name implies, always uses the same bitrate). Constant bitrate and constant quantizer are 2 sides of the extreme, least flexible bitrate to most flexible. 2-pass is somewhere in between.

But varying bitrate more does not equate to better. 2-pass is generally better than CQ, because it distributes bits more optimally than forcing a constant quantizer every single instance. However, constant rate factor (crf) beats them both, with the only problem being that you cannot control output file size.

About Crf (what I understand. May not be 100.0000% accurate) --»
Spoiler:
ZiNgA BuRgA Wrote:This is my interpretation of what CRF is (may be wrong):
Here wee have two images, each compressed with JPEG @ 80% quality.
[Image: picture1ay8.jpg] [Image: picture2kf5.jpg]

Now, let's ramp down the quality to JPEG @ 15% quality:
[Image: picture1bea3.jpg] [Image: picture2bsq7.jpg]

This "quality" setting is like a quantizer, since you specify a rate and the compressor determines the number of bits to use.  As you can probably guess, the 2nd image is always smaller than the first.
However, although both look horrible at 15% quality, it "doesn't really matter" for the right image, since there's not much detail there anyway, as opposed to the left image.

So if wee assume wee have a video with just those two frames, and there's enough copies of each so that the encoder can't find them in its look ahead phase...
...a single pass ABR would most likely reduce the first image to a lower quality than the second.
...a single pass constant quantizer will give the results above.
...a two pass encode (ABR or CRF) would allocate a higher quality to the first image, and a lower quality to the second image.


Well, that's my guess anyway.

Crf mode basically is a complexity compensated CQ mode.

So that "quality" in your picture example is more equivalent of a CRF encode or an ABR encode than a "quantizer" encode.

A constant quantizer encode would distribute enough bits so that both the above pictures looks pretty much the same perceived quality. That is, a CQ encode would dump a lot more bits into the the more complex picture, and less into the second.

A CBR encode would dump an exact equal amount of bits into each picture. And ABR encode just slightly "wiser" distributed than CBR, but is not too different from CBR.

Now, it costs more bits to increase the perceived quality of the more complicated image than the simpler image. And putting additional bits into each will yield diminishing returns in quality.

Then imagine a distribution of bits between the two frames that can be said to be "optimal", that is, providing the best average quality. That optimal rate will lie somewhere in between CQ and CBR.

Imagine a distribution algorithm that decides what "optimal" quantizer to assign to frames of different complexity. Now assume this rate control equation is perfect. Therefore, for any given input rate factor, the quation will generate the best quantizer values to use in each frame of different complexity. With a higher rate factor giving more quality to each picture of different complexity.

It follows that if the 2 frames have the same rate factor, then the total amount of bits is distributed perfectly among the 2 frames to exactly compensate for their difference in complexity in the optimal way.

Now that distribution above is exactly what 2-pass encodes aim for. What 2-pass does is to attempt to use the recorded complexity values from the 1st pass to determine how to best distribute the set amount of bits in the 2nd pass. Then that would be equivalent of trying to achieve the exact same rate factor for each frame, according to what I previously defined the rate factor as.

So basically,
1-pass Crf = perfect distribution always achieved not caring about size.
2-pass size based = Tries to achieve perfect distribution for given size.

Now the rate control equation is not going to be perfect, be that doesn't matter, because both the Crf and the 2-pass are depending on the same equation, so any inaccuracies will effect both. And the 2-pass will NOT be able to achieve 100% accurate distribution.

Therefore 1-pass Crf > 2-pass if they have the exact same output size.

Therefore it is completely pointless to do any more than 1 passes for Crf. It is already more perfect than any 2-pass hopes to become.

Basically, in terms of flexibility:

Least Flexible -» Most Flexible
CBR » ABR » Multi-Pass «> CRF » CQ    where CRF is theoretically optimal.


ZiNgA BuRgA Wrote:Possibly - I've never seen anyone using 2 pass CRF.

But CRF and quantizer are different.  What you described basically, was quantizer.  A constant quantizer encode will be pretty much fixed.

Yeah, I did make my theory sound a bit like CQP in the previous posts. But the main point that the crf would give better results carries through.

And a constant rate factor encode will also be fixed. Fixed at a constant rate factor (that is, fixed quantizers for every complexity level). :P
bboy_sonik Wrote:But with anime I could set the ABR to 200kbps and it'd still look near DVD quality LOL!

Don't generalize. It all depends on the source. Some anime, yes, but I can find you an anime that will block worse than youtube if you use 200kbbps.
(This post was last modified: 07/11/2008 11:14 AM by Assassinator.)
06/11/2008 06:48 AM
Find all posts by this user Quote this message in a reply
bboy_sonik
Byeeeeeeeeee

Posts: 132.3019
Threads: 8
Joined: 9th Aug 2007
Reputation: 0.76198
E-Pigs: 2.8344
Offline
Post: #25
RE: MPEG-4 AVC/AAC
blessedhands, I think MeGUI ignores audio stream completely and u have to Mux it into the output MP4 with MP4Box

Assassinator, yeah your're right hey especially the fact that "real" footage hides artifacts better than anime! Ah I was drunk... sorry... but yeah I encoding that Hellsing epsode, 22 mins and 155MB.... disgusting.... I still see blocking on the intro and everything too [the first scene with the pistol, if you know the series at all, has HORRIBLE BLOCKING!]

I really got to figure out x264!

I am encoding everything at 640x480. Yes I know its bigger than the PSP screen, but I like a decent resolution for the PC too! And encoding widescreen stuff at 16:9 pixel aspect makes it fit on the PSP screen nice anyway :)

I can't find the original website! It sucks because I wanted to get more trailers! It was a video encoding related site, and it always had 1080p [in H.264] trailers.... the Max Payne trailer was about 90MB and its a 2:23 trailer...

...I am uploading it to rapidshare right now and will update this post with a link to the original video. Thanks heaps I would love for you to do some comparrisons for me! :D

Ah, so CQ IS better than any 2-Pass bitrate based encode - but the end filesize is unpredictable right? Now I see... sorry to you too Zinga :( forgive me for I was ignorant but now I see the light.... :D

Yeah, I'm an idiot i shouldnt generalize. Some anime is as you said, very basic... but Manga for example has fancy full-painted backgrounds and high motion and... yeah lemme take back everything I said :)

I look forward to your help guys! I'll add the link to Max Payne trailer as soon as it finishes uploading....
06/11/2008 05:39 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,022.2988
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
Offline
Post: #26
RE: MPEG-4 AVC/AAC
blessedhands Wrote:hey zinga its a lil off topic. but hey how do you use MeGui?
i Tried converting avi file to mp4. i converted the video but can't hear anything. i tried encoding/extracting the audio with megui but i got an error using nero aac. i tried extracting the audio with another app mux it with the video. and yeah it goes perfect, but can't play it on PSP =( ...
Probably ask Assassinator that - I don't use MeGUI (personally think the interface is pretty bad).
How did you re-mux the video?  I've had issues with certain muxing techniques which make the PSP reject the video altogether (mainly x264 encoding into an MP4).


@bboy_sonik: how about this?  Give a good quality original source, and wee'll compare compressions - that'll solve things ;)
(This post was last modified: 06/11/2008 05:44 PM by ZiNgA BuRgA.)
06/11/2008 05:43 PM
Visit this user's website Find all posts by this user Quote this message in a reply
squee666
Grand Warlock

Posts: 3,567.1000
Threads: 351
Joined: 4th May 2007
Reputation: 12.17831
E-Pigs: 555.9025
Offline
Post: #27
RE: MPEG-4 AVC/AAC
yeh wee all take same file and try and make it the same size as the other with our own encoders
see what turns out best

[Image: IuZelj2.png]
Spoiler for anime watched:
[Image: squee666.jpg]
06/11/2008 06:05 PM
Find all posts by this user Quote this message in a reply
bboy_sonik
Byeeeeeeeeee

Posts: 132.3019
Threads: 8
Joined: 9th Aug 2007
Reputation: 0.76198
E-Pigs: 2.8344
Offline
Post: #28
RE: MPEG-4 AVC/AAC
Upload DONE! Here it is...

Code:
http://rapidshare.com/files/161366432/Max_Payne_-_Trailer.mp4

...yeah its 90MB but its super quality! 1080p FOR REAL, when I disable PureVideo [hardware acceleration for nVidia GPU's] and use FFDShow to decode, it drops like 20% of the frames haha... but im on a piece of poo poo! Anyway just don't be ashamed if this happens with you either :) You can still encode it of course.

.....good idea! Lets make it interesting - the person who produces a good quality, PSP compatible, decent filesize of the Max Payne trailer im uploading will get a $10 PayPal donation from myself :D Unless there is a rule against that Zinga....?  That would create chaos...

I just don't expect you guys to do all this for nothing and really appreciate the help! :D

(This post was last modified: 06/11/2008 06:44 PM by bboy_sonik.)
06/11/2008 06:13 PM
Find all posts by this user Quote this message in a reply
squee666
Grand Warlock

Posts: 3,567.1000
Threads: 351
Joined: 4th May 2007
Reputation: 12.17831
E-Pigs: 555.9025
Offline
Post: #29
RE: MPEG-4 AVC/AAC
yeh but it needs to be a certain file size don't forget

[Image: IuZelj2.png]
Spoiler for anime watched:
[Image: squee666.jpg]
06/11/2008 06:44 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,022.2988
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
Offline
Post: #30
RE: MPEG-4 AVC/AAC
Urgh, Rapidshare?!  I can't download anything from there at home - I suspect it's because my ISP redirects all HTTP traffic through their proxy, and some idiot's abusing the free download quota for the IP - it never works there.  Can't you use something better like MediaFire?

Otherwise, I'll try my best >_>


By the way, that's the original is it?
(This post was last modified: 06/11/2008 06:52 PM by ZiNgA BuRgA.)
06/11/2008 06:50 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)

 Quick Theme: