View Full Version : x264 and Sony PSP?
Pages :
1
2
3
4
5
6
7
8
9
10
[
11]
12
Atak_Snajpera
18th April 2007, 00:43
You must use higher bitrate to see difference. I suggest at least 384 kbps for movies.
lchiu7
18th April 2007, 03:29
You must use higher bitrate to see difference. I suggest at least 384 kbps for movies.
Might give it a shot then. I don't run homebrew so 3.3 should be a straightforward update. And all it seems I have to do to create the higher resolution video is a scale option in the Avisynth script and increase the bitrate in x264 (I don't use MeGui).
What is the advantage of 720x480 which I think exceeds the resolution of the PSP display?
qyqgpower
18th April 2007, 03:49
What is the advantage of 720x480 which I think exceeds the resolution of the PSP display?
the video decoder on PSP do low quality upsamling in UV planar, so when you play 480x272 on PSP, you would notice some jaggies on the edge of blue and red color.
720x480 have higher resolution in UV planar so the edge would be much more smooth.
here's a compareshot made by cyrax.(I don't use CFW so I can't do screen capture on PSP:p or I would provide a much obvious compareshot.)
http://img401.imageshack.us/img401/6320/1326231376641666aldikicas0.th.jpg (http://img401.imageshack.us/my.php?image=1326231376641666aldikicas0.jpg)
deets
18th April 2007, 17:04
interesting, thanks for sharing that pic.
of course 720 also gives you greater scope for playing back through other devices such as your TV via PS3. I hope the encodes would work on the ps3, no reason to think they wouldn't.
ilovejedd
18th April 2007, 17:47
Isn't being able to use just one file/encode for PSP and PS3 playback the whole point of adding support for 720x480 resolution? Albeit, you'll need much higher bitrate ergo, high capacity memory sticks for this. Since I backup my DVDs to MP4 for PC viewing, saving time and effort on encoding videos specifically for the PSP is definitely a good thing. I've got a couple of 4GB sticks anyways, and some spare 2GB and 1GB ones, too. :D
CruNcher
18th April 2007, 21:00
@ ilovejedd
exactly that's what SCEI archived here as the first company on a Mobile Device with AVC :) and now it's available for the Public (after the Death of UMD), but i think it would be availabe anyways from the Custom Firmware Hackers
Sony knew that so they opened it before the Scene did and now try to force people back into their protected firmware enviroment, but it's to late ;).
Most probably it was Sonys initial plan to make UMD playable directly on the PS3 or via remote to have even their own SD format established so Blue-Ray for HD content and UMD for SD (Home,Mobile) it had the potential to become that but Sony made alot of mistakes in the process but that is goodfor us now the Public has the mastering capabilities that before the day of the 3.30 firmware only SCEI Licensed Companies had with the UMD Stream Composer (Confidential .NET Based Encoding Application useing Sony's AVC Base/Main Profile Encoder and Motion Adaptive Deinterlaceing Technology).
qyqgpower
19th April 2007, 04:57
Isn't being able to use just one file/encode for PSP and PS3 playback the whole point of adding support for 720x480 resolution?
of course it is
try this setting
--crf 18.0 --level 3 --ref 2 --no-fast-pskip --bframes 3 --b-rdo --bime --weightb --direct temporal --subme 6 --analyse p8x8,b8x8,i4x4 --me umh --threads auto --thread-input --progress --no-psnr --no-ssim --sar 1:1
in a previous post I stated that 480x272 would be cropped 2 at bottom, and might have a quality loss in 480x270->480x272.
the truth is
cropping is applied, but PSP actually display 480x270 centered on the screen, so this isn't a problem at all:p
thus when you encode 480x272, you should put AddBorders(0,0,0,2) after resize to 480x270.
another auto cropping is applied when play 720x480 too: 8 pixels each at left and right.
just like what you did to maintain right AR when ripping NTSC DVD.
thus when encode directly from NTSC DVD, no cropping is needed.
when encode from "AR corrected" clips or HD source, first resize to 704x480, than AddBorders(8,0,8,0)
lchiu7
19th April 2007, 09:28
the video decoder on PSP do low quality upsamling in UV planar, so when you play 480x272 on PSP, you would notice some jaggies on the edge of blue and red color.
720x480 have higher resolution in UV planar so the edge would be much more smooth.
here's a compareshot made by cyrax.(I don't use CFW so I can't do screen capture on PSP:p or I would provide a much obvious compareshot.)
http://img401.imageshack.us/img401/6320/1326231376641666aldikicas0.th.jpg (http://img401.imageshack.us/my.php?image=1326231376641666aldikicas0.jpg)
I just upgraded my fw to 3.3 and encoded a TV show (16:9) at 480x272 with bitrate of 768. The picture is quite nice. I like how when you play it, the default resolution (full screen) has no scaling.
I also tried 720x480 but I couldn't see any improvements in that size
deets
19th April 2007, 14:34
of course it is
try this setting
--crf 18.0 --level 3 --ref 2 --no-fast-pskip --bframes 3 --b-rdo --bime --weightb --direct temporal --subme 6 --analyse p8x8,b8x8,i4x4 --me umh --threads auto --thread-input --progress --no-psnr --no-ssim --sar 1:1
so the psp can now play more than one ref and b frame, as long as you dont use --b-pyramid...
interesting...
qyqgpower
19th April 2007, 15:11
I just upgraded my fw to 3.3 and encoded a TV show (16:9) at 480x272 with bitrate of 768. The picture is quite nice. I like how when you play it, the default resolution (full screen) has no scaling.
I also tried 720x480 but I couldn't see any improvements in that size
pure color on edge would be much more distinct, especially in anime contents. in real life footages the jaggies may not be very noticeable.
deets
19th April 2007, 17:23
so im right in thinking that using 2 refs and 3 b frames should improve quality and compression, but will take longer to encode?
im currently doing some testing :)
lchiu7
21st April 2007, 11:54
Yup both 480x272 and 720x480 work fine for us too.
We have released a beta version of PSP Video 9 that supports these resolutions: http://www.pspvideo9.com
From our testing, it looks like the PSP will only playback video at those specific resolutions (480x272, 352x480, 720x480) and nothing in between (like 640x480 or 512x384).
Can anyone else confirm?
Just tried out this version. It doesn't seem to support avisynth scripts which is a showstopper for me. When profile (with avisynth) is selected, it ignores the content of the genericfile.avs file in the avs directory.
Joe Fenton
23rd April 2007, 23:13
Just tried out this version. It doesn't seem to support avisynth scripts which is a showstopper for me. When profile (with avisynth) is selected, it ignores the content of the genericfile.avs file in the avs directory.
I use PSPVideo9 with avs all the time. Try playing the avs in MPC first - I've found that if you make an error in the avs, PSPVideo9 bombs out rather than tell you an error occured. I've gotten in the habit of playing the avs in MPC before going into PV9 just to be sure.
lchiu7
24th April 2007, 10:10
I use PSPVideo9 with avs all the time. Try playing the avs in MPC first - I've found that if you make an error in the avs, PSPVideo9 bombs out rather than tell you an error occured. I've gotten in the habit of playing the avs in MPC before going into PV9 just to be sure.
This is the beta 3.3 version which supports the higher resolution. There is no option that I can see to invoke an avisynth. I have gone back to the CLI which I use and also MeGui
lchiu7
24th April 2007, 23:19
Getting in MeGui which looks like a good one step method of encoding lots of videos for the PSP. But am having a problem with audio I can't resolve.
Most of the videos I encode have AVI files with VBR MP3 audio. Up till now I have extracted the audio as a wav file which I input to neroaanenc to encode to MP4. Then of course x264 to encode the video and MP4Box to mux the two files.
This works fine in MeGui so long as I extract the audio first (I use Avidemux2) and input that to MeGui. But that defeats the one step process. So taking a tip from Deets I pass the avisynth script to the audio encoding part of MeGui. MeGui opens the file okay, seems to process the audio but ends up only creating a 1M file. Playing that file with QT indicates that the length is right (about 42" for a TV show) but of course with a 1M size, there is no audio.
For the audio encoding I am using NDAAC and choosing the PSP-LC-96 profile
Just wondering what I could be doing wrong here. Any pointers would be helpful
Thanks
Larry
foxyshadis
25th April 2007, 06:01
In the avisynth script's source, there wouldn't happen to be an audio=false, would there? Avisource and Directshowsource will normally load audio if it isn't disabled.
(42" is 42 seconds, 42' is 42 minutes. :p)
lchiu7
25th April 2007, 07:57
No I actually have audio=true in the directshowsource command
Update:
I have tried a number of different ways:
1. feeding into MeGui compressed wav files (select Nero Digital as the MP4 encoder)
2. Feeding the Avisynth script into MeGui
More often than not, I only get a MP4 file which is about 1.5Mb in size
I also tried feeding in a compressed wav file and didn't turn on the Always use DirectShow option and MeGui dies with an error in AviSynth
I am sure most users of MeGui are doing this in one step with no external programs to extract audio - just wondering how they did it?
Larry
Joe Fenton
29th April 2007, 01:17
This is the beta 3.3 version which supports the higher resolution. There is no option that I can see to invoke an avisynth. I have gone back to the CLI which I use and also MeGui
Here's a common AVS script I use with PSPVideo9... just load the avs instead of an AVI.
loadplugin("C:\DGMPGDec\DGDecode.dll")
loadplugin("C:\Program Files\AviSynth 2.5\plugins\Decomb.dll")
mpeg2source("C:\temp\rips\DVDNAME\name.d2v",cpu=6)
fielddeinterlace()
audio = WAVSource("C:\temp\rips\DVDNAME\track.wav")
AudioDub(last,audio)
The last version of PSPVideo9 I used didn't take ac3 audio, so I ripped the audio to wav and reinserted it into the avs as shown in the script.
ilovejedd
30th April 2007, 04:08
There's actually an AC3 filter for AviSynth. You can download it from the AviSynth Filter Collection page (http://avisynth.org/warpenterprises/), just search for NicAudio. It also contains a filter for DTS.
billou2k
1st May 2007, 22:46
Any chance that we get 720x576 for us PAL users? Anybody heard about anything? I guess that technically if it can decode 720x480@30fps there should be no problem doing 720x576@25fps but I dont know if the hardware scaler could handle different res...
Joe Fenton
3rd May 2007, 07:12
There's actually an AC3 filter for AviSynth. You can download it from the AviSynth Filter Collection page (http://avisynth.org/warpenterprises/), just search for NicAudio. It also contains a filter for DTS.
Thanks! That should simplfy things quite a bit on the audio side. :)
@billou2k: Sony is rather notorious for being slow on PAL support. It took a number of updates to pops before they finally supported PAL PS1 games decently. I imagine in another few updates, they'll have 720x576.
handtruck
3rd May 2007, 17:39
Do I have to add borders to make the file 480x272 with avisynth?
I am currently encoding a movie at 480x256, will I encounter a problem with viewing it on the PSP?
Do I have to add borders to make the file 480x272 with avisynth?
I am currently encoding a movie at 480x256, will I encounter a problem with viewing it on the PSP?
you could always make a very short test of the clip.
just add trim(300,1800) and test it that way :)
let us know if the unusual res works.
Atak_Snajpera
3rd May 2007, 18:05
I am currently encoding a movie at 480x256, will I encounter a problem with viewing it on the PSP?
Why do you use 480x256? (aspect ratio - 1.875?). Movie encoded in this resolution will be stretched vertically on PSP. I use following values to maintain correct aspect ratio.
16:9 - LanczosResize(480,270).AddBorders(0,0,0,2)
4:3 - LanczosResize(360,270).AddBorders(60,0,60,2)
2,35:1 - LanczosResize(480,204).AddBorders(0,34,0,34)
handtruck
3rd May 2007, 23:29
Why do you use 480x256? (aspect ratio - 1.875?). Movie encoded in this resolution will be stretched vertically on PSP. I use following values to maintain correct aspect ratio.
16:9 - LanczosResize(480,270).AddBorders(0,0,0,2)
4:3 - LanczosResize(360,270).AddBorders(60,0,60,2)
2,35:1 - LanczosResize(480,204).AddBorders(0,34,0,34)
Trying to keep the same aspect ratio as the source if possible. And trying to avoid "AddBorders", using the oneclick function in megui
Atak_Snajpera
3rd May 2007, 23:48
handtruck: Did you check your movie on PSP. Stretched or not stretched? Some time ago I checked 480x208 and it was stretched. You have two choices:Addborders or wait till Sony fixes this issue.
terrypku
4th May 2007, 05:58
Which resize filter do you guys use when encoding mp4(720*480) for psp? It looks a little too sharp with lanczosresize.
ilovejedd
4th May 2007, 16:06
I'm assuming your original source aren't NTSC DVDs, maybe HDTV caps or PAL? Anyway, I use BilinearResize. It's really fast.
terrypku
5th May 2007, 05:29
I use BD or HD-DVD as source. Bilinear? I'll try this one! Thank you!
Barker
10th May 2007, 15:40
Sorry if this has been answered before, I couldn't find the answer in the forum search.
How do you add the SAR setting in MEGUI? I don't see a DAR or SAR setting in the config screen for MEGUI, only in x264 vfw config, but that is already set to 1:1. My command line in MEGUI does not have the sar setting, and cannot be edited, so I am restricted to what the options in the config screen are. As a result, the output ar on the PSP is incorrect (L/R borders). I'm, using MEGUI 0.2.4.1039.
Thanks!
deets
11th May 2007, 00:05
go to the second tab in x264 config and go to custom command line to add --sar 1:1
Barker
11th May 2007, 05:57
go to the second tab in x264 config and go to custom command line to add --sar 1:1
Thanks, that solved my issue!
I actually came across the guides on that site (http://www.bontragerphotography.com/psp/) and it inspired me to get a PSP, now that full res is supported!!!
Sony owes that site some marketing fees ;-)
Sonstwer
11th May 2007, 13:03
Just as a notice for the archives, in case someone stumbles upon the same problem as I did (I didn't find any mentions of this anywhere):
The PSP (tested on 3.40 OE-A) doesn't like it if the timescale of the video track multiplied by its length in seconds exceeds 2^32 and just shows "Unsupported data". Usually this should not be a problem (unless you're going for incredibly long movies) but in my case the input file had 23,976023fps which x264 dutifully converted to a time scale of 23976023 which resulted in an overflow after just below 3 minutes.
deets
11th May 2007, 16:07
Thanks, that solved my issue!
I actually came across the guides on that site (http://www.bontragerphotography.com/psp/) and it inspired me to get a PSP, now that full res is supported!!!
Sony owes that site some marketing fees ;-)
hehe dont they just :P
well im glad you found my site useful :)
i really should update it with some new profiles and ps3 info
lchiu7
17th May 2007, 09:53
Has the problem with encoding with a dual core processor (--threads 2) been fixed with any recent PSP firmware release. Having just gotten a dual core Intel, I am keen to use both cores but the only test I did made a file that would not play on 3.3 firmware while it played okay in QT
Thanks
Larry
deets
17th May 2007, 16:10
if your using megui for your x264, use threads=0 and that will set things to auto threads, which works well here.
it hasnt been fixed as slices wont work, but the different way x264 now use threads will work on the PSP just fine
Sgt_Strider
22nd May 2007, 01:10
Just as a notice for the archives, in case someone stumbles upon the same problem as I did (I didn't find any mentions of this anywhere):
The PSP (tested on 3.40 OE-A) doesn't like it if the timescale of the video track multiplied by its length in seconds exceeds 2^32 and just shows "Unsupported data". Usually this should not be a problem (unless you're going for incredibly long movies) but in my case the input file had 23,976023fps which x264 dutifully converted to a time scale of 23976023 which resulted in an overflow after just below 3 minutes.
What are you trying to say? I don't understand.
foxyshadis
22nd May 2007, 07:12
It means use AssumeFPS(24000/1001), or NiceFPS or (only if you have 2.57+) AssumeFPS(23.976) at some point in your avisynth script, or it might break playback.
lchiu7
26th May 2007, 20:13
Have a new box with a clean installationof Visa Home Premium on it. Built a faster machine so I could encode more quickly. After some travails got x264 to work okay (got my single pass encodes of xvid into h.264 up 60fps on a AMD X2 3600).
But can't get mp4box to run. Whenever I try to combine the .264 file and the .mp4 file (created by the Vista compatible version of neroencaac) get the error
cannot open destination file xxx.mp4: I/O error
Yet strangely if I move the .264 and .mp4 files created on Vista to a XP box, mp4box works fine.
And files which combine okay on my XP box generate the same error as above.
Anybody out there using Vista as a platform for encoding video for the PSP and have struck this problem?
Thanks
[Update]
This is getting really weird. I ran mp4box on a XP box but on the Vista drive mapped over the network. Get the I/O error again so it's not a Vista problem.
Then ran mp4box on the Vista box but using the files on a mapped drive on my XP box and it worked also.
So it's some strange problem with the drive on the Vista box. But this is a brand new installation of Vista on a brand new Hitachi 250G SATA drive so can't think what the problem could be. The MP4 files play fine on the Vista box with QT so it can't be bad sectors or hardware issues like that
Larry
CruNcher
26th May 2007, 22:36
Hmm could be Mp4box not so optimal temp system on win32 try the same with mp4creator same problem ?
lchiu7
26th May 2007, 22:42
I have no idea what's going on. Connected a USB drive to my Vista box and can run mp4box on that. Just can't run it on my main boot drive. This is the strangest thing
Larry
[Update]
Move the USB drive to the Vista box as an internal drive and mp4box works fine on that drive. Just doesn't work on the boot drive. This is really strange.
mp4box uses root directory of a drive which working files exist as temporary directory by default on Windows System.
So if no permisson to write on root directory, mp4box can't make mp4 file.
The solutions in 3 ways.
1. Work at a drive which you have permission to write on root directory.
2. Run mp4box as administrator.
3. Run mp4box with an argument `-tmp some_directory_which_you_have_permission_to_write_on'.
lchiu7
28th May 2007, 11:08
Thanks. For another reason I turned off UAC in Vista since I was getting annoyed with access control coming on all the time. This also fixed the problem. Certainly a trap for unwary players
Sgt_Strider
9th June 2007, 09:27
For simplicity's sake, would Nero make for some easy MP4 AVC recording at 480x272 for the PSP? Would it be easy to put subtitles in with Nero?
plonk420
3rd January 2009, 11:10
so .. is 720x576@25fps working? the only thing *i* care to encode in a while, and it's a PAL TV series. trying to maximize compatibility (not sure what my 5 b-frames will do, tho .. as well as PAL resolutions).
Deinorius
5th January 2009, 12:28
Why not resize to 480x272? You will get no quality boost by using full resolution. 25 fps should be running, but I'm not sure, if I tried with such a file already.
plonk420
6th January 2009, 04:16
i'm trying to do a "one encode for all" .. targeting highest quality playback (so no resizing outside of the player doing it via --sar x:y), but also being PSP compatible. in this case the video is widescreen so i dont' have to worry about forcing fullscreen (on the PSP).
Deinorius
6th January 2009, 11:37
Ah, I got it. But IIRC PSP is just supporting up to 720x480. Of course the best way to test, is to try it yourself.
teddg
6th January 2009, 19:01
i'm trying to do a "one encode for all" .. targeting highest quality playback (so no resizing outside of the player doing it via --sar x:y), but also being PSP compatible. in this case the video is widescreen so i dont' have to worry about forcing fullscreen (on the PSP).
Ah, I got it. But IIRC PSP is just supporting up to 720x480. Of course the best way to test, is to try it yourself.
psp now supports 640x480 in addition to 720x480 since the last update.
Don't crop letterboxing, if you do you'll loose one of the zoom/fullscreen options on the psp (I forget in which particular case).
I also do a "one encode for all". Unfortunately, psp can't do 8x8dct (and i8x8) or more than 3 refs. It can handle huge bitrates though.
Atak_Snajpera
6th January 2009, 19:03
psp now supports 640x480 since the last update.
Good to know! Thanks
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.