iPhone/iPod Touch Profile

0 views
Skip to first unread message

Shaun

unread,
Oct 8, 2008, 4:14:19 PM10/8/08
to Panda
Anyone have any experience with mp4 encoder profiles for iPhone/iPod
touch with Panda?

Shaun

unread,
Oct 10, 2008, 9:43:43 AM10/10/08
to Panda
Nothing?

Shaun

unread,
Oct 10, 2008, 9:50:30 AM10/10/08
to Panda
Ok next question:

I found these settings work for an iPhone with ffmpeg:
ffmpeg -threads 4 -i INPUT -r 29.97 -vcodec libx264 -s 480x272 -flags
+loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 24 -bt 256k -
refs 1 -coder 0 -me umh -me_range 16 -subq 5 -partitions
+parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -
qmax 51 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -
ab 128k -ar 48000 -ac 2 OUTPUT

How do I translate that into a panda profile?

Is container that same as vcodec?

On Oct 8, 3:14 pm, Shaun <shaung...@mac.com> wrote:

Damien Tanner

unread,
Oct 10, 2008, 10:15:19 AM10/10/08
to panda...@googlegroups.com
Hi Shun,

The best way to add in this profile is to add a new method to the
app/models/video.rb class called encode_iphone or similar. Have a look
at the existing encode methods to see how you build the ffmpeg string
to have the filenames etc.. replaced.

You can then add a profile to Panda with player set to 'iphone' and
also add some logic to the encode method so it know what method to
call for iphone encodings.

This should probably be put in as part of core in the near future.

--
Kind Regards,
Damien Tanner
Co-Founder and Director, New Bamboo

Creating fresh, flexible and fast-growing web applications is our passion.

+44 (0)78 6312 7999
+44 (0)20 7099 7486
http://www.new-bamboo.co.uk

Shaun

unread,
Oct 10, 2008, 12:02:33 PM10/10/08
to Panda
Thanks for the help - one quick question though:

Anytime I try to add a profile in merb I get a "NameError:
uninitialized constant Profile"
error. This happened before I modified the video.rb model file. This
error also happened
with the default profiles on the Panda install page.

Any idea what could be happening? Do I need to restart merb?

Martyn Loughran

unread,
Oct 10, 2008, 12:20:36 PM10/10/08
to panda...@googlegroups.com
It sounds like you you're not running merb -i from correct directory
(/var/local/www/panda by default).

Shaun

unread,
Oct 10, 2008, 1:24:48 PM10/10/08
to Panda
haha whoops... that was the issue.

So... the profile I added to the video model looks like this:

def encode_iphone
Merb.logger.info "Encoding with encode_iphone"
transcoder = RVideo::Transcoder.new
recipe = "ffmpeg -y -i $input_file$ -f mp4 -s 432x320 -aspect
432:320 -acodec aac -async 4800 -dts_delta_threshold 1 -vcodec xvid -
qscale 7 $output_file$"
transcoder.execute(recipe,
self.recipe_options(self.parent_video.tmp_filepath,
temp_video_output_file))
end

didn't work... any ideas? also - can someone confirm exactly how I
should call this in merb?

Thanks for all of the help

On Oct 10, 11:20 am, "Martyn Loughran" <mar...@new-bamboo.co.uk>
wrote:
> It sounds like you you're not running merb -i from correct directory
> (/var/local/www/panda by default).
>

Damien Tanner

unread,
Dec 4, 2008, 8:30:15 AM12/4/08
to panda...@googlegroups.com
Hey Shaun,

Did you have any luck?

Kind Regards,
Damien Tanner
Co-Founder and Director, New Bamboo

Creating fresh, flexible and fast-growing web applications is our passion.

+44 (0)78 6312 7999
+44 (0)20 7099 7486
http://www.new-bamboo.co.uk


Reply all
Reply to author
Forward
0 new messages