Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 29th July 2008, 20:06   #1  |  Link
jthekk2
Registered User
 
Join Date: Jan 2007
Posts: 28
PSP megui problem

I'm trying to encode an episode of the anime Samurai Champloo. It is in the .mkv format with an avc video stream and aac audio stream (44100 hz, 128 kbps). I'm trying to convert it to work on my psp using megui. My avisynth file is as follows:

Quote:
DirectShowSource("C:\Documents and Settings\Owner\Desktop\Samurai Champloo [a4e]\[a4e]Samurai_Champloo_01[h.264].mkv",fps=23.976,audio=false)
#deinterlace
#crop
Spline36Resize(480,262).Sharpen(0.2).AddBorders(0,5,0,5)
#denoise
AssumeFPS(24000,1001)
I'm using Sharktooth's Device-PSP x264 preset from here: http://forum.doom9.org/showthread.php?t=139765.

I'm not entirely sure whats wrong, as the muxed output (using the built in mp4box in megui) works fine with media player classic and quicktime, but when i try to play it on my psp, it just says "video cannot be played". When i mux the two streams separately in yamb, the video does not play either.

I also tried encoding the audio from aac to mp3, and both the megui and the yamb muxed files play video, but the sound isn't working (but it works properly on my pc)
jthekk2 is offline   Reply With Quote
Old 29th July 2008, 20:38   #2  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,806
Remove AssumeFPS(24000,1001)
Atak_Snajpera is offline   Reply With Quote
Old 29th July 2008, 20:45   #3  |  Link
jthekk2
Registered User
 
Join Date: Jan 2007
Posts: 28
i thought that was necessary for the larger files...will try it though
jthekk2 is offline   Reply With Quote
Old 29th July 2008, 22:49   #4  |  Link
Ranguvar
Registered User
 
Ranguvar's Avatar
 
Join Date: Feb 2007
Location: ::1
Posts: 1,236
I'm 99.9% sure that would not cause a problem...

jthekk2, what firmware is your PSP running? Make sure you're using either the latest Sony firmware or the latest custom firmware. And make sure you're placing your videos into F:\VIDEO, where F is the drive letter of your PSP when plugged in.
Ranguvar is offline   Reply With Quote
Old 29th July 2008, 22:49   #5  |  Link
lexor
Registered User
 
Join Date: Jan 2004
Posts: 849
And if that doesn't work, encode to raw file instead of muxing into mp4 directly, and use mp4box (even through megui) to mux video and sound later. The PSP doesn't seem to like the muxer that x264 builds include. No mp4 produced by x264 has ever played on my psp, always have to remux raw streams.
__________________
Geforce GTX 260
Windows 7, 64bit, Core i7
MPC-HC, Foobar2000
lexor is offline   Reply With Quote
Old 30th July 2008, 01:00   #6  |  Link
jthekk2
Registered User
 
Join Date: Jan 2007
Posts: 28
@ ranguvar - i'm on 4.01 m33-2. i've been putting them in the right folder too (for me its G:\video)

@ lexor - also, i have been encoding to rawavc and have been muxing it using mp4box (through yamb)...still no go
jthekk2 is offline   Reply With Quote
Old 30th July 2008, 01:07   #7  |  Link
lexor
Registered User
 
Join Date: Jan 2004
Posts: 849
hmm... weird, the profile should produce playable video (that profile never failed me, at least), and you use correct resolution. This leaves audio, I don't think PSP support mp3 in mp4 container, so that's why your avc+mp3 doesn't work. Try re-encoding aac->aac using megui (or get the source audio, if you want better quality, though if the source is ac3 or something, it's still lossy->lossy transcode). I have encountered some older aac files that wouldn't play on PSP.
__________________
Geforce GTX 260
Windows 7, 64bit, Core i7
MPC-HC, Foobar2000
lexor is offline   Reply With Quote
Old 30th July 2008, 02:58   #8  |  Link
Ranguvar
Registered User
 
Ranguvar's Avatar
 
Join Date: Feb 2007
Location: ::1
Posts: 1,236
Try removing the VBV buffer limits in the profile. The PSP can handle obscene bitrates, so they shouldn't do anything.

The interesting thing to me is that using MP3 audio makes the video play. Try muxing your video with the Haali muxer (gdsmux.exe, included with Haali Media Splitter) or with mp4creator (used by MP4Muxer).
Ranguvar is offline   Reply With Quote
Old 30th July 2008, 03:27   #9  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
the VBV limits do not prevent the file to be played. it's exactly the opposite.
ensure you have the latest firmware and to use the correct resolution and framerate.
try remuxing the output with mp4creator (or mp4box with the -psp option).

Last edited by Sharktooth; 30th July 2008 at 03:34.
Sharktooth is offline   Reply With Quote
Old 30th July 2008, 03:37   #10  |  Link
Ranguvar
Registered User
 
Ranguvar's Avatar
 
Join Date: Feb 2007
Location: ::1
Posts: 1,236
Quote:
Originally Posted by Sharktooth View Post
the VBV limits do not prevent the file to be played. it's exactly the opposite.
This is a freaky situation, so I was trying freaky answers Besides, the VBV limits seem ridiculous for a device that can handle 20Mbps..... I've encoded without them perfectly well. Oh, and sorry for the off topic, but the PSP can also do 3 b-frames, which the profile does not use
Ranguvar is offline   Reply With Quote
Old 30th July 2008, 03:44   #11  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
i know, the preset should ensure playback on older firmwares too.
however i will rename and update it asap. settings suggestions?

Last edited by Sharktooth; 30th July 2008 at 03:46.
Sharktooth is offline   Reply With Quote
Old 30th July 2008, 04:33   #12  |  Link
lexor
Registered User
 
Join Date: Jan 2004
Posts: 849
The profile is basically good, only minor tweaks are really possible:
--bframes 3; Works for sure... well maybe not on some crazy old firmware, but there is never a reason to hold back with updates for PSP, all they've done is make system better.
--qpmin 1; Default is 10, which DS tracked down to some crazy old and completely arbitrary coding decision, there is no need to constrain ratecontrol like this. This one is really a universal thing for all profiles.

As of the latest firmware --b-pyramid is still a very big no-no. I can't say anything definitive for trellis, since that depends on co-related patches (psyrd and such) and personal preference for speed.
__________________
Geforce GTX 260
Windows 7, 64bit, Core i7
MPC-HC, Foobar2000
lexor is offline   Reply With Quote
Old 30th July 2008, 05:15   #13  |  Link
Ranguvar
Registered User
 
Ranguvar's Avatar
 
Join Date: Feb 2007
Location: ::1
Posts: 1,236
Quote:
Originally Posted by lexor View Post
but there is never a reason to hold back with updates for PSP, all they've done is make system better.
Sony firmware? Definitely not Custom firmware? Still maybe not, new firmware sometimes has bugs and, more often, incompatibilities.

Quote:
Originally Posted by lexor View Post
--qpmin 1; Default is 10, which DS tracked down to some crazy old and completely arbitrary coding decision, there is no need to constrain ratecontrol like this. This one is really a universal thing for all profiles.
Confirmed.

I'd just remove the VBV, increase b-frames to 3, and lower qpmin. Oh, and one last thing, though we're really off topic now - could you please allow me to fully edit the CLI, besides just adding things? It seems impossible to remove --thread-input, for example, which in my tests slows down encoding with multithreaded scripts.
Ranguvar is offline   Reply With Quote
Old 30th July 2008, 13:10   #14  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
Quote:
Originally Posted by lexor View Post
The profile is basically good, only minor tweaks are really possible:
--bframes 3; Works for sure... well maybe not on some crazy old firmware, but there is never a reason to hold back with updates for PSP, all they've done is make system better.
--qpmin 1; Default is 10, which DS tracked down to some crazy old and completely arbitrary coding decision, there is no need to constrain ratecontrol like this. This one is really a universal thing for all profiles.

As of the latest firmware --b-pyramid is still a very big no-no. I can't say anything definitive for trellis, since that depends on co-related patches (psyrd and such) and personal preference for speed.
qpmin 1 is not going to happen.
qpmin 10 is the x264 default and it is enough for any use. 18 is almost transparent so 10 as a minumum is going to stay coz i dont even think q10 will be ever used in a bitrate restricted 2pass envcoding... 1 may avoid undersizes, but only in extreme situations and i dont think the PSP is the case.
i set qpmin 1 only in the Insane preset.
trellis dosest infuence playback.

Last edited by Sharktooth; 30th July 2008 at 13:13.
Sharktooth is offline   Reply With Quote
Old 30th July 2008, 15:21   #15  |  Link
jthekk2
Registered User
 
Join Date: Jan 2007
Posts: 28
it seems that the problem was the audio, it was in the old aac format lexor was talking about. i re-encoded the audio to nero aac-lc and then remuxed and the video played perfectly. thanks for the help!
jthekk2 is offline   Reply With Quote
Old 30th July 2008, 15:45   #16  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
good to know.
Sharktooth is offline   Reply With Quote
Old 30th July 2008, 16:01   #17  |  Link
jthekk2
Registered User
 
Join Date: Jan 2007
Posts: 28
i have a couple of more questions, not on how to get it to work on the psp, just on the settings, since i'm new to megui. what avc levels does the psp support (meaning, can i encode in avc high profile, and if so, at what level)? Also, what is the best setting to encode a 250ish mb matroska video to the psp format with quality being the main concern (and hopefully a size smaller than 250)? i'm trying to avoid getting compression artifacts if possible

Last edited by jthekk2; 30th July 2008 at 16:04.
jthekk2 is offline   Reply With Quote
Old 30th July 2008, 16:46   #18  |  Link
lexor
Registered User
 
Join Date: Jan 2004
Posts: 849
Quote:
Originally Posted by Sharktooth View Post
qpmin 1 is not going to happen.
qpmin 10 is the x264 default and it is enough for any use. 18 is almost transparent so 10 as a minumum is going to stay coz i dont even think q10 will be ever used in a bitrate restricted 2pass envcoding... 1 may avoid undersizes, but only in extreme situations and i dont think the PSP is the case.
i set qpmin 1 only in the Insane preset.
trellis dosest infuence playback.
Wouldn't that only be a problem if you believe that x264 will actually pick close to qp 1 frequently all of a sudden? I mean if you have crf 20 encode and it only went down to 11, it's not going to go below 11 if you set qpmin 1. Unless it really needs to. I think trusting (and through testing, improving) rate control is a good thing here. Especially considering that other profiles mess with ip and pb rations for no good reason, and those default ratios have apparently not been picked at random by the devs. It is not filesize, but constant quality we are going for in crf; and 2-pass will maintain the bitrate. I truly see no cause not to trust rate control here.

@jthekk2: you can't go higher than level 3. I never tried lower, and I don't see a reason to.

@Ranguvar: I have never encountered any problems with any firmware, it always made things better for me (more features, better compatibility). I once heard of bricked PSPs with custom firmware, but even that was only because some mirror site messed with the files, not because devs screwed up. And that one incident now persists on the net in the by word as some sort of general issue.
__________________
Geforce GTX 260
Windows 7, 64bit, Core i7
MPC-HC, Foobar2000

Last edited by lexor; 30th July 2008 at 16:55.
lexor is offline   Reply With Quote
Old 30th July 2008, 17:25   #19  |  Link
Ranguvar
Registered User
 
Ranguvar's Avatar
 
Join Date: Feb 2007
Location: ::1
Posts: 1,236
@lexor: Custom firmware does so much, it's almost crazy not to use it You can emulate near every other system (including the PS1 and N64, the former at consistent 100% speed), there are lots of media players, remote control apps, PDA tools, internet radio, etc.... the PSP can do nearly everything and anything. That site you're talking about, ps2nfo, aka ps3news, is a bunch of scumbags.... Besides, thanks to the devs, it's now impossible to brick a PSP through software Look up Pandora's Battery.

@jthekk2: Medium profile, level 3 (though I have found omitting --level 3 seems to still work), any resolution up to and including 480x272 or including 720x480 (but nothing in between), up to 3-bframes and 3 refs, up to something around 20Mbps (yes, Mbps), CABAC, and deblocking.
Ranguvar is offline   Reply With Quote
Old 30th July 2008, 17:38   #20  |  Link
lexor
Registered User
 
Join Date: Jan 2004
Posts: 849
Now that you mention it, did anyone ever manage to use the 720x480 resolution in a way that doesn't add black bars on all 4 sides on playback? Avoiding resize would be a bonus for DVD material, if only I could get the 16x9 picture to fill the entire screen and not be letterboxed all around.
__________________
Geforce GTX 260
Windows 7, 64bit, Core i7
MPC-HC, Foobar2000
lexor is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:42.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.