Post Reply 
MPEG-4 AVC/AAC... again!
x264 is glorious... but so many options!
Author Message
bboy_sonik
Byeeeeeeeeee

Posts: 132.3019
Threads: 8
Joined: 9th Aug 2007
Reputation: 0.76198
E-Pigs: 2.8344
Offline
Post: #11
RE: MPEG-4 AVC/AAC... again!
Nanana

Well, not ARCHIVING lol, just converting so I can have a little media center. 640x480 is OK, I'm not paranoid about quality, and I want something that can play on as many devices as possible but still be good quality and not take up huge ammounts of space...

ZiNgA BuRgA Wrote:merange 32 is overkill for PSP resolution in most cases.  I'd just leave at default.  But up to you.
Yeah, I was just testing really. I'll prolly but it back down to 16.

ZiNgA BuRgA Wrote:Take out --non-deterministic - it's an experimental parameter.
Don't know how that got there... do you know what option it is in MediaCoder?

ZiNgA BuRgA Wrote:PSP doesn't accept 16 reference frames (is this actually for the PSP?).
Yeah, it is making it to be PSP compatible, but this works on 5.00 M33 for some reason LOL! If the PSP doesn't support ref=16, maybe its defaulting to a lower parameter because Level 3.0 probably doesn't go that high....?

ZiNgA BuRgA Wrote: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.
For some reason this didn't decrease my encoding speed much. But, as I said above, I think Level 3.0 might actually be limiting this anyway?

ZiNgA BuRgA Wrote:Don't use b-pyramid for PSP encodes - PSP doesn't render it properly.
Works fine for me.

ZiNgA BuRgA Wrote:Note that "sar" is pixel aspect ratio, not resulting aspect ratio...
Yes I know, I need this here regardless of what the actual Source Pixel Aspect is, to get proper anamorphic working on the PSP. The source video (Terminator Salvation 1080p Teaser) was actually 1:1 VGA pixel aspect, but yeah - I spent hours trying to get anamorphic640x480 working on PSP and PC, this works 100% well as long as I set Cropping in MediaCoder to "Expand to Fit".

Assassinator Wrote:I don't think he's encoding for PSP. He mentioned 1080p somewhere in there...
That was the source video, this is for PSP. And PC, and 360, and PS3, and XBOX1 XBMC, and.... {so on}

Assassinator Wrote:You'd only consider 16 B-frames for anime or something like that
Oh yeah, where lots of repeated or similar consecutive frames with little motion are encoded. Thanks for the reminder - pretty useless with real-life footage :)

Assassinator Wrote:Negative deblocking if you're aiming for high bitrate archive encodes.
Sorry, I shouldn't of used the word 'archive'. Yes these will be permanent encodes for store on my media center, but I'm trying to find the best settings of lowish-to-medium filesizes with decent quality, regardless of how long it takes to encode. Even if it takes 8 hours (overnight) to do one 30min episode, if its at 30MB and looks near-DVD that'd be freakin' awesome. But that's aiming too high isn't it lol!

Assassinator Wrote:lol, level30? Doesn't exist. If I remember correctly, 5.1 is the highest level.
...when I set MediaCoder to use level 4.1, it changes the parameter to level41. Just removes the decimal point it seems (dunno what version of x264 comes with MediaCoder v0.7.0 RC2, but you can't replace it with your own cause it spits out errors - modified from source perhaps?)



OK so i guess I'll use 8 b-frames as the absolute MAX for anime and other cartoons, for real life I'll probably use 4 or 6. The bleakish looking colour I mentioned I think is just a normal result of the compression, I am comparing it to the hi-def 1080p original after all haha!!

Sorry, once again.. archiving was wrong word... it needs to be PSP compatible, so Vorbis is out of the question sadly....

All that deblocking stuff is confusing me.... lol... so, negative deblocking for anime? how do I tell x264 to use "auto preset" or something...? Auto-accomodates for bitrate... what what whaaaaaaaat.....  

d>_<'b

Lol. Thanks guys ^_^
03/04/2009 01:29 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,023.4213
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.0333
Offline
Post: #12
RE: MPEG-4 AVC/AAC... again!
bboy_sonik Wrote:
ZiNgA BuRgA Wrote:PSP doesn't accept 16 reference frames (is this actually for the PSP?).
Yeah, it is making it to be PSP compatible, but this works on 5.00 M33 for some reason LOL! If the PSP doesn't support ref=16, maybe its defaulting to a lower parameter because Level 3.0 probably doesn't go that high....?
x264 won't limit you to the level you specify.  It'll output a warning (if you're using the CLI) but it'll let you exceed the level limits.
And the PSP will immediately give you a "File is unplayable" type message if there's >3 ref frames.  I once encoded a test video with ref=4 and hacked the bitstream to make it look like there was only 3 ref frames.  Plays fine on the PC, but heaps of image corruption on the PSP.
So no, PSP won't accept >3 ref frames.

bboy_sonik Wrote:For some reason this didn't decrease my encoding speed much. But, as I said above, I think Level 3.0 might actually be limiting this anyway?
B-frames aren't limited by level.  And the slowdown has linear complexity, so I find it odd that you don't experience much of a slowdown.

bboy_sonik Wrote:
ZiNgA BuRgA Wrote:Don't use b-pyramid for PSP encodes - PSP doesn't render it properly.
Works fine for me.
It does work, but some parts of the video will be "choppy".  Hard to explain, but at times, it looks like the video has been chipped at various places.

bboy_sonik Wrote:
ZiNgA BuRgA Wrote:Note that "sar" is pixel aspect ratio, not resulting aspect ratio...
Yes I know, I need this here regardless of what the actual Source Pixel Aspect is, to get proper anamorphic working on the PSP. The source video (Terminator Salvation 1080p Teaser) was actually 1:1 VGA pixel aspect, but yeah - I spent hours trying to get anamorphic640x480 working on PSP and PC, this works 100% well as long as I set Cropping in MediaCoder to "Expand to Fit".
PSP doesn't respect anamorphic content from memory...

bboy_sonik Wrote:
Assassinator Wrote:You'd only consider 16 B-frames for anime or something like that
Oh yeah, where lots of repeated or similar consecutive frames with little motion are encoded. Thanks for the reminder - pretty useless with real-life footage :)
Typically frames can reference previous frames, so even if it's just still images, you won't use all those b-frames/ref-frames.

bboy_sonik Wrote:The bleakish looking colour I mentioned I think is just a normal result of the compression, I am comparing it to the hi-def 1080p original after all haha!!
No, that's not the case.  It's most likely your decoder, or perhaps some filter you're putting through the encoder.

bboy_sonik Wrote:All that deblocking stuff is confusing me.... lol... so, negative deblocking for anime? how do I tell x264 to use "auto preset" or something...? Auto-accomodates for bitrate... what what whaaaaaaaat.....
Default is fine.  x264 auto-compensates for higher bitrate.  Stick to defaults unless you really have some need to fiddle with them.
03/04/2009 05: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: #13
RE: MPEG-4 AVC/AAC... again!
ZiNgA BuRgA Wrote:PSP won't accept >3 ref frames.
Well, I don't know what to tell you, that encode works on my PSP, I'm not lying lol. Maybe MediaCoder is bugging out somehow. Why don't you (or someone else) try those commands and see if it works...? MediaCoder 0.7.0, PSP Phat 5.00 M33-6 - see my second post for the MediaCoder preset/profile attatchment.

ZiNgA BuRgA Wrote:B-frames aren't limited by level.  And the slowdown has linear complexity, so I find it odd that you don't experience much of a slowdown.
No idea... maybe because it's only a 1-minute video I just don't notice it. Or it's another bug XD lol. Either way, I'm not going to go above 8 anymore.

ZiNgA BuRgA Wrote:It does work, but some parts of the video will be "choppy".  Hard to explain, but at times, it looks like the video has been chipped at various places.
I think I know what you mean. The PSP isn't powerful enough to decode it so it 'lags' or drops frames or tears? Well, it's funny because I've read a lot of PSP x264 guides and tutorials online, and they all include b-pyramid parameter... but maybe with 640x480 res the PSP might screw up after a while. Oh, I also have the CPU Modulator plugin, so it might be clocking above 222 to keep speed...? Will have to install PSP-HUD (which shows CPU usage) and test it. Or does CPU clock not make a difference for video playback (dedicated H.264/AVC decoder chip)?

ZiNgA BuRgA Wrote:PSP doesn't respect anamorphic content from memory...
Lol, I remember you disagreeing with me in the last thread. I'm uploading the resulting video to mediafire, if you check it's properties you'll see that its in 640x480 resolution, and it plays in widescreen on both the PSP and PC. I spent hours getting this trick to work with MediaCoder ;) Here - ~7MB PSP-compatible AVC video, 640x480, anamorphic - http://www.mediafire.com/download.php?tnqboumyjok



ZiNgA BuRgA Wrote:
bboy_sonik Wrote:The bleakish looking colour I mentioned I think is just a normal result of the compression, I am comparing it to the hi-def 1080p original after all haha!!
No, that's not the case.  It's most likely your decoder, or perhaps some filter you're putting through the encoder.
Yup, sorry, I had saturation lowered in FFDShow. *Facepalm*


ZiNgA BuRgA Wrote:
bboy_sonik Wrote:All that deblocking stuff is confusing me.... lol... so, negative deblocking for anime? how do I tell x264 to use "auto preset" or something...? Auto-accomodates for bitrate... what what whaaaaaaaat.....
Default is fine.  x264 auto-compensates for higher bitrate.  Stick to defaults unless you really have some need to fiddle with them.
Well, I noticed that things could be a liiiiiitle bit "sharper". I thought that was just a result of the comrpession though, things seem a little blury. What would you (or Assassinator) recommend for a modestly-subtle "finer detail" if possible...?
03/04/2009 09:11 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,023.4213
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.0333
Offline
Post: #14
RE: MPEG-4 AVC/AAC... again!
As expected, your Terminator clip doesn't play on my PSP, and I have the same as you (PSP-1000, 5.00M33-6).  Gives me a "Video cannot be played" error.  PMPlayer AdVanCe just bombs out.
So if it's playing at your end, then that's odd...

bboy_sonik Wrote:I think I know what you mean. The PSP isn't powerful enough to decode it so it 'lags' or drops frames or tears? Well, it's funny because I've read a lot of PSP x264 guides and tutorials online, and they all include b-pyramid parameter... but maybe with 640x480 res the PSP might screw up after a while. Oh, I also have the CPU Modulator plugin, so it might be clocking above 222 to keep speed...? Will have to install PSP-HUD (which shows CPU usage) and test it. Or does CPU clock not make a difference for video playback (dedicated H.264/AVC decoder chip)?
x264's b-pyramid is "broken".  I don't think this has anything to do with CPU speed.

bboy_sonik Wrote:
ZiNgA BuRgA Wrote:PSP doesn't respect anamorphic content from memory...
Lol, I remember you disagreeing with me in the last thread. I'm uploading the resulting video to mediafire, if you check it's properties you'll see that its in 640x480 resolution, and it plays in widescreen on both the PSP and PC. I spent hours getting this trick to work with MediaCoder ;) Here - ~7MB PSP-compatible AVC video, 640x480, anamorphic - http://www.mediafire.com/download.php?tnqboumyjok
Can't test the clip, but it's 16:9 which is the PSP's screen anyway, and it has the ability to stretch full screen.  Try some odd aspect and see if the PSP accepts it.

bboy_sonik Wrote:Well, I noticed that things could be a liiiiiitle bit "sharper". I thought that was just a result of the comrpession though, things seem a little blury. What would you (or Assassinator) recommend for a modestly-subtle "finer detail" if possible...?
You can try lowering the deblocker, but I doubt that's the issue.  Try using a sharpen filter instead.  It could also be your resampling method you're using.


EDIT: tried disabling all my plugins but still can't get a ref=4 clip to work.  Tell me if this works on your PSP:
http://www.sendspace.com/file/rntrbw
(This post was last modified: 03/04/2009 05:38 PM by ZiNgA BuRgA.)
03/04/2009 04:59 PM
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: #15
RE: MPEG-4 AVC/AAC... again!
bboy_sonik Wrote:All that deblocking stuff is confusing me.... lol... so, negative deblocking for anime? how do I tell x264 to use "auto preset" or something...? Auto-accomodates for bitrate... what what whaaaaaaaat.....  

Not "negative deblocking for anime". You would choose deblocking based on both your content and your encoding settings.

Anyway, if that stuff is confusing you, just use default (0:0). That's safe, and will always work.

bboy_sonik Wrote:
ZiNgA BuRgA Wrote:B-frames aren't limited by level.  And the slowdown has linear complexity, so I find it odd that you don't experience much of a slowdown.
No idea... maybe because it's only a 1-minute video I just don't notice it. Or it's another bug XD lol. Either way, I'm not going to go above 8 anymore.

Probably changed some other stuff. In that new vid you uploaded, you used exhaustive search (« extremely slow, especially if you have motion extimation range on 32). Don't use exhaustive (unless you have lots of time), takes extremely long for not that much gain. It's like the argument with 16 B frames.

There isn't no bug, because you actually DID managed to use 16 b-frames. I can see using MediaInfo.

bboy_sonik Wrote:
ZiNgA BuRgA Wrote:PSP doesn't accept 16 reference frames (is this actually for the PSP?).
Yeah, it is making it to be PSP compatible, but this works on 5.00 M33 for some reason LOL! If the PSP doesn't support ref=16, maybe its defaulting to a lower parameter because Level 3.0 probably doesn't go that high....?

ZiNgA BuRgA Wrote:PSP won't accept >3 ref frames.
Well, I don't know what to tell you, that encode works on my PSP, I'm not lying lol. Maybe MediaCoder is bugging out somehow. Why don't you (or someone else) try those commands and see if it works...? MediaCoder 0.7.0, PSP Phat 5.00 M33-6 - see my second post for the MediaCoder preset/profile attatchment.

Again, I don't think mediacoder is bugging out, because I do see the 16 ref frames, so it didn't not do them.

bboy_sonik Wrote:Lol, I remember you disagreeing with me in the last thread. I'm uploading the resulting video to mediafire, if you check it's properties you'll see that its in 640x480 resolution, and it plays in widescreen on both the PSP and PC. I spent hours getting this trick to work with MediaCoder ;) Here - ~7MB PSP-compatible AVC video, 640x480, anamorphic - http://www.mediafire.com/download.php?tnqboumyjok

Unsupported data.

ZiNgA BuRgA Wrote:
bboy_sonik Wrote:Oh yeah, where lots of repeated or similar consecutive frames with little motion are encoded. Thanks for the reminder - pretty useless with real-life footage :)
Typically frames can reference previous frames, so even if it's just still images, you won't use all those b-frames/ref-frames.

B frames are always useful, regardless of what type of vid your trying to encode - you'd be extremely stupid to use no B frames. It's just that using high numbers of B frames, the returns are diminishing the higher you go. But if you have way lots of time, go ahead with more. 16 will ALWAYS be better than 8, any content, it's just that I don't think the time investment is really worth it.

If you want the absolute best encode you can possibly get, 16 b-frames, me-tesa, merannge 64. But that's like equivalent of buying a Core i7 extreme 965 and 2 GTX295's in SLI.
(This post was last modified: 03/04/2009 06:29 PM by Assassinator.)
03/04/2009 06:28 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,023.4213
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.0333
Offline
Post: #16
RE: MPEG-4 AVC/AAC... again!
Assassinator Wrote:Unsupported data.
I think 640x480 support was added in later firmwares, so your PSP can't play it anyway.
03/04/2009 10:14 PM
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: #17
RE: MPEG-4 AVC/AAC... again!
ZiNgA BuRgA Wrote:
Assassinator Wrote:Unsupported data.
I think 640x480 support was added in later firmwares, so your PSP can't play it anyway.

Since I can't go the custom path anyway, i wonder if I should upgrade...
03/04/2009 10:53 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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

 Quick Theme: