Development

Encode PSP video with ffmpeg from command line

For various reasons, incompetence being high on the list, I cannot get fffmpegX to encode a decent video for PSP. It always comes out with a poor aspect ratio or the sound is out of sync or it doesn’t play on the PSP. I must have tried to use ffmpegx at least a dozen times without any decent results.

So, I figured the next best way is to encode PSP video using ffmpeg from the command line on my mac. I was getting a lot of error messages like Unknown codec 'libxvid' and Unknown codec 'libaac' and just about any other video codec I tried. If the codecs are unknown that means they may not be enabled in your install of ffmpeg. To add codecs to your ffmpeg, I suggest you re-install ffmpeg using port install.

Ports is the easiest way to manage ffmpeg on Mac OS X. A great explanation to install ffmpeg using ports can be found in this article — HOWTO install and use FFmpeg on Mac OS X Leopard » Hay Kranen

Taking his commands, I added +faac and +faad to my ffmpeg installation.

port install ffmpeg +gpl +lame +x264 +xvid +faac +faad

Originally I had installed ffmpeg without any extra codecs (port install ffmpeg). That is the wrong way to do it. To have a fully usable ffmpeg you need to add various codecs like libaac, libxvid, and libx264 as listed above.

Second, you encode the video. The only command that I found to work for me was at Robert Swain’s PSP video guide.

ffmpeg -i INPUT -acodec libfaac -ab 128k -ar 48000 \
-s WIDTHxHEIGHT -r FRAME_RATE -vcodec libx264 -b BIT_RATE \
-flags +loop -cmp +chroma \
-partitions +parti4×4+partp8×8+partb8×8 \
-me_method umh -subq 6 -trellis 1 \
-refs 2 -bf 1 -coder 1 -me_range 16 -g 300 -keyint_min 25 \
-sc_threshold 40 -i_qfactor 0.71 -bt BIT_RATE -maxrate 4M \
-bufsize 4M -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 21 \
-threads 0 OUTPUT.mp4

I don’t know what half of this stuff is but I do know you replace the ALLCAPS stuff with your own settings. I had success with these parameters for a 16:9 source video:

 -s WIDTHxHEIGHT = 368×208
 -r FRAME_RATE = 29.97
 -b BIT_RATE = 500kb (or 500000)
 -bt BIT_RATE = (I deleted this piece)

iPhone app development: cannot compile with CGRectZero

While trying to teach myself iPhone development I refer to the reference help material a lot. They always want you to use a thing CGRrectZero but you will get this error.

"_CGRectZero", referenced from:
_CGRectZero$non_lazy_ptr in CouponController.o
ld: symbol(s) not found

To fix the error you must add “CoreGraphics” to your frameworks in XCode. To do that right click your “Frameworks” folder, add “Existing Framework”, then find CoreGraphics.framework.

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/System/Library/Frameworks/CoreGraphics.framework

http://discussions.apple.com/thread.jspa?messageID=7331891

How to show the SMF Ad Management Mod configurations menus

Did you install the Ad management mod for SMF but cannot see options in the admin? You are not alone. It is not your fault.

To show the configuration menu for the ad management module you need to set the main forum language to English not utf8-english. If you use the typical install scripts (i.e. Fantastico) utf8-english is the default option. I doubt any normal person would recognize on his own. If this does not fix your problem refer to this post on the smf ad management module forum

Instructions

  • login as administrator
  • Go to *Configuration —> Server Settings”
  • look for the Default forum language
  • make sure it is English and NOT utf8-english

For my latest time-wasting project I decided to get away from Drupal for a while in favor of a traditional-looking bulletin board forum. My web host only offers 2 options: phpBB and SMF. Although I know phpBB is the most popular it has many security vulnerabilities that I don’t want to deal with.

Syndicate content