Which Weekend?! (new app)

For anyone who’s been following my extremely sparse postings - here’s something exciting to look at - http://whichweekend.com - small simple useful. A week’s work (in the evenings) and it was super fun. Like they say - build something you want to use! I’ll be rolling out new features this coming week or two, then back to polishing off courseway (which I admit has been on hold for a while).

Hidden counter in partial collections

A quick tech post to share knowledge:

If you need a counter, iterator, index, loop variable number type thing inside a partial rendering a collection then you can simply use an undocumented counter called [partialname]_counter.

render :partial => 'parrot', :collection => @parrots

Then in _parrot.rhtml (or rails 2 style _parrot.html.erb) you can use:

parrot_counter

I like this like I like each_with_index. :)

Rails2 foot note: I think the :collection option can be dropped in my example with the names I’ve used here but I’ve left it in for clarity.

Mpeg1 muxed hell

How to convert muxed mpeg1 videos to something/anything(!) better… the demuxxing is the key step. I had to find this out for a site I made - laurechan.com

This is simply a cut and paste from my own notes. Hope it can help someone:

  • Start with the .mpg (mpeg1 muxed - audio and video combined)
  • Make MP2 - Use the free program ffmpegX (for the Mac) to demux into .m1v (video) and .mp2 (audio). Simply click the ‘demux’ button. the plugins aren’t required. You don’t need m1v so bin it. If anyone knows of a Windows equivalent then feel free to post a comment.
  • Make MP4 - Export the original .mpg as mpeg-4 (includes video only) using Quicktime Pro - my settings were: MP4, H. 264, 256kbits/s, 400×300 preserve letterbox, frame current, key auto.
  • Make M4A - Open the mp2 in iTunes and convert to AAC (right click). Find file and copy.
  • Make MOV - Open .mp4 in Quicktime Pro. Select all. Open .m4a in Quicktime, select and copy all. ‘Add to Selection & Scale’ into .mp4 . Save mp4 to make the .mov
  • Make FLV - Export .mov to .flv changing max video rate to 256kbit/s

Note: This uses Quicktime Pro which is not free. (Although I think it should be!)