Endless Paradigm

Full Version: MPEG-4 AVC/AAC... again!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
MPEG-4 AVC/AAC... again.

Well I didn't want to revive an old thread...

I started using MediaCoder, the new v0.7.0 RC2 came out recently, which encodes with x264 encoder.

Much better than TMPGEnc, I should of listended to Zinga all along XD

Here's a copy of my command line i use as a "base" - I was wondering if anyone has any recommendations. Incase you're wondering, yes it is pretty damn slow but I don't mind as it's for permanent archiving of my DVD movies! But is it efficient though...?

Code:
# ".\codecs\x264.exe" "$(SourceFile)" --no-psnr --no-ssim --keyint 250 --min-keyint 25 --level 30 --me umh --merange 32  --no-fast-pskip --non-deterministic --aq-mode 1 --aq-strength 1.0 --b-adapt 2 --ref 16 --subme 9 --psy-rd 1:0 --bframes 16 --direct auto --mixed-refs --trellis 1 --b-pyramid --weightb --crf 22 --sar 4:3 --threads auto --partitions all -o "$(DestFile)"


I was doing the whole "fullscreen video alt-tab" back and forth between the original 1080p video, and the resulting output from the above, and while the filesize and quality was *ok*, I noticed the colour saturation/levels was noticebly.... bleaker, for lack of a better word. Washed out, even. Any way to improve on that without increasing filesize too much?

P.S. The 1-minute Terminator Salvation teaser trailer encoded to 7,703KB with those settings =)

P.P.S. So a lot in advance.. and I also didn't get a chance to thank everyone from the last thread.... much appreciated Aha

U mind this?
[Image: lolnp6.png]
or this?:
[Image: snap005ag0.png]
This resolutions work fine on psp player. ;)
My videos work fine. Completely fine, nothing at all wrong with them. That isn't my question. I'm looking for any advice on optimizing the encoding in x264, that's all, to see if there is any options more suited or that I missed. To see if anyone has picked up some "neat tricks".

But thanks for the... umm... nice screenshots....
bboy_sonik Wrote:My videos work fine. Completely fine, nothing at all wrong with them. That isn't my question. I'm looking for any advice on optimizing the encoding in x264, that's all, to see if there is any options more suited or that I missed. To see if anyone has picked up some "neat tricks".

But thanks for the... umm... nice screenshots....

hey man can u please upload your presets...
Sure. Here you go. It's only one preset, for the settings I mentioned in my first post. Also, make sure you have the newest MediaCoder version (0.7.0 RC2).

Also, this is for widescreen source video's, even though it encodes at 640x480 it correctly displays in anamorphic on both the PSP and the PC (in Media Player Classic Homecinema at least, anyway, dunno about other players but probably ok). If the video you want to encode is 4:3 or whatever, just say so under Aspect setting (see screenshot).

[Image: mediacoderaspect.png]

Also note that to encode the 1-minute source video it took about 3 minutes on my PC. This might be too slow for most, but I can handle the wait as I usually encode my DVD movie overnight.

EDIT: I might have changed a couple of things in that preset since the original post, if I did it resulted in seemingly better quality but slightly slower encode (with similar filesize).

Hope Assassin or Zinga can give me some wisdom on this one, these guys know their x264 encoders ^_^
it took me forever(like 15-20mins xD) encoding a happy tree friends clip with your preset. hope you can make more presets...
You're archiving your DVDs at PSP resolution??

Anyways:
Quote:

Code:
# ".\codecs\x264.exe" "$(SourceFile)" --no-psnr --no-ssim --keyint 250 --min-keyint 25 --level 30 --me umh --merange 32  --no-fast-pskip --non-deterministic --aq-mode 1 --aq-strength 1.0 --b-adapt 2 --ref 16 --subme 9 --psy-rd 1:0 --bframes 16 --direct auto --mixed-refs --trellis 1 --b-pyramid --weightb --crf 22 --sar 4:3 --threads auto --partitions all -o "$(DestFile)"

merange 32 is overkill for PSP resolution in most cases.  I'd just leave at default.  But up to you.
Take out --non-deterministic - it's an experimental parameter.
PSP doesn't accept 16 reference frames (is this actually for the PSP?).
16 b-frames is usually overkill too.  8's already a pretty high number.  I probably would consider 6 fairly high in most cases too.
Don't use b-pyramid for PSP encodes - PSP doesn't render it properly.
Note that "sar" is pixel aspect ratio, not resulting aspect ratio...

If you're not doing this for PSP, take out the level param, add in 8x8dct.
I don't think he's encoding for PSP. He mentioned 1080p somewhere in there...


Machine generated command line? Looks sort of weird...

Pretty much some stuff zinga covered already....

That would take ages to encode. Too many B-frames. I mean you're encoding a real life movie. You'd only consider 16 B-frames for anime or something like that (even then, returns are very diminishing at the high end, so it's still questionable). Reducing the B-frames a bit massively increases speed (otherwise, use the old b-frame decision if you want to use 16 b-frames).

Negative deblocking if you're aiming for high bitrate archive encodes.    --deblock -2:-1
You also want to use adaptive DCT.    --8x8dct
trellis 2 if you're willing to sacrifice time for efficiency (hey, way better use of time than b-frames 16...).    --trellis 2


lol, level30? Doesn't exist. If I remember correctly, 5.1 is the highest level.
For the colour, could be your decoder.
Even with anime, 16 bframes is way overkill, from x264's stats.
I've read that x264's default deblocking is almost always PSNR optimal and x264 does automatically compensate for higher bitrates.  I guess negative deblocking might work better for anime content for sharper edges, rather than most live action content.

If you're archiving, I'd use Vorbis instead of AAC.  Q4 to Q6 for high quality - I typically use Q4 for DVD rips.
ZiNgA BuRgA Wrote:Even with anime, 16 bframes is way overkill, from x264's stats.

Yeah.... I sort of agree. Even for the very HQ encodes, I only use 12 these days. 8 for normal encodes. The time it takes to encode with 16b & b-adapt=2 just isn't worth it.

ZiNgA BuRgA Wrote:I've read that x264's default deblocking is almost always PSNR optimal and x264 does automatically compensate for higher bitrates.  I guess negative deblocking might work better for anime content for sharper edges, rather than most live action content.

Well, how I see it...

Deblocking goes to the effect of smoothing stuff (a selective smooth, but it's still smoothing stuff). If you're doing a high bitrate (e.g, Q16) encode that aims for transparency, firstly, for transparency's sake, you probably don't want to smooth stuff (you'd more interested in keeping eerything). Secondly, since you're using a very high bitrate, you would not end up with blocking anyway.

It's sort of, but not exactly, similar to the argument with the psychovisual stuff (psytrellis, psyrdo). Using them definitely gives you worse quality metrics (PSNR and stuff). Main argument here is that humans perceive stuff differently from the metrics. To metrics, smooth = less noise = less difference = good. To humans, not nessesarily.

But whatever, it's personal preferrence, everyone's tastes are different. I'm not assuming every encoder to do exactly the same thing. m.3.3w uses 1:1. gg uses -1:0, THORA uses -3:-3 (« this one seems a bit weird). Differs with different shows too.
Pages: 1 2
Reference URL's