View Full Version : encoding xvid mp4s for psp
retailwiz
8th March 2007, 07:41
I've been encountering some issues trying to get xvid avi's running at 25 fps to play properly on a psp when converted to mp4. The problem is most converting software tries to change the framerate to 29.97 and even if it specifies 25 fps, the audio is still out of sync. I've tried using xvid4psp & cucusoft psp movie converter and while they manage to encode an mp4 that's in sync, the files are unsupported by the psp (ver. 3.10 firmware). Any thoughts or possibly other software options to encode a proper mp4?
Thanks
ilovejedd
8th March 2007, 08:33
There are quite a lot actually... Are you trying to convert to MPEG4 SP or MPEG4 AVC?
Oh, yeah, I believe you can still play files using older specs so long as it has the correct atom and it uses the old file/folder naming system.
From my Transcoding.ini for 3GP_Converter (front-end for ffmpeg):
[Info]
Title=Model: MP4, for PSP (Mod, 2-pass)
TitleE=Model: MP4, for PSP (Mod, 2-pass)
Description=Modified MP4 for PSP, 2-pass encoding
DescriptionE=Modified MP4 for PSP, 2-pass encoding
; ------------------------------------- 320x240
[Item0]
Title=320x240/25fps/512kbps モノラル/32kbps
TitleE=320x240/25fps/512kbps Mono/32kbps
Command0=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -bitexact -vcodec xvid -s 320x240 -r 25 -b 512 -passlogfile "<%OutputFile%>" -pass 1 -acodec aac -ac 1 -ar 24000 -ab 32 -f psp "<%OutputFile%>.MP4""
Command1=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -bitexact -vcodec xvid -s 320x240 -r 25 -b 512 -passlogfile "<%OutputFile%>" -pass 2 -acodec aac -ac 1 -ar 24000 -ab 32 -f psp "<%OutputFile%>.MP4""
Command2=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -f image2 -ss 00:02:05 -vframes 1 -s 160x120 -an "<%OutputFile%>.THM""
Command3="rm "<%OutputFile%>-0.log""
[Item1]
Title=320x240/25fps/768kbps ステレオ/128kbps
TitleE=320x240/25fps/768kbps Stereo/128kbps
Command0=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -bitexact -vcodec xvid -s 320x240 -r 25 -b 768 -passlogfile "<%OutputFile%>" -pass 1 -acodec aac -ac 2 -ar 24000 -ab 64 -f psp "<%OutputFile%>.MP4""
Command1=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -bitexact -vcodec xvid -s 320x240 -r 25 -b 768 -passlogfile "<%OutputFile%>" -pass 2 -acodec aac -ac 2 -ar 24000 -ab 64 -f psp "<%OutputFile%>.MP4""
Command2=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -f image2 -ss 00:02:05 -vframes 1 -s 160x120 -an "<%OutputFile%>.THM""
Command3="rm "<%OutputFile%>-0.log""
[Item2]
Title=AVC 320x240/25fps/512kbps モノラル/32kbps
TitleE=AVC 320x240/25fps/512kbps Mono/32kbps
Command0=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -bitexact -vcodec h264 -coder 1 -vlevel 21 -bufsize 128 -g 250 -s 320x240 -r 25 -b 512 -passlogfile "<%OutputFile%>" -pass 1 -acodec aac -ac 1 -ar 48000 -ab 32 -f psp "<%OutputFile%>.MP4""
Command1=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -bitexact -vcodec h264 -coder 1 -vlevel 21 -bufsize 128 -g 250 -s 320x240 -r 25 -b 512 -passlogfile "<%OutputFile%>" -pass 2 -acodec aac -ac 1 -ar 48000 -ab 32 -f psp "<%OutputFile%>.MP4""
Command2=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -f image2 -ss 00:02:05 -vframes 1 -s 160x120 -an "<%OutputFile%>.THM""
Command3="rm "<%OutputFile%>-0.log""
[Item3]
Title=AVC 320x240/25fps/768kbps ステレオ/128kbps
TitleE=AVC 320x240/25fps/768kbps Stereo/128kbps
Command0=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -bitexact -vcodec h264 -coder 1 -vlevel 21 -bufsize 128 -g 250 -s 320x240 -r 25 -b 768 -passlogfile "<%OutputFile%>" -pass 1 -acodec aac -ac 2 -ar 48000 -ab 64 -f psp "<%OutputFile%>.MP4""
Command1=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -bitexact -vcodec h264 -coder 1 -vlevel 21 -bufsize 128 -g 250 -s 320x240 -r 25 -b 768 -passlogfile "<%OutputFile%>" -pass 2 -acodec aac -ac 2 -ar 48000 -ab 64 -f psp "<%OutputFile%>.MP4""
Command2=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -f image2 -ss 00:02:05 -vframes 1 -s 160x120 -an "<%OutputFile%>.THM""
Command3="rm "<%OutputFile%>-0.log""
; ------------------------------------- 368x208
[Item4]
Title=368x208/25fps/512kbps モノラル/32kbps
TitleE=368x208/25fps/512kbps Mono/32kbps
Command0=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -bitexact -vcodec xvid -s 368x208 -r 25 -b 512 -passlogfile "<%OutputFile%>" -pass 1 -acodec aac -ac 1 -ar 24000 -ab 32 -f psp "<%OutputFile%>.MP4""
Command1=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -bitexact -vcodec xvid -s 368x208 -r 25 -b 512 -passlogfile "<%OutputFile%>" -pass 2 -acodec aac -ac 1 -ar 24000 -ab 32 -f psp "<%OutputFile%>.MP4""
Command2=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -f image2 -ss 00:02:05 -vframes 1 -s 160x120 -an "<%OutputFile%>.THM""
Command3="rm "<%OutputFile%>-0.log""
[Item5]
Title=368x208/25fps/768kbps ステレオ/128kbps
TitleE=368x208/25fps/768kbps Stereo/128kbps
Command0=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -bitexact -vcodec xvid -s 368x208 -r 25 -b 768 -passlogfile "<%OutputFile%>" -pass 1 -acodec aac -ac 2 -ar 24000 -ab 64 -f psp "<%OutputFile%>.MP4""
Command1=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -bitexact -vcodec xvid -s 368x208 -r 25 -b 768 -passlogfile "<%OutputFile%>" -pass 2 -acodec aac -ac 2 -ar 24000 -ab 64 -f psp "<%OutputFile%>.MP4""
Command2=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -f image2 -ss 00:02:05 -vframes 1 -s 160x120 -an "<%OutputFile%>.THM""
Command3="rm "<%OutputFile%>-0.log""
[Item6]
Title=AVC 368x208/25fps/512kbps モノラル/32kbps
TitleE=AVC 368x208/25fps/512kbps Mono/32kbps
Command0=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -bitexact -vcodec h264 -coder 1 -vlevel 21 -bufsize 128 -g 250 -s 368x208 -r 25 -b 512 -passlogfile "<%OutputFile%>" -pass 1 -acodec aac -ac 1 -ar 48000 -ab 32 -f psp "<%OutputFile%>.MP4""
Command1=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -bitexact -vcodec h264 -coder 1 -vlevel 21 -bufsize 128 -g 250 -s 368x208 -r 25 -b 512 -passlogfile "<%OutputFile%>" -pass 2 -acodec aac -ac 1 -ar 48000 -ab 32 -f psp "<%OutputFile%>.MP4""
Command2=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -f image2 -ss 00:02:05 -vframes 1 -s 160x120 -an "<%OutputFile%>.THM""
Command3="rm "<%OutputFile%>-0.log""
[Item7]
Title=AVC 320x240/25fps/768kbps ステレオ/128kbps
TitleE=AVC 320x240/25fps/768kbps Stereo/128kbps
Command0=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -bitexact -vcodec h264 -coder 1 -vlevel 21 -bufsize 128 -g 250 -s 368x208 -r 25 -b 768 -passlogfile "<%OutputFile%>" -pass 1 -acodec aac -ac 2 -ar 48000 -ab 64 -f psp "<%OutputFile%>.MP4""
Command1=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -title "<%Title%>" -timestamp "<%TimeStamp%>" -bitexact -vcodec h264 -coder 1 -vlevel 21 -bufsize 128 -g 250 -s 368x208 -r 25 -b 768 -passlogfile "<%OutputFile%>" -pass 2 -acodec aac -ac 2 -ar 48000 -ab 64 -f psp "<%OutputFile%>.MP4""
Command2=""<%AppPath%>\cores\ffmpeg" -y -i "<%InputFile%>" -f image2 -ss 00:02:05 -vframes 1 -s 160x120 -an "<%OutputFile%>.THM""
Command3="rm "<%OutputFile%>-0.log""
It should work with new firmware, either in \VIDEO or \MP_ROOT\100MNV01, \MP_ROOT\100ANV01. I'm not all that sure as I have 3.10 OE-A and I don't know if it uses older libraries for video playback.
retailwiz
8th March 2007, 19:34
I've not used ffmpeg. I've started trying out 3gp converter but how do i use the .ini file concurrently with it?
~Mark
ilovejedd
8th March 2007, 20:50
Which 3GP Converter are you using? The freeware or the ImToo one? I use the freeware 3GP Converter (http://www.nurs.or.jp/~calcium/3gpp/3GP_Converter034.zip). The Transcoding.ini is located in the same directory as the 3GP Converter executable. When you first run it (in short, it doesn't find a 3GP_Converter.ini and Transcoding.ini in the executable directory), you will be asked to set it up. Default language is Japanese so that's probably the first thing you'll want to change. There are a couple of PSP profiles included but those haven't been updated since December 2005. In the meantime, choose any profile and when the Transcoding.ini is generated, replace the contents with the one below. Edit the Transcoding.ini with your favorite text editor to add/edit your preferred encoding settings. I have a post somewhere detailing variables used by 3GP Converter. Lemme try to look for it.
Found it:
http://forum.doom9.org/showthread.php?p=954457#post954457
retailwiz
11th March 2007, 04:34
Thanks for your help.
I got 3gp encoder up and running with the new transcoding script. Unfortunately, I'm still having the problem of the audio going faster the the video. Am I missing some sort of setting? When I play back the mp4 that is encoded, it says its running at 25fps but it definitely is incorrect in playback. I'm quite at a loss. The only software that makes mp4s that work are the ones that my psp can
't recognize.
ilovejedd
11th March 2007, 23:13
That's weird. I usually just convert directly from DVD (both NTSC and PAL) to PSP and I haven't experienced any sync issues, so far, with framerates of 23.976, 25 or 29.98. Converting XviD AVIs haven't posed any problems for me, either. Maybe you can run one of your problematic source AVIs via GSpot or MediaInfo and post the information here?
retailwiz
12th March 2007, 01:50
here's the info for one of the avis:
s18-01 - Half-Oval Vignette.avi
Format : AVI
Format/Info : Audio Video Interleave
Format/Family : RIFF
File size : 213 MiB
PlayTime : 27mn 51s
Bit rate : 1063 Kbps
StreamSize : 1.81 MiB
Video #0
Codec : DivX 5
Codec/Family : MPEG-4
Codec settings/Packe : Yes
Codec settings/BVOP : No
Codec settings/QPel : No
Codec settings/GMC : 2
Codec settings/Matri : Default
PlayTime : 27mn 51s
Bit rate : 1011 Kbps
Width : 528 pixels
Height : 400 pixels
Aspect ratio : 4/3
Frame rate : 25.000 fps
Resolution : 8 bits
Interlacement : Progressive
Bits/(Pixel*Frame) : 0.190
StreamSize : 201 MiB
Writing library : DivX501b484p
Audio #0
Codec : MPEG-2 Audio layer 3
Codec profile : Joint stereo
Bit rate : 48 Kbps
Bit rate mode : CBR
Channel(s) : 2 channels
Sampling rate : 24 KHz
Resolution : 16 bits
StreamSize : 9.43 MiB
Coherency/PlayTime : 2785
ilovejedd
13th March 2007, 04:16
Try unpacking bitstream using MPEG4Modifier. I believe ffmpeg doesn't play nice with packed bitstream. Also, can you show the log for 3GP_Converter for a problematic conversion? right-click >> show log window; on log window, right-click >> copy all.
BigDid
13th March 2007, 04:24
... i have used moyea video to psp converter (http://www.my-video-converter.com/video_to_psp/)free trial version, a freeware psp video manager to transfer mp4 files between psp and your computer,it is convenient
Hi,
Please do not take doom9 readers for ...what they are not.
The link provided by you offers to buy your recommended "freeware" :mad:
You may want to read or re-read rule 5: http://forum.doom9.org/forum-rules.htm
Did
Edit: another post advertising this non-freeware software: http://forum.doom9.org/showthread.php?p=969642#post969642
retailwiz
13th March 2007, 05:35
Here's the log from 3gp converter:
T>Avisynth DLL avaliable to use.
T>s18-01 - Half-Oval Vignette.avi (Model: MP4, for PSP (Mod, 2-pass)/320x240/25fps/768kbps Stereo/128kbps)
E>"G:\temp\3GP_Converter034\cores\ffmpeg" -y -i "G:\temp\s18-01 - Half-Oval Vignette.avi" -title "s18-01 - Half-Oval Vignette" -timestamp "2007-02-25 13:53:26" -bitexact -vcodec xvid -s 320x240 -r 25 -b 768 -passlogfile "G:\temp\s18-01 - Half-Oval Vignette" -pass 1 -acodec aac -ac 2 -ar 24000 -ab 64 -f psp "G:\temp\s18-01 - Half-Oval Vignette.MP4"
ffmpeg version CVS, build 4759, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-mp3lame --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --disable-ffplay --enable-small --enable-memalign-hack --enable-gpl --enable-xvid --enable-dts --enable-a52 --disable-vhook --enable-pthread --enable-x264
built on Dec 1 2005 17:25:10, gcc: 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
Input #0, avi, from 'G:\temp\s18-01 - Half-Oval Vignette.avi':
Duration: 00:27:51.6, start: 0.000000, bitrate: 1067 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 528x400, 25.00 fps
Stream #0.1: Audio: mp3, 24000 Hz, stereo, 48 kb/s
Output #0, psp, to 'G:\temp\s18-01 - Half-Oval Vignette.MP4':
Stream #0.0: Video: xvid, yuv420p, 320x240, 25.00 fps, q=2-31, pass 1, 768 kb/s
Stream #0.1: Audio: aac, 24000 Hz, stereo, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
[mpeg4 @ 0x7aee38]frame skip 8
video:158141kB audio:19496kB global headers:0kB muxing overhead 0.367795%
E>"G:\temp\3GP_Converter034\cores\ffmpeg" -y -i "G:\temp\s18-01 - Half-Oval Vignette.avi" -title "s18-01 - Half-Oval Vignette" -timestamp "2007-02-25 13:53:26" -bitexact -vcodec xvid -s 320x240 -r 25 -b 768 -passlogfile "G:\temp\s18-01 - Half-Oval Vignette" -pass 2 -acodec aac -ac 2 -ar 24000 -ab 64 -f psp "G:\temp\s18-01 - Half-Oval Vignette.MP4"
ffmpeg version CVS, build 4759, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-mp3lame --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --disable-ffplay --enable-small --enable-memalign-hack --enable-gpl --enable-xvid --enable-dts --enable-a52 --disable-vhook --enable-pthread --enable-x264
built on Dec 1 2005 17:25:10, gcc: 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
Input #0, avi, from 'G:\temp\s18-01 - Half-Oval Vignette.avi':
Duration: 00:27:51.6, start: 0.000000, bitrate: 1067 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 528x400, 25.00 fps
Stream #0.1: Audio: mp3, 24000 Hz, stereo, 48 kb/s
Output #0, psp, to 'G:\temp\s18-01 - Half-Oval Vignette.MP4':
Stream #0.0: Video: xvid, yuv420p, 320x240, 25.00 fps, q=2-31, pass 2, 768 kb/s
Stream #0.1: Audio: aac, 24000 Hz, stereo, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
[mpeg4 @ 0x7aee38]frame skip 8
video:156202kB audio:19496kB global headers:0kB muxing overhead 0.371855%
E>"G:\temp\3GP_Converter034\cores\ffmpeg" -y -i "G:\temp\s18-01 - Half-Oval Vignette.avi" -f image2 -ss 00:02:05 -vframes 1 -s 160x120 -an "G:\temp\s18-01 - Half-Oval Vignette.THM"
ffmpeg version CVS, build 4759, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-mp3lame --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --disable-ffplay --enable-small --enable-memalign-hack --enable-gpl --enable-xvid --enable-dts --enable-a52 --disable-vhook --enable-pthread --enable-x264
built on Dec 1 2005 17:25:10, gcc: 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
Input #0, avi, from 'G:\temp\s18-01 - Half-Oval Vignette.avi':
Duration: 00:27:51.6, start: 0.000000, bitrate: 1067 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 528x400, 25.00 fps
Stream #0.1: Audio: mp3, 24000 Hz, stereo, 48 kb/s
Output #0, image2, to 'G:\temp\s18-01 - Half-Oval Vignette.THM':
Stream #0.0: Video: mjpeg, yuvj420p, 160x120, 25.00 fps, q=2-31, 200 kb/s
Stream mapping:
Stream #0.0 -> #0.0
[mjpeg @ 0x7aee38]removing common factors from framerate
Press [q] to stop encoding
[mpeg4 @ 0x7aee38]frame skip 8
video:3kB audio:0kB global headers:0kB muxing overhead -100.000000%
E>rm "G:\temp\s18-01 - Half-Oval Vignette-0.log"
T>Finished.
ilovejedd
13th March 2007, 16:51
Hmm... There didn't seem to be anything weird in the logs...
Can you create a simple AviSynth script with just this line, drop it into 3GP Converter and see if it's still out of sync.
AVISource("s18-01 - Half-Oval Vignette.avi")
Haven't said anything before but this is getting ridiculous. All 15 posts of dasiy0627 so far has mentioned moyea psp video converter. I believe that's spamming already.
retailwiz
15th March 2007, 16:25
Amazing. The avs script somehow worked. Thanks again!
On a completely unrelated topic, is there any way to increase the audio volume in 3gp converter or with an avisynth script?
Thanks,
~Mark
ilovejedd
15th March 2007, 16:48
In Avisynth script:
Amplify(n) #where n is the multiplier
or
AmplifydB(n) #where n is increase in decibels
In 3GP Converter (ffmpeg):
-vol n
I'm not sure if n in ffmpeg is percent, but I think it probably is. ffmpeg's not exactly the best documented program available...
Thanks for the reminder, I was about to convert some movies to my PSP without adding Amplify() to the script. ^_^;;;
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.