PDA

View Full Version : Good Quality Settings for PSP? What is Overkill?


blinkstar
3rd October 2008, 10:34
Hello everyone. Forgive me if my question is stupid but I'm wondering what I should set my video and audio bitrates to for the best possible quality when converting .vob and .avi files for my PSP (using Xvid4psp).

In other words, I'm currently using a video bitrate of 5000 and an audio bitrate of 320 ... Am I maxing out with those settings? Should I go lower? Or is it possible to see an improvement if I go even higher?

Again, sorry if these are dumb questions, but I've done several Google searches trying to find what the max video and audio bitrates are for the PSP and I can't find a definitive answer ... Lots of threads dealing with settings for a mix of quality and file size, but I don't care about file size, I just want good quality for the PSP ...

Dark Shikari
3rd October 2008, 10:48
5000 is already ridiculous, you can get away with much less for no visual quality loss.

The PSP has basically no limit on bitrate at all, so a "limit" on quality isn't an issue, only the space you need to get the quality you want.

blinkstar
3rd October 2008, 11:03
5000 is already ridiculous, you can get away with much less for no visual quality loss.

The PSP has basically no limit on bitrate at all, so a "limit" on quality isn't an issue, only the space you need to get the quality you want.

Thanks for responding so quickly! If 5000 is ridiculous, what would you say is more reasonable? 3000? What is the limit, beyond which I will see no improvements in picture quality?

And what do you think is the limit for audio? Is 320 too high as well?

Thanks again for responding!

Yoshiyuki Blade
3rd October 2008, 11:09
Thanks for responding so quickly! If 5000 is ridiculous, what would you say is more reasonable? 3000? What is the limit, beyond which I will see no improvements in picture quality?

And what do you think is the limit for audio? Is 320 too high as well?

Thanks again for responding!

Its highly subjective to determine these things. You have to trust your eyes (and ears) on that. Try various CRF values and see if a given CRF looks good to you at a reasonable bitrate.

Also, I'd suggest editing your thread title (you aren't allowed to ask about what's "best").

Dark Shikari
3rd October 2008, 11:10
Thanks for responding so quickly! If 5000 is ridiculous, what would you say is more reasonable? 3000? What is the limit, beyond which I will see no improvements in picture quality?If you don't care about a specific bitrate, just use CRF mode. CRF 18 is generally transparent.

Atak_Snajpera
3rd October 2008, 12:32
In other words, I'm currently using a video bitrate of 5000 and an audio bitrate of 320
512kbps and 128 AAC audio is enough for 480x272 screen !!!!!!!

Sagekilla
3rd October 2008, 14:57
For reference I regularly do 800 - 1000 kbps on my DVD (848x480) encodes. I don't encode using bitrate, only crf 18. PSP requirements will be MUCH lower.

Dark Eiri
3rd October 2008, 16:26
Try the PSP x264 Ultra profile with CRF 22. Most of the times you will get awesome quality.
Normally I try using 500 kbps + 64 kbps HE-AAC audio for movies \ tv series and around 800 kbps + 128 kbps AAC for music videos with lots of effects and high motion.
For animes and cartoons, set deblocking to 1:1 and use 350 kbps.

Sagekilla
3rd October 2008, 19:27
From the looks of what Dark Eiri does, it sounds like yes you are using extremely overkill bitrate :) I don't think any "normal" source could possibly use 1 mbps unless it's horribly blocked up and has tons of artifacts present.

blinkstar
3rd October 2008, 20:25
Thank you all for responding!


Its highly subjective to determine these things. You have to trust your eyes (and ears) on that. Try various CRF values and see if a given CRF looks good to you at a reasonable bitrate.

You'll have to forgive me. I'm totally new to this. What are CRF values and can I set them through Xvid4psp? I don't see the option offhand.


Also, I'd suggest editing your thread title (you aren't allowed to ask about what's "best").

Why is it wrong to ask what is best? I thought that bitrate would work the same way say native screen resolution would. In other words, the best resolution for the psp would be 480x272, because that is it's native resolution. Is there no native bitrate or max bitrate for the psp?

fleon
3rd October 2008, 20:45
This is really usefull for me because like the user that made this thread I always wonder wich bitrate to use, I know it depends in the video, an action movie with explosions needs more bitrate than a comedy movie, but sometimes still is hard to figured out a good bitrate, and I am gonna try the suggestions that all the people gave here

Since I have an intel q6600 i dont care about the options that make x264 slower since the q6600 is pretty fast:eek:

So I have modified the lastest sharktooth's psp profile(v81) and I have added -no-fast-pskip --trellis 2 --subme 9 what do you guys think? also there are more options that improve quality but make the encoding slower? so i can put them?(that the psp can support)

Also what about the resizers? all the bitrates that the people gave are for wich resizer? like Dark Eiri said he uses 500 kbps for movies, but wich resizer do you use?, and you seem to know a lot, could you explain when to use wich resizer? or anyone else could explain it?

Blue_MiSfit
3rd October 2008, 21:45
trellis 2 and subme 9 are both great ideas to kill encoding speed - maybe also switch the ME algorithm to UMH (--me umh).

I don't know if the PSP would be compatible with CRF mode - probably if you use VBV, but 1 pass VBV is sketchy :)

I would stick with 2pass, anywhere from 500-1500kbps for most titles.

It's always hard to chose a bitrate :)

Also, the choice of resizer isn't that important. General purpose all-around good is spline36, lanczos is sharper but can introduce halos, bicubic is the old standard but can be soft. You're not doing much resizing so I wouldn't worry about it. It's only really important when you do HD -> SD, or even 4k -> HD ;)

~MiSfit

Yoshiyuki Blade
3rd October 2008, 22:06
You'll have to forgive me. I'm totally new to this. What are CRF values and can I set them through Xvid4psp? I don't see the option offhand.

I've never used xvid4psp, but if the name indicates something, it uses XviD. CRF is a popular mode used in x264 (after all, we are in the AVC forums :)). Getting into H.264 encoding is an entire subject on its own.

Instead of encoding video at an explicit user-defined bitrate (such as single pass bitrate, 2 pass, etc.), CRF encodes at a constant quality. The higher the CRF value you choose, the lower the quality. Likewise, specifying a low CRF value will usually indicate very good quality. The exact value you want is ultimately up to you, but many people choose in a range between 18 and 22. Some people will say that the quality of CRF is as good as 2-pass encoding, only you dont specify the bitrate. You specify the quality.


Why is it wrong to ask what is best? I thought that bitrate would work the same way say native screen resolution would. In other words, the best resolution for the psp would be 480x272, because that is it's native resolution. Is there no native bitrate or max bitrate for the psp?

As explained in the rules, such a question can't be answered objectively. There's really no way of telling people what's best for anything, simply because it relies on individual preferences.

Using your hypothetical situation as an example, I'd argue that it would be "best" to keep the full resolution of the source, and encode at a high bitrate. So whenever you pull the files out of the memory stick, you can also enjoy it in high quality on a computer.

On the flipside, if you plan on using it exclusively on a PSP and you're concerned about filesizes, then I would recommend downscaling it to the PSP's native resolution, and do a 2-pass encode for accurate file sizes.

If you plan on using it only on the PSP, and youre not concerned about filesizes, you can downscale and use CRF.

See how many possible "best" situations I can come up with? It depends on what *you* intend to do with the files. If you state your preferences, we may be able to recommend settings according to the situation. You'll have to be extremely specific though.

nm
3rd October 2008, 22:08
I don't know if the PSP would be compatible with CRF mode - probably if you use VBV, but 1 pass VBV is sketchy :)
As Dark Shikari already said, PSP can handle very high bitrates (about 20 Mbps IIRC) so it is compliant with any sane CRF setting at SD resolutions, even without VBV limits.

Atak_Snajpera
3rd October 2008, 23:07
As Dark Shikari already said, PSP can handle very high bitrates (about 20 Mbps IIRC) so it is compliant with any sane CRF setting at SD resolutions, even without VBV limits.
I made a test 720x480@25mbps and PSP had absolutely no problems with decoding :)

Sagekilla
4th October 2008, 00:02
I don't think I can imagine a case where SD video @ 720x480 (which is the resolution limit I believe?) could possibly use that much bitrate to give a "Good" image. Point remains though, PSP = hardcore bitstream decoder.

fleon
4th October 2008, 00:23
what about --b-rdo and --bime those options seem to be good why I can't find them in the part where I can configure the psp profile?

J_Darnley
4th October 2008, 00:26
Because they don't exist since r996.

fleon
4th October 2008, 00:34
Because they don't exist since r996.

oh ok I was reading this http://forum.digital-digest.com/showthread.php?t=67180 but this doesnt seem very updated also all the options arent there

so is there a much updated "x264 options explained"?

deets
4th October 2008, 13:04
I made a test 720x480@25mbps and PSP had absolutely no problems with decoding :)

aww what a powerful little beast he is! im impressed :)

for the op. do some small tests to find out.

750 is normally loads for movies and TV, but if your doing something like sports, it might show up things a little more.

ripbot is also good to play with

blinkstar
5th October 2008, 20:08
I've never used xvid4psp, but if the name indicates something, it uses XviD. CRF is a popular mode used in x264 (after all, we are in the AVC forums :)). Getting into H.264 encoding is an entire subject on its own.

Thanks for responding, Yoshiyuki!

xvid4psp does use x264--at least it lets me select that as an encoding method. Ybder x264, instead of CRF it lists something called Q, which I think is the same thing--the values seem to be the same. And I am using xvid4psp to make Mp4 AVC files.


See how many possible "best" situations I can come up with? It depends on what *you* intend to do with the files. If you state your preferences, we may be able to recommend settings according to the situation. You'll have to be extremely specific though.

I see what you mean. Looks like there is no simple answer. I think the most specific way I can put is that I want the best picture and audio quality that the PSP can provide, regardless of filesize ...

I ran a few visual tests and as far as I can tell there is no visible difference between a bitrate of 1000 and a bitrate of 5000 on the psp. I'm going to try CRF 18 next.

Yoshiyuki Blade
6th October 2008, 03:06
xvid4psp does use x264--at least it lets me select that as an encoding method. Ybder x264, instead of CRF it lists something called Q, which I think is the same thing--the values seem to be the same. And I am using xvid4psp to make Mp4 AVC files.

Ah i see. xvid4psp might not have that much flexibility if CRF isn't an option in it.

There's another option called "constant quantizer" or "QP" which is much different than "contstant quality" or "CRF." Keep that in mind so you dont get the two confused.

To be honest, I can't think of an everyday situation to use QP mode.

I think QP mode strictly encodes most of the video around 1 quantizer. By the way, a quantizer is kind of a way of measuring quality. The lower the value, the better the quality. For example, a quantizer of 0 means a frame will look exactly the same as the source (aka lossless, but it takes a *lot* space... often times more than the source itself), while a quantizer of 51 would look absolutely horrible.

What QP mode does is that it'll encode all the frames at a fixed quantizer (or at least most of the frames, it depends on other factors). This is generally a bad idea. For example, complex and high motion scenes need lower quantizers to maintain good quality, whereas simpler scenes could look fine at higher quantizers. A fixed quantizer won't be able to adjust according to the situation.

CRF is the one to do the job. The quantizers are chosen according to the complexity to each frame, while maintaining an average quality level (set by the user).


I see what you mean. Looks like there is no simple answer. I think the most specific way I can put is that I want the best picture and audio quality that the PSP can provide, regardless of filesize ...

I ran a few visual tests and as far as I can tell there is no visible difference between a bitrate of 1000 and a bitrate of 5000 on the psp. I'm going to try CRF 18 next.

Yeah, 5000 kbps is quite a lot of bitrate, even for full DVD resolution video. If you've resized your videos to PSP resolutions, go ahead and use CRF 18-22 to get a decent ballpark on the quality/filesize tradeoff. Just doublecheck to make sure you're using CRF mode, and not QP :).

Sagekilla
6th October 2008, 03:38
Yeah, QP encodes at a constant quantizer. What CRF does differently (crf 22 vs qp 22) is that it varies the bit distribution according to complexity, so certain frames will get a higher quantizer than other frames. In the end, the file sizes end up being more or less the same, but CRF is higher quality.

Dark Shikari
6th October 2008, 04:27
Yeah, QP encodes at a constant quantizer. What CRF does differently (crf 22 vs qp 22) is that it varies the bit distribution according to complexity, so certain frames will get a higher quantizer than other frames. In the end, the file sizes end up being more or less the same, but CRF is higher quality.More importantly, given its name, Constant Quantizer encoding disables AQ ;)

Sagekilla
6th October 2008, 05:13
Does QP also affect psy-rd in any manner or is it independent of rc method?

Dark Shikari
6th October 2008, 06:23
Does QP also affect psy-rdno it doesn't

blinkstar
6th October 2008, 08:04
Ah i see. xvid4psp might not have that much flexibility if CRF isn't an option in it.

There's another option called "constant quantizer" or "QP" which is much different than "contstant quality" or "CRF." Keep that in mind so you dont get the two confused.

Well, how's this for confusing.

With xvid4psp, under "Video encoding settings," if you select "Constant Quality," you then have to choose a number for "Quantizer." So Quantizer is a subsetting of "Constant Quality." But I'm guessing that Quantizer in this instance does NOT mean "constant quantizer," because there is a separate selection for "Constant Quantizer" at the start. In other words, you can choose either "Constant Quality," or "Constant Quantizer." If you choose Constant Quality, you then enter a number for Quantizer, but if you choose Constant Quantizer, you then enter a number for bitrate ... I'm guessing "Constant Quality" equals CRF (at least I hope it does).

Ranguvar
6th October 2008, 16:35
In my experience, it does mean CRF. Ring Winnydows :)

You could always do an encode and then take a loot at it with MediaInfo or similar, or a hex editor.

Yoshiyuki Blade
6th October 2008, 18:08
Well, how's this for confusing.

With xvid4psp, under "Video encoding settings," if you select "Constant Quality," you then have to choose a number for "Quantizer." So Quantizer is a subsetting of "Constant Quality." But I'm guessing that Quantizer in this instance does NOT mean "constant quantizer," because there is a separate selection for "Constant Quantizer" at the start. In other words, you can choose either "Constant Quality," or "Constant Quantizer." If you choose Constant Quality, you then enter a number for Quantizer, but if you choose Constant Quantizer, you then enter a number for bitrate ... I'm guessing "Constant Quality" equals CRF (at least I hope it does).

Yeah, whether you choose "constant quality" mode or "constant quantizer," you have to specify the quantizer you want (instead of bitrate).

It's pretty safe to assume that "Constant Quality" in xvid4psp is CRF. If you really wanna be certain, you can open your clip with avinaptic (http://fsinapsi.altervista.org/) and take a look at the user data.

blinkstar
6th October 2008, 18:57
Thanks Yoshiyuki and Ranguvar for helping me clear that up!

What are the advantages and disadvantages of using CRF versus setting a bitrate?

Atak_Snajpera
6th October 2008, 18:59
What are the advantages and disadvantages of using CRF versus setting a bitrate?
Jesus! Use search! It was explained million times.

Yoshiyuki Blade
6th October 2008, 19:13
Thanks Yoshiyuki and Ranguvar for helping me clear that up!

What are the advantages and disadvantages of using CRF versus setting a bitrate?

CRF only needs a single pass, and supposedly has the equivalent quality of 2-pass bitrate encoding. And from what I gathered, single-pass bitrate is bad for various reasons.

Anyhow, for example, let's say you encode a video clip at CRF 20 and the output video has a bitrate of 2532kbps. Then you encode the same clip with the same settings, but choose 2-pass encoding at 2532kbps. The resultant video should have similar average quantizers as the CRF encode did, but took longer because it's 2-pass.

CRF is great for single-pass high quality encoding, but you can't really predict how big the file size is gonna be except through trial-and-error. 2-pass bitrate encoding can allow you to easily predict how big you want a file to be, but it it requires a 2nd pass (and thus, more time to complete).

Jesus! Use search! It was explained million times.

Hehe, I know how you feel. But it's sometimes difficult to get all your thoughts together on this subject after going through several threads. Some misinformation or outdated information is present as well.

blinkstar
6th October 2008, 22:15
Hehe, I know how you feel. But it's sometimes difficult to get all your thoughts together on this subject after going through several threads. Some misinformation or outdated information is present as well.

Yes, sorry If I was being annoying there. And thanks for answering my question anyway, Yoshiyuki! Very much appreciated.

Yoshiyuki Blade
7th October 2008, 03:18
Yes, sorry If I was being annoying there. And thanks for answering my question anyway, Yoshiyuki! Very much appreciated.

You're welcome. It was really no problem for me. I wouldn't have bothered making posts that just tell people to use search or whatever, otherwise I'd rather just refrain from posting anything at all. Plus it's nice to get other relevant questions answered consecutively in the same thread. That'll leave newbies with less searching to do.

Rumbah
7th October 2008, 03:24
The great thing about CRF is that you can do some test encodes with different CRF values and choose the one that has the quality you like. Then you can use that chosen CRF value in any other encoding you do and get a similar quality. That way you do not have to worry about bitrate to gain your desired quality. If you use 2-pass encoding you can get very different results at the same bitrate for different clips (calm clips vs. action clips).
The obvious disadvantage is that you cannot predict the final file size but if your memory card is big enough you sould not have a problem with that (especially for resized movies to PSP resolution) :p .

blinkstar
7th October 2008, 06:11
The great thing about CRF is that you can do some test encodes with different CRF values and choose the one that has the quality you like. Then you can use that chosen CRF value in any other encoding you do and get a similar quality. That way you do not have to worry about bitrate to gain your desired quality. If you use 2-pass encoding you can get very different results at the same bitrate for different clips (calm clips vs. action clips).
The obvious disadvantage is that you cannot predict the final file size but if your memory card is big enough you sould not have a problem with that (especially for resized movies to PSP resolution) :p .

Thanks for the advice, Rumbah! I have an 8 gig mem card and so far the biggest movie file I have encoded has been a little bit over 3 gigs. I would much rather deal with a really large file if it means better picture quality. (If they ever come down in price I'd love to grab a 16 gig card for this very same reason.)

Looks like CRF is definitely the way to go for me.

Sagekilla
7th October 2008, 14:52
I should expect if you use CRF at PSP res (480x272) you should be getting very small (< 1 GB) and high quality videos. I tend to get 2 GB rips myself @ DVD resolution.

Dark Eiri
8th October 2008, 00:53
Yeah, with CRF22 you'll probably get less than 700 MB for a movie.

chainring
8th October 2008, 19:03
Yeah, with CRF22 you'll probably get less than 700 MB for a movie.Just did this yesterday with RipBot264 and I Robot. CRF22 and all options maxed out, with 96kbps stereo, it came in just a touch over 400 MB. It could have been lower, but I messed up with cropping so it left the black bars.

BTW, here's the settings I used to max out and have a playable file on my PSP (4.05 fw).

Note: This test was performed in Handbrake (latest SVN version), and on a Mac.

Reference Frames: 3 (That's it, no more!)
Mixed References: yes
B-Frames: 16
Direct Prediction: Auto
Weighted B-Frames: yes
B-RDO: yes
Bidirectional Refinement: yes
Motion Estimation: ME-UMH
ME Range: 32
Subpixel Refinement: 7
Analysis: All
8x8 DCT: No!
Deblocking: -0:-0
Trellis: 2
No Fast-P-Skip: yes
No DCT-Decimate: yes

I'm testing a newly created CRF profile in MeGUI right now and will report the findings.

Dark Eiri
8th October 2008, 21:30
PSP can play 16 B-Frames? That's news to me. Good news.

Sagekilla
8th October 2008, 21:35
If you were using the latest x264 from git, you could also have subme 9 (Subpixel refinement 9). Why no 8x8 dct? PSP doesn't support this?

Atak_Snajpera
8th October 2008, 22:19
Why no 8x8 dct? PSP doesn't support this?
8x8dct belongs to HiGH Profile. PSP needs Main Profile

chainring
8th October 2008, 22:21
PSP can play 16 B-Frames? That's news to me. Good news.I pumped it all the way to 16 B-Frames and it had absolutely zero problems. Now, my understanding of B-Frames is, even though you tell the encoder to use that many it will only use what is necessary. Someone correct me if that's incorrect.

Take Reference Frames to anything over 3 and it will not play.

Dark Shikari
8th October 2008, 22:24
I pumped it all the way to 16 B-Frames and it had absolutely zero problems. Now, my understanding of B-Frames is, even though you tell the encoder to use that many it will only use what is necessary. Someone correct me if that's incorrect.

Take Reference Frames to anything over 3 and it will not play.
This is correct.

Of course, this also means the encoder might never have used 16 b-frames, or even maybe not over three, and so the PSP never encountered a problem ;)

Try --no-b-adapt --scenecut=-1 --bframes 16 and see if the PSP plays it.

chainring
8th October 2008, 22:25
If you were using the latest x264 from git, you could also have subme 9 (Subpixel refinement 9). Why no 8x8 dct? PSP doesn't support this?
For the test I posted, those settings were from the latest SVN version of Handbrake for the Mac. Later, I did a full encode of "I Robot" just out of curiosity sake to see the final size at CRF 22, and it came in just over 400 MB.

I'm now doing tests with r999 in MeGUI and all settings maxed. I'll report the findings in a bit.

Dark Eiri
8th October 2008, 22:38
This is correct.

Of course, this also means the encoder might never have used 16 b-frames, or even maybe not over three, and so the PSP never encountered a problem ;)

Try --no-b-adapt --scenecut=-1 --bframes 16 and see if the PSP plays it.

If it doesn't works, well, we can always use b-adapt 2 and 3 bframes. It's similar to or even better than --b-adapt 1 --bframes 16, anyways, isn't it?

It would be really nice to see the PSP allowing higher specs, though.

fleon
9th October 2008, 06:39
Thanks for all the findings that everyone have aported to this, I do not want to discredit the psp profile of sharktooth, I mean he is a coder of megui he knows a lot!, but I always thought that the psp was limited as here we are finding that! thanks again I have learned a lot!

Also can anyone explain me what the switches --b-adapt and psy rdo do? the megui wiki is a little outdated

As implied in my post I also have a psp so feel free to request my help for some testing options

kemuri-_9
9th October 2008, 06:51
there's already plenty of threads that go into detail on --b-adapt and psy-rdo

the major original ones being
b-adapt: http://forum.doom9.org/showthread.php?t=139827
psy-rdo: http://forum.doom9.org/showthread.php?t=138293

fleon
9th October 2008, 21:35
This is correct.

Of course, this also means the encoder might never have used 16 b-frames, or even maybe not over three, and so the PSP never encountered a problem ;)

Try --no-b-adapt --scenecut=-1 --bframes 16 and see if the PSP plays it.

I can confirm this does work! this is the complete settings that I used

program --crf 19.0 --level 3 --ref 3 --mixed-refs --no-fast-pskip --bframes 16 --b-adapt 0 --weightb --direct auto --subme 9 --trellis 2 --partitions p8x8,b8x8,i4x4 --vbv-bufsize 10000 --vbv-maxrate 10000 --scenecut 1 --me umh --threads auto --thread-input --progress --no-psnr --no-ssim --output "output" "input"

if you want I can upload the video

Dark Shikari
9th October 2008, 21:47
--scenecut -1
not 1

fleon
9th October 2008, 22:12
--scenecut -1
not 1

I didnt read well but, This also works, this is the complete settings:

program --crf 19.0 --level 3 --ref 3 --mixed-refs --no-fast-pskip --bframes 16 --b-adapt 0 --weightb --direct auto --subme 9 --trellis 2 --partitions p8x8,b8x8,i4x4 --vbv-bufsize 10000 --vbv-maxrate 10000 --scenecut -1 --me umh --threads auto --thread-input --progress --no-psnr --no-ssim --output "output" "input"

also if you want i can upload the video, I used megui 0.3.0.3002 and x264 998 skystrife's patched build

chainring
10th October 2008, 00:46
Wow, this PSP is nuts in what it can handle. Absolutely zero problems with the settings below.

program --crf 22.0 --level 3 --ref 3 --mixed-refs --bframes 3 --b-adapt 2 --weightb --direct auto --subme 9 --trellis 2 --psy-rd 1.0:1.0 --partitions p8x8,b8x8,i4x4 --me umh --threads auto --thread-input --progress --no-psnr --no-ssim --output "output" "input" --no-b-adapt --scenecut=-1 --bframes 16

And this works as well, which will be my normal profile:

program --crf 22.0 --level 3 --ref 3 --mixed-refs --bframes 3 --b-adapt 2 --weightb --direct auto --subme 9 --trellis 2 --psy-rd 1.0:1.0 --partitions p8x8,b8x8,i4x4 --me umh --threads auto --thread-input --progress --no-psnr --no-ssim --output "output" "input"

Ranguvar
10th October 2008, 01:57
Woot for hardware AVC decoders ;P

Have you tried to find its bitrate ceiling yet? Have fun ;)

Dark Eiri
10th October 2008, 05:19
Wow, this PSP is nuts in what it can handle. Absolutely zero problems with the settings below.

program --crf 22.0 --level 3 --ref 3 --mixed-refs --bframes 3 --b-adapt 2 --weightb --direct auto --subme 9 --trellis 2 --psy-rd 1.0:1.0 --partitions p8x8,b8x8,i4x4 --me umh --threads auto --thread-input --progress --no-psnr --no-ssim --output "output" "input" --no-b-adapt --scenecut=-1 --bframes 16


This is kinda odd... you specified --b-adapt 2 and --bframes 3 and then --no-b-adapt --bframes 16?

That's why it's playing, x264 is using the first settings, --bframes 3.

chainring
10th October 2008, 05:33
This is kinda odd... you specified --b-adapt 2 and --bframes 3 and then --no-b-adapt --bframes 16?

That's why it's playing, x264 is using the first settings, --bframes 3.
Hmm, I'm surprised I didn't catch onto that, but I'm not quite sure what the reactions would be. I just pasted it into the custom commandline section in MeGUI without giving it a thought. D'oh!

fleon
10th October 2008, 05:40
This is kinda odd... you specified --b-adapt 2 and --bframes 3 and then --no-b-adapt --bframes 16?

That's why it's playing, x264 is using the first settings, --bframes 3.

No man, I also did that test and it does work, althought he did specified the options wrong but not me

I didnt read well but, This also works, this is the complete settings:

program --crf 19.0 --level 3 --ref 3 --mixed-refs --no-fast-pskip --bframes 16 --b-adapt 0 --weightb --direct auto --subme 9 --trellis 2 --partitions p8x8,b8x8,i4x4 --vbv-bufsize 10000 --vbv-maxrate 10000 --scenecut -1 --me umh --threads auto --thread-input --progress --no-psnr --no-ssim --output "output" "input"

also if you want i can upload the video, I used megui 0.3.0.3002 and x264 998 skystrife's patched build

kemuri-_9
10th October 2008, 14:44
This is kinda odd... you specified --b-adapt 2 and --bframes 3 and then --no-b-adapt --bframes 16?

That's why it's playing, x264 is using the first settings, --bframes 3.

x264 uses the last options specified on the command line if there's repeat ones.
x264 does parse the first instance of the options, but when it comes across repeats it just overrides the old specified values with the ones it sees along the way.
so options specified at the end are the ones that get used!

so it did use --bframes 16 and --no-b-adapt for that above case

chainring
10th October 2008, 15:59
x264 uses the last options specified on the command line if there's repeat ones.
x264 does parse the first instance of the options, but when it comes across repeats it just overrides the old specified values with the ones it sees along the way.
so options specified at the end are the ones that get used!

so it did use --bframes 16 and --no-b-adapt for that above case
Woohoo! Test valid; the PSP is nuts! Add 16 B-Frames to the crazy high bitrate handling and it's very impressive. Now, if there was a way to get rid of the ghosting. :)

Ranguvar
10th October 2008, 16:09
Ghosting I have found best resolved by increasing brightness. This makes the video look washed-out, which is countered by raising contrast/saturation. This causes huge blocking in dark scenes, which is countered by VAQ and a deblocker. Etc., etc., etc...

Choose your poison :) I agree, the ghosting sucks. So, you need to choose between that or any of the other effects of countering it. I've experimented a lot, but the only silver bullet is the soon-to-be PSP-300x, which will have a screen that reportedly is much more bright, vivid, and does not ghost :D

deets
10th October 2008, 17:17
yeah i also raise the brightness a tad for the ghosting :) my old PSP fatboy is on its last legs, it has a ring of pixels around the screen that go a different colour so im considering getting the new 3000 model with the better screen :D

Dark Eiri
10th October 2008, 17:23
So it can really play 16 b-frames? Awesome! So I guess the PSP is the best portable H264 player around, definitely. Complete obliteration of the iPods in video decoding aspect.
Should we notify Sharktooth so he could add more B-frames to the PSP profile? And Winnydows?

fleon
10th October 2008, 18:56
So it can really play 16 b-frames? Awesome! So I guess the PSP is the best portable H264 player around, definitely. Complete obliteration of the iPods in video decoding aspect.
Should we notify Sharktooth so he could add more B-frames to the PSP profile? And Winnydows?

Yeah they must know this does work 100%, I have started converting my videos with the new settings, so I have tested 16 b frames with some videos and I had no problems at all, I dont know why some people want divx and/or xvid support , h264 is way better
love x264!:cool:

Rumbah
10th October 2008, 22:30
I just did a test and call me surprised. A 16 b-frames encode played perfectly fine on the PSP.

Video info:

--[NoImage] Job commandline: "C:\Programme\megui\tools\x264\x264.exe" --crf 16.0 --level 3 --ref 3 --mixed-refs --bframes 16 --b-adapt 0 --weightb --direct auto --subme 9 --trellis 2 --psy-rd 1.0:1.0 --partitions p8x8,b8x8,i4x4 --me umh --threads auto --thread-input --sar 1:1 --progress --no-psnr --no-ssim --output "O:\Andromeda S4\Andromeda S4E19.264" "O:\Andromeda S4\Andromeda S4E19.avs" --scenecut=-1
--[Information] [10.10.2008 21:50:14] Encoding started
--[NoImage] Standard output stream
--[NoImage] Standard error stream
---[NoImage] avis [info]: 368x272 @ 29.97 fps (80387 frames)
---[NoImage] x264 [info]: using SAR=1/1
---[NoImage] x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
---[NoImage]
---[NoImage] x264 [info]: slice I:322 Avg QP:17.11 size: 13838
---[NoImage] x264 [info]: slice P:4823 Avg QP:18.09 size: 9370
---[NoImage] x264 [info]: slice B:75242 Avg QP:20.70 size: 3887
---[NoImage] x264 [info]: consecutive B-frames: 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 4.4% 0.0% 0.0% 0.0% 0.0% 0.0% 95.6%
---[NoImage] x264 [info]: mb I I16..4: 30.3% 0.0% 69.7%
---[NoImage] x264 [info]: mb P I16..4: 10.6% 0.0% 38.0% P16..4: 17.2% 14.5% 13.3% 0.0% 0.0% skip: 6.4%
---[NoImage] x264 [info]: mb B I16..4: 2.8% 0.0% 11.1% B16..8: 28.2% 5.2% 8.1% direct: 9.1% skip:35.4% L0:38.2% L1:39.3% BI:22.5%
---[NoImage] x264 [info]: direct mvs spatial:99.8% temporal:0.2%
---[NoImage] x264 [info]: ref P L0 75.9% 15.7% 8.4%
---[NoImage] x264 [info]: ref B L0 88.3% 11.7%
---[NoImage] x264 [info]: kb/s:1020.4
---[NoImage] encoded 80387 frames, 17.23 fps, 1020.41 kb/s
--[Information] Final statistics
---[NoImage] Constant Quality Mode: Quality 16 computed...
---[NoImage] Video Bitrate Obtained (approximate): 1020 kbit/s
--[Information] [10.10.2008 23:08:02] Job completed

Dark Eiri
11th October 2008, 04:53
Now I can confirm this too. Played fine with 16 b-frames.
This is just insane! It will increase compressibility a lot!

Oh, and about the ghosting, the new PSP-3000 supposedly reduced that a lot, and plus, added contrast and brightness.

Snowknight26
11th October 2008, 06:15
How about a max bitrate or lossless support?

qyqgpower
11th October 2008, 06:33
Max bitrate doesn't matter IMO, because PSP can handle any reasonable bitrate for a 720x480 source.
And I would add some notes here:
1. PSP support both PAFF and MBAFF, so interlaced DVD can be directly encoded to a PSP compatible AVC file. Someone would ask: why not use film rate or IVTC first? see below.
2. PSP always bob 720x480 video regardless of PAFF/MBAFF/Frame(progressive). The quality of PSP bob is superb, but static objects(eg. subtitle) will flicker if the bobbed display rate is not high enough(eg. 24p->48Hz=flicker, 30i->60Hz=good quality).

fleon
11th October 2008, 19:49
Now I can confirm this too. Played fine with 16 b-frames.
This is just insane! It will increase compressibility a lot!

So.. that means that now the range of 18-22 crf is too much right? what would you recommed now?

cogman
11th October 2008, 21:33
Nope, not at all. CRF adjusts with better settings. so the range is still the same, your bitrate will just go down.

chainring
11th October 2008, 23:20
How about a max bitrate or lossless support?
No worries about a max bitrate; you won't hit it. Someone else, whose name I can't remember right now, threw a 25Mbps file at the PSP and it ate it up.

At CRF 22, a full encode of "I Robot" with downmixed 64kbps HE-AAC (two channels) came in at under 400MB with amazing quality. I bet at CRF 24, it would still be excellent, but haven't tested yet.

Ranguvar
12th October 2008, 05:41
with downmixed 64kbps HE-AAC (two channels)

Don't use HE-AAC on the PSP. HE-AAC works by only encoding half of the frequency range, and using techniques to reconstruct the other half, which is of course good for very low bitrates (< ~96 for music, less for movies). However, many players (including the PSP) don't do the reconstruction, leaving you with a stream that's worse than LC-AAC.

@Dark Eri: 20Mbps has been known to work :D In other words, bitrate's not a problem at all.

Dark Eiri
12th October 2008, 05:59
My series and music videos, ripped with HE-AAC, actually sound perfect with HE-AAC on the PSP. Even HE-AACv2, surprisingly.
I'm using the PSP speakers, so maybe my ears are tricking me, but yeah, I think it supports HE-AAC indeed!

qyqgpower
12th October 2008, 08:05
PSP DO NOT support HE-AAC, what you hear is only the LC part(and at half sample rate) in HE-AAC file.
What PSP speakers could do is only to let you hear the sound and that's all. If your ears are healthy, you could quickly notice the difference between HE/LC AAC with commonly available earphones.

Dark Eiri
12th October 2008, 08:29
Yeah, with earphones it would be easily detectable, but if you're using the PSP speakers, there's not much of a difference IMHO.
I'll stick to LC-AAC then. 64kbps is kinda nice for movies.

fleon
13th October 2008, 00:56
I have an old sony cybershot DSC-P32 I wanna convert some videos for viewing them on the psp and this is one of them.

After I analyse the source with megui it identifys it as an M-in-5 decimation required an selects tritical decimate to deinterlace it, now that's fine(I think) but also my camera seems to record video with noise, but I'm not sure if it noise or if it just need deblocking, so here is the video (it's short), please help me to know if it is noise or if it just need deblocking or other thing, and with a solution, thanks

http://www.mediafire.com/download.php?zy2kzoz0klm

Sagekilla
13th October 2008, 15:21
fleon, you're posting this on the wrong board. That discussion belongs in avisynth..


FWIW, you can try using MVDegrain or Deblock_QED(). I prefer MVDegrain personally, I find it does a good job at removing artifacts in general, not just noise/grain. What you have is blocking but MVDegrain3() cleaned it up.

fleon
13th October 2008, 18:10
fleon, you're posting this on the wrong board. That discussion belongs in avisynth..


FWIW, you can try using MVDegrain or Deblock_QED(). I prefer MVDegrain personally, I find it does a good job at removing artifacts in general, not just noise/grain. What you have is blocking but MVDegrain3() cleaned it up.

Sorry, it is just that if I find the solution for this video I find the solution for every video that my camera records, but still after this i will now post on the right boards..

I placed the last version of mvtools on the plugins directory of avisynth and I used this script:

DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1",info=3)
ColorMatrix(hints=true,interlaced=true)
TDecimate(cycleR=1)
#crop
Spline36Resize(480,272) # Spline36 (Neutral)
MVDegrain3()

but I get this error:
http://img236.imageshack.us/img236/589/45198012ja6.th.jpg (http://img236.imageshack.us/my.php?image=45198012ja6.jpg)http://img236.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)

could you please help me out

J_Darnley
13th October 2008, 20:09
Read the MVTools documentation. You need to calculate all 6 vector clips with MVAnalyse() then tell MVDegrain3() what they are.

chainring
13th October 2008, 20:13
Don't use HE-AAC on the PSP. HE-AAC works by only encoding half of the frequency range, and using techniques to reconstruct the other half, which is of course good for very low bitrates (< ~96 for music, less for movies). However, many players (including the PSP) don't do the reconstruction, leaving you with a stream that's worse than LC-AAC.

@Dark Eri: 20Mbps has been known to work :D In other words, bitrate's not a problem at all.
Good to know! FWIW, I tried searching for what the PSP supports, but didn't find anything conclusive from a quick search. I'm guessing it's best to downmix to stereo and not do any Dolby Pro-Logic?

fleon
13th October 2008, 20:29
Read the MVTools documentation. You need to calculate all 6 vector clips with MVAnalyse() then tell MVDegrain3() what they are.

Well i read some of the part of MVAnalyse but I didnt understand it too much, I looked the examples and it seems that I should use this:

vectors = source.MVAnalyse(isb = false)
source.MVShow(vectors)

correct me if I am wrong

and also if that is the way to do it, how do I view the values of all the 6 vector clips?

J_Darnley
13th October 2008, 21:11
If one want to view the vectors, then yes that is how one would do it. However you seem to want to use MVDegrain3. There is an example of how to use MVDegrain2, so just expand that with the delta=3 analyses and you will get something like:
backward_vec3 = source.MVAnalyse(isb = true, delta = 3, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec2 = source.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = source.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = source.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = source.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec3 = source.MVAnalyse(isb = false, delta = 3, pel = 2, overlap=4, sharp=1, idx = 1)
source.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400,idx=1)

fleon
13th October 2008, 21:32
If one want to view the vectors, then yes that is how one would do it. However you seem to want to use MVDegrain3. There is an example of how to use MVDegrain2, so just expand that with the delta=3 analyses and you will get something like:
backward_vec3 = source.MVAnalyse(isb = true, delta = 3, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec2 = source.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = source.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = source.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = source.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec3 = source.MVAnalyse(isb = false, delta = 3, pel = 2, overlap=4, sharp=1, idx = 1)
source.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400,idx=1)

Well I get an error by using the code you gave but I changed it, I replaced MVDegrain2 with MVDegrain3 in the last line and it worked, you forgot to replace that, right? for adapting the example of MVDegrain to use MVDegrain3

also i replaced source with DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3) I know that it sounds stupid but I thought that puting the source at the beginning of the script was enough Anyhow this is my complete script I think is correct now

DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3)
ColorMatrix(hints=true,interlaced=true)
TDecimate(cycleR=1)
#crop
Spline36Resize(480,272) # Spline36 (Neutral)
backward_vec3 = DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3).MVAnalyse(isb = true, delta = 3, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec2 = DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3).MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3).MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3).MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3).MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec3 = DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3).MVAnalyse(isb = false, delta = 3, pel = 2, overlap=4, sharp=1, idx = 1)
DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3).MVDegrain3(backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400,idx=1)

Let me know if it is not right..

that is for for fixing this http://www.mediafire.com/download.php?zy2kzoz0klm

and with this solution
FWIW, you can try using MVDegrain or Deblock_QED(). I prefer MVDegrain personally, I find it does a good job at removing artifacts in general, not just noise/grain. What you have is blocking but MVDegrain3() cleaned it up.

EDIT: After I convert the video with that script I get an 640x480 file Even Though if specified 480x272, you know for the psp resolution, I dont know why that happened

EDIT2: I placed Spline36Resize(480,272) # Spline36 (Neutral) in the last line and it worked now I got a 480x272 file

J_Darnley
13th October 2008, 23:20
That is not right. Think about what you have done in the script. You have decoded the source, applied some filters, resized then replace the video with the source again! After the resize, put a line with source = last in it, then you can use a variable named source or you can just them all operate on last.

fleon
13th October 2008, 23:41
That is not right. Think about what you have done in the script. You have decoded the source, applied some filters, resized then replace the video with the source again! After the resize, put a line with source = last in it, then you can use a variable named source or you can just them all operate on last.

Sorry but I am still learning all this and I dont know too much althought in this thread I have learned a lot but I still think that I am in diapers..

for that reason I dont understand you too much, what you said means that I should not replace the word source with this DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3) in the part of the MVDegrain3 script? and also the resizer should not be in the last line right? or could you please correct the parts that are wrong in my script?

EDIt: After reading various times, I kinda understand what you told me, in the part of the MVDegrain3 script I am taking the source without resizing it and without appling filters because I put the first line of the script, right?

Now what you told me is like create a variable and using that in the mvdegrain3 script and by that it include all the things that are before the mvdegrain3 script

By I dont know how to properly create that variable puting just source= last in it doesnt do the work, SO I thought that maybe is better to put the MVDegrain3 script first and then the other options like this:

DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3)
backward_vec3 = DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3).MVAnalyse(isb = true, delta = 3, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec2 = DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3).MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3).MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3).MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3).MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec3 = DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3).MVAnalyse(isb = false, delta = 3, pel = 2, overlap=4, sharp=1, idx = 1)
DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3).MVDegrain3(backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400,idx=1)
ColorMatrix(hints=true,interlaced=true)
TDecimate(cycleR=1)
#crop
Spline36Resize(480,272)

Correct me if I am wrong..

Ranguvar
14th October 2008, 01:22
Um. Wow.

Try this instead:

DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3)
src
backward_vec3 = src.MVAnalyse(isb = true, delta = 3, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec2 = src.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = src.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = src.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = src.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec3 = src.MVAnalyse(isb = false, delta = 3, pel = 2, overlap=4, sharp=1, idx = 1)
MVDegrain3(backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400,idx=1)
ColorMatrix(hints=true,interlaced=true)
TDecimate(cycleR=1)
#crop
Spline36Resize(480,272)

fleon
14th October 2008, 04:28
Um. Wow.

Try this instead:

DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3)
src
backward_vec3 = src.MVAnalyse(isb = true, delta = 3, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec2 = src.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = src.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = src.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = src.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec3 = src.MVAnalyse(isb = false, delta = 3, pel = 2, overlap=4, sharp=1, idx = 1)
MVDegrain3(backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400,idx=1)
ColorMatrix(hints=true,interlaced=true)
TDecimate(cycleR=1)
#crop
Spline36Resize(480,272)

I get this error http://img80.imageshack.us/img80/55/65111634fs6.th.jpg (http://img80.imageshack.us/my.php?image=65111634fs6.jpg)http://img80.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php) with that script

kemuri-_9
14th October 2008, 05:07
yeah ranguvar messed up with the src definition

DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3)
backward_vec3 = MVAnalyse(isb = true, delta = 3, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec2 = MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec3 = MVAnalyse(isb = false, delta = 3, pel = 2, overlap=4, sharp=1, idx = 1)
MVDegrain3(backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400,idx=1)
ColorMatrix(hints=true,interlaced=true)
TDecimate(cycleR=1)
#crop
Spline36Resize(480,272)

that should work, since when avisynth assigns to variables it doesn't overwrite the 'last' variable on those assignment lines.

Sagekilla
14th October 2008, 05:18
This is why I like the MVDegrainMulti flavor of MVtools -- You can do the same thing in two lines:


vectors = source.MVAnalyse(refframes=3, pel=2, overlap=4, idx=1)
source.MVDegrain(vectors, refframes=3, idx=1)


So much easier, shame that it's not an "official" build.

Ranguvar
14th October 2008, 12:12
I fail. :p

acrespo
14th October 2008, 22:16
Max bitrate doesn't matter IMO, because PSP can handle any reasonable bitrate for a 720x480 source.
And I would add some notes here:
1. PSP support both PAFF and MBAFF, so interlaced DVD can be directly encoded to a PSP compatible AVC file. Someone would ask: why not use film rate or IVTC first? see below.
2. PSP always bob 720x480 video regardless of PAFF/MBAFF/Frame(progressive). The quality of PSP bob is superb, but static objects(eg. subtitle) will flicker if the bobbed display rate is not high enough(eg. 24p->48Hz=flicker, 30i->60Hz=good quality).

This means that I don't need to deinterlace or IVTC any video to convert to PSP?

Sagekilla
14th October 2008, 22:32
you should still IVTC video if it's 29.97 fps video --- progressive 24 fps compresses much better than mixed field 29.97 fps. I don't see any reason to not IVTC, ever, for that matter.. This is only if your source is hard/soft telecined to 29.97 fps though. There really should be no reason to leave the telecine in though, since it takes practically no CPU to remove it, compared to the CPU usage you'd need to do smart deinterlacing in avisynth.

If it's interlaced, you could encode as interlaced or you can downsize if you choose to.

fleon
15th October 2008, 00:03
yeah ranguvar messed up with the src definition

DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3)
backward_vec3 = MVAnalyse(isb = true, delta = 3, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec2 = MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec3 = MVAnalyse(isb = false, delta = 3, pel = 2, overlap=4, sharp=1, idx = 1)
MVDegrain3(backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400,idx=1)
ColorMatrix(hints=true,interlaced=true)
TDecimate(cycleR=1)
#crop
Spline36Resize(480,272)

that should work, since when avisynth assigns to variables it doesn't overwrite the 'last' variable on those assignment lines.

Well, that also didnt work I get this error http://img235.imageshack.us/img235/8718/56792763sz6.th.jpg (http://img235.imageshack.us/my.php?image=56792763sz6.jpg)http://img235.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php) please help me out with this, I just need to fix this video and I'll fix every video recorded with my cam with the same script thanks!

kemuri-_9
15th October 2008, 01:28
then someone up top messed up the mvdegrain3 call from above...
i'm not the most familiar with it, so someone else should help out there.

chainring
15th October 2008, 02:38
PSP-3000 will be in-hand tomorrow. ;)

Sagekilla
15th October 2008, 05:54
Oh dear god. Here's the general one:


# Source("...")

src = last
bvec3 = src.MVAnalyse(isb=true, delta=3, pel=2, overlap=4, sharp=1, idx=1)
bvec2 = src.MVAnalyse(isb=true, delta=2, pel=2, overlap=4, sharp=1, idx=1)
bvec1 = src.MVAnalyse(isb=true, delta=1, pel=2, overlap=4, sharp=1, idx=1)
fvec1 = src.MVAnalyse(isb=false, delta=1, pel=2, overlap=4, sharp=1, idx=1)
fvec2 = src.MVAnalyse(isb=false, delta=2, pel=2, overlap=4, sharp=1, idx=1)
fvec3 = src.MVAnalyse(isb=false, delta=3, pel=2, overlap=4, sharp=1, idx=1)
src.MVDegrain3(bvec1,fvec1,bvec2,fvec2,bvec3,fvec3,idx=1)

# moar code here


Or for your specific video:


DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3)

src = last

bvec3 = src.MVAnalyse(isb=true, delta=3, pel=2, overlap=4, sharp=1, idx=1)
bvec2 = src.MVAnalyse(isb=true, delta=2, pel=2, overlap=4, sharp=1, idx=1)
bvec1 = src.MVAnalyse(isb=true, delta=1, pel=2, overlap=4, sharp=1, idx=1)
fvec1 = src.MVAnalyse(isb=false, delta=1, pel=2, overlap=4, sharp=1, idx=1)
fvec2 = src.MVAnalyse(isb=false, delta=2, pel=2, overlap=4, sharp=1, idx=1)
fvec3 = src.MVAnalyse(isb=false, delta=3, pel=2, overlap=4, sharp=1, idx=1)
src.MVDegrain3(bvec1,fvec1,bvec2,fvec2,bvec3,fvec3,idx=1)

ColorMatrix(hints=true,interlaced=true)
TDecimate(cycleR=1)
Spline36Resize(480,272)



There shouldn't be any errors. If there is, tell us the exact error message. By the way, there was no need to specify thSAD=400. That's the default.

qyqgpower
15th October 2008, 06:21
you should still IVTC video if it's 29.97 fps video --- progressive 24 fps compresses much better than mixed field 29.97 fps. I don't see any reason to not IVTC, ever, for that matter.. This is only if your source is hard/soft telecined to 29.97 fps though. There really should be no reason to leave the telecine in though, since it takes practically no CPU to remove it, compared to the CPU usage you'd need to do smart deinterlacing in avisynth.

If it's interlaced, you could encode as interlaced or you can downsize if you choose to.
Yes, it's better to IVTC a telecined source before encoding for the sake of compression. And one should always deinterlace/IVTC their source for non-480p encode.
But if you overlay a subtitle upon the video and encode it to 480p@24/25fps, you'll notice point 2 in my previous post at playback.

fleon
15th October 2008, 07:23
Oh dear god. Here's the general one:


# Source("...")

src = last
bvec3 = src.MVAnalyse(isb=true, delta=3, pel=2, overlap=4, sharp=1, idx=1)
bvec2 = src.MVAnalyse(isb=true, delta=2, pel=2, overlap=4, sharp=1, idx=1)
bvec1 = src.MVAnalyse(isb=true, delta=1, pel=2, overlap=4, sharp=1, idx=1)
fvec1 = src.MVAnalyse(isb=false, delta=1, pel=2, overlap=4, sharp=1, idx=1)
fvec2 = src.MVAnalyse(isb=false, delta=2, pel=2, overlap=4, sharp=1, idx=1)
fvec3 = src.MVAnalyse(isb=false, delta=3, pel=2, overlap=4, sharp=1, idx=1)
src.MVDegrain3(bvec1,fvec1,bvec2,fvec2,bvec3,fvec3,idx=1)

# moar code here


Or for your specific video:


DGDecode_mpeg2source("C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.d2v",info=3)

src = last

bvec3 = src.MVAnalyse(isb=true, delta=3, pel=2, overlap=4, sharp=1, idx=1)
bvec2 = src.MVAnalyse(isb=true, delta=2, pel=2, overlap=4, sharp=1, idx=1)
bvec1 = src.MVAnalyse(isb=true, delta=1, pel=2, overlap=4, sharp=1, idx=1)
fvec1 = src.MVAnalyse(isb=false, delta=1, pel=2, overlap=4, sharp=1, idx=1)
fvec2 = src.MVAnalyse(isb=false, delta=2, pel=2, overlap=4, sharp=1, idx=1)
fvec3 = src.MVAnalyse(isb=false, delta=3, pel=2, overlap=4, sharp=1, idx=1)
src.MVDegrain3(bvec1,fvec1,bvec2,fvec2,bvec3,fvec3,idx=1)

ColorMatrix(hints=true,interlaced=true)
TDecimate(cycleR=1)
Spline36Resize(480,272)



There shouldn't be any errors. If there is, tell us the exact error message. By the way, there was no need to specify thSAD=400. That's the default.

I get an error sorry.. it says ColorMatrix: no hints detected in stream with hints= true (C:\Documents and Settings\Administrator\Desktop\New Folder (2)\VTS_06_1.avs, line 13).

BUT I thought that maybe if I place this line ColorMatrix(hints=true,interlaced=true) below the first line it would do the job and that actually worked.

Now I got one last question about this whole deal, is it right to put this line ColorMatrix(hints=true,interlaced=true) below the first line or it will something like my other attempts?

blinkstar
16th October 2008, 08:49
Just did this yesterday with RipBot264 and I Robot. CRF22 and all options maxed out, with 96kbps stereo, it came in just a touch over 400 MB. It could have been lower, but I messed up with cropping so it left the black bars.

BTW, here's the settings I used to max out and have a playable file on my PSP (4.05 fw).

Note: This test was performed in Handbrake (latest SVN version), and on a Mac.

Reference Frames: 3 (That's it, no more!)
Mixed References: yes
B-Frames: 16
Direct Prediction: Auto
Weighted B-Frames: yes
B-RDO: yes
Bidirectional Refinement: yes
Motion Estimation: ME-UMH
ME Range: 32
Subpixel Refinement: 7
Analysis: All
8x8 DCT: No!
Deblocking: -0:-0
Trellis: 2
No Fast-P-Skip: yes
No DCT-Decimate: yes

I'm testing a newly created CRF profile in MeGUI right now and will report the findings.

chainring--thanks for offering such detailed advice! I haven't used ripbot before but I will try it with your settings and see how it compares to xvid4psp ...

blinkstar
16th October 2008, 08:55
Woohoo! Test valid; the PSP is nuts! Add 16 B-Frames to the crazy high bitrate handling and it's very impressive. Now, if there was a way to get rid of the ghosting. :)

I'm very much of a novice at this, in case you all haven't noticed yet, but I've tried all the pre-packaged psp video encoding programs out there, and the only way I was able to reduce (impossible IMO to get rid of it completely) ghosting was to use the "ghostbusters" setting on xvid4psp, which as a previous poster noted, tweaks contrast and other picture settings ...

phibertron
17th March 2009, 16:23
I have been a lot of playing around with settings to see if I can dial things into a happy medium, if thats even possible...

But what i did find interesting in my experiments was when comparing a bitrate encode of 512 against a quality encode of 22.

They both, to me, looked very accetapble, and just about identicle
Please note that I am purposely using no bframes and no cabac.
i am doing this so that my encodes of 480x272 work with both psp and the iphone/itouch

here are the settings im using for bitrate

bitrate=512
vbv_maxrate=4000
vbv_bufsize=4000
level_idc=21
bframes=0
subq=9
frameref=2
mixed_refs
partitions=all
me=umh
me_range=32
nofast_pskip
nocabac
nopsnr
nossim


Here are the settings im using for constant quality

crf=22
level_idc=21
bframes=0
subq=9
frameref=2
mixed_refs
partitions=all
me=umh
me_range=32
nofast_pskip
nocabac
nopsnr
nossim



and if you were wondering how long it took me to encode a 150 minute high action video with these settings
I did it in about an hour and ten minutes on a centrino 2 dual core 2.9ghz laptop, the lenovo t500

the one thing im still looking into, is these settings in particular


bitrate=512
vbv_maxrate=4000
vbv_bufsize=4000


I used the maxrate for the 2.1 IDC level, and one that both the PSP and iPhone/iTouch will except
The benefit of adding these is that, in comparison to CRF, and im guessing here, is that Im allowing a frame to burst to 4000
but at the same time im telling the encoder to shoot for 512
an encode of 512 not using the vbv_maxrate did not look the same as the one with it, the one with it looked so much better.
the odd part is that the file sizes were identical, which is the mystery for me...

Chengbin
17th March 2009, 17:43
I just read this thread, and WOW, PSPs have a powerful decoder in there!

I find 16 b frames unnecessary. It will slow encoding down like crazy, and if you use b-adapt 2, I don't think x264 will use more than 5 b frames.

A post in this thread said PSP only supports 3 ref frames? I find that hard to believe when it can play 20mbps videos.

I'm using an Archos 5 250GB, and it has similar decoding capabilities (I don't think it supports anything over 5mbps, although I never tried). I use this setting for my videos. I also use MVDegrain 3. Yes, I'm retarded for using some settings, but I have too much time on my hands that I don't care about using ridiculously slow settings.

cabac=1 / ref=6 / deblock=1:-1:-1 / analyse=0x1:0x131 / me=tesa / subme=9 / psy_rd=1.0:1.0 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=0 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-4 / threads=6 / nr=0 / decimate=1 / mbaff=0 / bframes=4 / b_pyramid=1 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / keyint=250 / keyint_min=25 / scenecut=40 / rc=2pass / bitrate=536 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=25000 / vbv_bufsize=14000 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:1.00

550Kbps looks fantastic on my 5. Keep in mind that my Archos has a very high quality 800x480 5'' screen, surpassing the PSP by a mile (but unforunately it also makes the price very expensive). You should get some very nice quality videos with this setting on a PSP.

For people who like a portable VIDEO player, with a insanely large hard drive and excellent H.264 support, the Archos 5 is another option.

BTW, Archos just released a firmware that allows 720p (6mbps or less) video to be played on the 5(no H.264). But you have to buy a retarded plugin for it.

Rumbah
18th March 2009, 01:21
Yes, the PSP does not support more than 3 ref frames. If you use more, it simply says it's not a compatible video file.


But your settings are funny, you think that 16 b-frames are unnecessary but use me=tesa?

Try encoding with me=umh, you'll notice a big speedup with almost no loss in quality. And 16 b-frames with b_adapt=1 can be useful for anime encodings.

Chengbin
18th March 2009, 02:40
Yes, the PSP does not support more than 3 ref frames. If you use more, it simply says it's not a compatible video file.


But your settings are funny, you think that 16 b-frames are unnecessary but use me=tesa?

Try encoding with me=umh, you'll notice a big speedup with almost no loss in quality. And 16 b-frames with b_adapt=1 can be useful for anime encodings.

me=tesa and all of the other ridiculously slow settings don't slow me down at all because I'm being bottlenecked by AutoMKV not able to use MT avisynth. The slow settings just use up more of my CPU.