Log in

View Full Version : What are the exact restrictions of H.264 for PSP??


John_He
15th November 2007, 11:10
I transcoded many clips to AVC for the PSP with the same parameters, but they are sometimes not recognized by PSP. That means, some clips work fine, but some are "not supported". I think there must be some restrictions other than framerate, resolution or audio frequency. Someone has any ideas?

I used these parameters:

AVS file:
DirectShowSource("clip.avi")
LanczosResize(480,272)

x264:
x264 --qp 22 --level 2.1 --ref 2 --mixed-refs --bframes 2 --b-rdo --bime --weightb --direct auto --subme 6 --trellis 1 --analyse p8x8,b8x8,i4x4,p4x4 --me umh --threads auto --thread-input --progress --no-psnr --no-ssim --output "video.mp4" "clip.avs"

audio:
avs2wav "clip.avs" - | neroaacenc -br 72000 -lc -ignorelength -if - -of "audio.mp4"

muxer and ATOMChanger:
mp4box -add "video.mp4" -add "audio.mp4" "output.mp4"
ATOMChanger "output.mp4" "output_fixed.mp4" AtomAVC.ini

PS: The audio is 48000Hz

I transfer output_fixed.mp4 to ms0:/VIDEO but PSP reports "unsupported".
If I add
Trim(0,99)
to the AVS script and encode using the same parameters, it works.

deets
15th November 2007, 17:59
you dont need atomchanger anymore.

for 23.97
assumefps(24000,1001)

for 29.97
assumefps(30000,1001)

try that at the end of your script that dont work

Sharktooth
16th November 2007, 03:40
--qp 22 is not always a good choice. --qp may exceed the PSP bitrate limits... use the bitrate parameter instead (and obviously 2pass encoding).

John_He
16th November 2007, 06:59
you dont need atomchanger anymore.

for 23.97
assumefps(24000,1001)

for 29.97
assumefps(30000,1001)

try that at the end of your script that dont work

It works, thx.

--qp 22 is not always a good choice. --qp may exceed the PSP bitrate limits... use the bitrate parameter instead (and obviously 2pass encoding).

Doesn't --level 2.1 limit bitrate? I assumed x264 will limit it to fit level 2.1, but I'm not sure. I always use qp to encode videos for psp, it seems to be no problem.

Schrade
16th November 2007, 07:05
PSP now supports level 3.0, so no reason to limit it to 2.1 if you don't need to.

Dark Shikari
16th November 2007, 07:11
Doesn't --level 2.1 limit bitrate? I assumed x264 will limit it to fit level 2.1, but I'm not sure. I always use qp to encode videos for psp, it seems to be no problem.--level is just a flag, it does not limit bitrate.

Atak_Snajpera
16th November 2007, 11:13
DirectShowSource("clip.avi")

Do not use DirectShowSource for avis. Use AviSource instead. Otherwise you will have problems with audio sync!

foxyshadis
16th November 2007, 11:46
--qp 22 is not always a good choice. --qp may exceed the PSP bitrate limits... use the bitrate parameter instead (and obviously 2pass encoding).

(Let's just pretend we're talking about crf, because when is qp ever a good choice other than for testing?)

How does PSP check bitrate? Is it the actual bitrate of the stream, size/time? Does it cut out over a certain peak bitrate? The latter can be easily fixed with vbv, there might be a way to fool it if it looks at other parameters.

John_He
16th November 2007, 13:02
--level is just a flag, it does not limit bitrate.
So what's done with --level? Just set a flag in the header telling the decoder it's in what level? Or gives warnings if the parameters exceed the level?