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. |
|
|
#1 | Link |
|
Registered User
Join Date: Feb 2002
Location: Italy
Posts: 876
|
PSPEnc, ffmpeg gui for PSP encoding (mpeg4 sp only)
You can find it here:
http://jonny.leffe.dnsalias.com PSPEnc is a gui for FFMPEG. It uses Avisynth to handle the video. The output is an mp4 file compatible with PSP (only MPEG4 SP atm). Features: - Avs, Avi, Mkv, Ogm, Mpg, Wmv ... input (basically everything working with DirectShowSource). - Automatic crop/addborders, to obtain correct aspect ratio. - Automatic video bitrate calculation (you have to choose only audio bitrate and total output size). - 1 pass, 2 pass, 1 pass with fixed quantizer, compressibility test, size prediction for fixed quantizer encodes. - Job list. - You can see quantizer distribution after every encode. - You can run multiple istances of PSPEnc. Notes: - To encode from DVD source you should provide an avs script with progressive, cropped video and specify the correct aspect ratio (usually i do this with GKnot ^^). - Compressibility test is based on the quantizer you specify (it basically tell you how near/far you are from this quant). - If you obtain an output with wrong size (this is applicable mainly for 2 pass encodes), you have probably saturated video (and/or audio!). no avc support atm ... ( until someone send me a psp with fw 2.0 for free )bye jonny
__________________
home sweet home Last edited by jonny; 8th October 2005 at 23:33. |
|
|
|
|
|
#3 | Link |
|
BDVD Team
Join Date: Dec 2004
Location: Rio de Janeiro - RJ/Brasil
Posts: 306
|
@jonny
I've downloaded it and so I tested it out! It works like a charm and I did like a lot of prediction for quantizer encoding. My interest in it should be adapt it for encode to PALM's handheld. Could you give some advises to me about this target encoding? Keep up the good work! ![]() TIA, |
|
|
|
|
|
#4 | Link |
|
Registered User
Join Date: Feb 2002
Location: Italy
Posts: 876
|
thanks to both
![]() danpos, do you want to know the details of the size prediction (or general infos for PALM encoding)?
__________________
home sweet home |
|
|
|
|
|
#6 | Link | ||
|
Registered User
Join Date: Feb 2002
Location: Italy
Posts: 876
|
Size prediction:
First of all, AviSynth is required in the process. To make a prediction from, for example, a .avi file, a script like this is used: DirectShowSource("myvideo.avi") SelectRangeEvery(1400, 14) This means that 14 frames every 1400 will be returned from the original file (this is the 1% case). Now, you pass the script to your encoding app (in this case FFMPEG) making a normal fixed quant encode. To predict the final size, you must find a way to read frame size for every encoded frame (-vstats option is the way for FFMPEG - it creates a log file with the infos needed). So: Reading the log you have the size for each frame encoded. Summing up the frame sizes (discarding some frames) and dividing this sum by the number of frames used, you have the average frame size. Multiply the average frame size by the total number of frames and you have the predicted size. About "discarding some frames": SelectRangeEvery(1400, 14) Using this istruction, we take the first 14 frames, than we jump to the next 14 frames skipping 1400-14 frames. This jumps cause the codec to thing that there is a scene change, so a keyframe is inserted (artificial, because in your normal encode you'll never have this keyframe) Keyframes take more space compared to normal delta frames, so, to make a good statistic you must discard those frames (if not, you'll obtain a totally crazy result). This means that the first frame every 14 frames is discarded from the output when i make the calculations. (bframes enabled complicates things a bit, other frames needs to be discarded - it's not the case of a psp encode )PS: in the examples i've used 14 (mainly cos i've copy/pasted from an old thread) PSPEnc uses 13 as base for the SelectRangeEvery. (14 is more convenient when bframes are enabled) An old thread: http://forum.doom9.org/showthread.ph...1&page=1&pp=20 (drop the initial part) PALM: PSP is my first little device ... ^^' you have to do your searchs, i know nothing about PALM devices :P PSPEnc's resolution picker: The resolution picker is a bit strange. I copy paste from an email i've recently send: Quote:
Quote:
When you open a file, PSPEnc assumes square pixels (and so the input AR is calculated - you can change it if the input have a different AR). To match the output AR, you usually have 2 choices: crop one side or add borders to the other side (so you can usually choose one of the 2 mode in order to get correct AR on output). PSPEnc always goes for cropping by default (adding borders is probably useful only for widescreen content - AR = ~ 2.35) EDIT: Some resolutions are not selectable because the output show big artifacts when played on PSP (at least on fw 1.5). i think i'll start making a faq with this post
__________________
home sweet home Last edited by jonny; 19th September 2005 at 15:09. |
||
|
|
|
|
|
#8 | Link |
|
Registered User
Join Date: Feb 2002
Location: Italy
Posts: 876
|
i can do this type of posts only once per year
![]() to you too
__________________
home sweet home |
|
|
|
|
|
#9 | Link |
|
Registered User
Join Date: Jul 2004
Posts: 4
|
Any idea what would cause:
"Error: Exitcode=3" as soon as I press the "Start all jobs" button? I installed the latest version of avisynth so I'm not sure what else would cause it. EDIT: I installed the latest version of ffdshow and this corrected the problem. Last edited by gutzalpus; 2nd October 2005 at 17:23. |
|
|
|
|
|
#10 | Link |
|
Registered User
Join Date: Feb 2002
Location: Italy
Posts: 876
|
This kind of error is reported by ffmpeg (usually an exitcode != 0 means an error)
I've still not found a good way to get the exact error message ![]() happy you solved with ffdshow, this could indicate a previous video or audio decoding problem tip: if your source is an avi file, it could be more compatible to use "Method" = "AVISource" in the input panel (simply load the avi file and after press the "Change" button)
__________________
home sweet home |
|
|
|
|
|
#11 | Link |
|
Registered User
Join Date: Jul 2004
Posts: 4
|
I've also found that I get the same error whenever I try to convert a file with >2 channels of sound (xvid with 5.1 AC3, etc.)
So I have to manually demux and re-encode to stereo sound in order for pspenc to process the file. I'll try using "AVISource" and see if that makes a difference. |
|
|
|
|
|
#12 | Link | |
|
Registered User
Join Date: Feb 2002
Location: Italy
Posts: 876
|
Quote:
PS: i'm adding ffmpeg's error logging, in the next pspenc's version you'll be able to see the full error message instead of the exitcode number (hopefully you'll see no more errors ).
__________________
home sweet home |
|
|
|
|
|
|
#13 | Link |
|
Registered User
Join Date: Feb 2002
Location: Italy
Posts: 876
|
I've done a quick test and ffmpeg seems to don't like audio with more than 2 channels, at least not in uncompressed pcm format (the way AviSynth output it).
Instead of demuxing, you could try to load directly the input file as "External audio", this should work. EDIT: it works, at least with avi input (going to check more audio/container combinations) EDIT2: a better solution is to play the video, open the audio filter properties, enable the ffdshow's mixer and select 2/0 - stereo output, this will work with every type of input.
__________________
home sweet home Last edited by jonny; 9th October 2005 at 11:06. |
|
|
|
|
|
#14 | Link |
|
Registered User
Join Date: Feb 2002
Location: Italy
Posts: 876
|
v1.01 is out
nothing big but better than 1.00 ![]() ------------------------- Changes: - Added "Avi open", should be more compatible with avi input (use the generic open if this fails) - "Add borders" is now the default method if the input aspect ratio is ~2.35 - FFMPEG's error logging (now you can see the exact FFMPEG's output after obtaining an "Exitcode" error) - Added volume setting - Added a check to see if AviSynth is installed - Installer, with AviSynth and ffdshow included - Maybe other things i don't remember :P
__________________
home sweet home Last edited by jonny; 10th October 2005 at 23:27. |
|
|
|
|
|
#15 | Link |
|
Registered User
Join Date: Jul 2004
Posts: 4
|
jonny,
Thanks for all the great work on pspenc so far. I have had success using the first method you suggest for multi-channel audio but in regards to the second, I haven't been able to locate the audio decoder options on ffdshow. Mine comes up with only video options. Also, I occasionally run into some audio sync issues with pspenc encoded files. It isn't happening consistently and I haven't yet been able to isolate any particular settings which cause the problem. |
|
|
|
|
|
#16 | Link |
|
Registered User
Join Date: Feb 2002
Location: Italy
Posts: 876
|
strange, two icons should be on the tray (video and audio):
http://jonny.leffe.dnsalias.com/doom9/ff/ff00.png Or, for example with Zoom Player, something like this should be possible (with a right click on video): http://jonny.leffe.dnsalias.com/doom9/ff/ff01.png (here you could see what is the audio decoder used) If another decoder is used, this could indicate something wrong with ffdshow install (have you installed something audio/video related app after ffdshow?). For the av synch probs - quite hard to get a cause, if you have some not copyrighted material and you want to send me it for testing, i'll be happy to check
__________________
home sweet home |
|
|
|
|
|
#18 | Link |
|
Registered User
Join Date: Feb 2002
Location: Italy
Posts: 876
|
use quicktime to play on pc
put the file in this way on psp to play it: \MP_ROOT\100MNV01\M4V10001.MP4
__________________
home sweet home |
|
|
|
|
|
#19 | Link |
|
Registered User
Join Date: Jun 2005
Posts: 122
|
Yep i knew about the psp folder since i've made conversions before,but quicktime being the only player that played the generated files strikes me as odd!
How come?I've made mp4 before with 3gp converter,nero recode and other soft and the play just fine in media player classic,y are these mp4 any different and play only with quicktime? |
|
|
|
|
|
#20 | Link |
|
Registered User
Join Date: Feb 2002
Location: Italy
Posts: 876
|
i've not investigated too much about this
(probably the answer is somewhere in the forum)
__________________
home sweet home |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|