iPhone 4

Discuss encoding for devices and presets.
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Durendal
Posts: 31
Joined: Mon Feb 12, 2007 5:41 pm

iPhone 4

Post by Durendal »

I found this rooting through Apple's site on the new iPhone 4:

Video formats supported: H.264 video up to 720p, 30 frames per second, Main Profile level 3.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format

Heck yeah main profile! Finally, official support, and at 720p no less! That being said, the level is limited to 3.1 and it's unknown what additional features/limitations it may have. I suppose that could be found by trial and error, but I'm still stoked. I've been stuck with my 8GB iPhone (didn't bother encoding video specifically for it) and my 5G iPod, which was hardlocked at 640 width for H.264. Now I can finally get some high quality video! Oh, and screw Apple for no HDMI and no 720p over component or VGA. They need a [Censored]' firmware update to allow 720p through both.

I noticed that it also supports M-JPEG, so I think it's pretty safe to say that the video camera records into that codec and not H.264. There wouldn't be any other reason to use it.
Deleted User 11865

Re: iPhone 4

Post by Deleted User 11865 »

Durendal wrote:I found this rooting through Apple's site on the new iPhone 4:
I think anyone that cares a bit did have a look at those specs ;-)

Video formats supported: H.264 video up to 720p, 30 frames per second, Main Profile level 3.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format
Durendal wrote:Heck yeah main profile! Finally, official support, and at 720p no less! That being said, the level is limited to 3.1 and it's unknown what additional features/limitations it may have. I suppose that could be found by trial and error, but I'm still stoked. I've been stuck with my 8GB iPhone (didn't bother encoding video specifically for it) and my 5G iPod, which was hardlocked at 640 width for H.264. Now I can finally get some high quality video! Oh, and [Censored] Apple for no HDMI and no 720p over component or VGA. They need a [Censored]' firmware update to allow 720p through both.
Since the hardware is very related to that of the iPad, it will likely have the exact same limitations as the iPad (which supports High Profile despite the official specs). Plenty of threads to give you an idea.
Durendal wrote:I noticed that it also supports M-JPEG, so I think it's pretty safe to say that the video camera records into that codec and not H.264. There wouldn't be any other reason to use it.
Not necessarily. The iPad does M-JPEG too, and does not record anything; also, the iPhone 3GS records in H.264.

However, it is an interesting possibility, considering iMovie for iOS - editing M-JPEG probably requires a lot less processing power than editing H.264 (in which case the iPad's M-JPEG capability could be related, too)…
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: iPhone 4

Post by jbrjake »

The MJPEG is just there for playing back slideshows, and is related to the iPad's USB camera card reader.

The iPhone 4G records 720p on a max of 32 gigs of storage which also has to hold iOS, apps, iTunes-synced content, and, let us recall, with iMovie, video sample libraries and edited together rough cuts. They are not encoding to literally the least efficient compressed form available to them.
Deleted User 11865

Re: iPhone 4

Post by Deleted User 11865 »

jbrjake wrote:The MJPEG is just there for playing back slideshows, and is related to the iPad's USB camera card reader.

The iPhone 4G records 720p on a max of 32 gigs of storage which also has to hold iOS, apps, iTunes-synced content, and, let us recall, with iMovie, video sample libraries and edited together rough cuts. They are not encoding to literally the least efficient compressed form available to them.
A more logical explanation! :-)
Deleted User 11865

Re: iPhone 4

Post by Deleted User 11865 »

iPhone 4 apparently does record in H.264 (not that it's a big surprise): http://www.macrumors.com/2010/06/18/iph ... o-samples/
kalahari
Posts: 10
Joined: Sat Jun 19, 2010 9:35 am

Re: iPhone 4

Post by kalahari »

jbrjake,

Can you suggest encoding parameters for iPhone 4? I obviously don't have my iPhone 4 yet but will next week and wanted to convert some AVI files in preparation.

I know the resolution is 960 x 640 and the first post in this thread had info on H.264, frames per second, etc.

Thanks
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: iPhone 4

Post by TedJ »

I'm sure that jbrjake doesn't have his iPhone 4 yet either.
kalahari
Posts: 10
Joined: Sat Jun 19, 2010 9:35 am

Re: iPhone 4

Post by kalahari »

TedJ wrote:I'm sure that jbrjake doesn't have his iPhone 4 yet either.
Huh? That was helpful.

I was looking for recommended settings based on the iPhone 4 specs. I thought someone, more knowledgeable than me on settings, could suggest optimal settings.
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: iPhone 4

Post by TedJ »

A quick search would indicate how useless Apple's published specifications are. Invariably, the published specs are very conservative compared to what the hardware is actually capable of. As such, any recommendations would be little more than an educated guess.
kalahari
Posts: 10
Joined: Sat Jun 19, 2010 9:35 am

Re: iPhone 4

Post by kalahari »

TedJ wrote:A quick search would indicate how useless Apple's published specifications are. Invariably, the published specs are very conservative compared to what the hardware is actually capable of. As such, any recommendations would be little more than an educated guess.
OK, well, that was a little more helpful but I kinda get the feel that you're trying to tell me to get lost...

That's all I was asking for -- a recommendation or an educated guess. I don't care if it's not perfect. I don't care if Apple's published specs are conservative. Maybe someone else will make some parameter suggestions.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: iPhone 4

Post by jbrjake »

?...it's got the same capabilities as an iPad.

Just use high profile h.264 with a max width of 960 for on-screen playback or 1280 if you plan on using it on a computer too.
kalahari
Posts: 10
Joined: Sat Jun 19, 2010 9:35 am

Re: iPhone 4

Post by kalahari »

jbrjake wrote:?...it's got the same capabilities as an iPad.

Just use high profile h.264 with a max width of 960 for on-screen playback or 1280 if you plan on using it on a computer too.
Thanks. I'll use those basic settings and see how it works out.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: iPhone 4

Post by mduell »

And limit the framerate to 29.97fps.
Leo
Bright Spark User
Posts: 174
Joined: Thu Feb 22, 2007 4:39 pm

Re: iPhone 4

Post by Leo »

As regards audio, for compatibility with iPhone 3GS and AppleTV I have been ensuring that the first track is 160 kbps AAC. Is this actually a hard limit - ie would a video with 192 kbps audio play fine on both? Or either? (I don't have an AppleTV (yet) but would like my files to remain compatible for future.)

Slightly out of place under this "iPhone 4" thread, but has someone come up with settings for iPhone 3GS that maxes out its capabilities at 720x576 and/or 960x544 and/or 1280x720 and/or 480x272?

Ta.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: iPhone 4

Post by dynaflash »

AppleTV can handle aac up to at least 320 kbps bitrate. Have not tried anything higher as its as high as the macgui's core audio encoder will go.
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: iPhone 4

Post by Ritsuka »

I played 7.1 aac at 768kbit/s on my AppleTV. I think the audio limit is even less believable then the video one.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: iPhone 4

Post by dynaflash »

Ritsuka wrote:I played 7.1 aac at 768kbit/s on my AppleTV. I think the audio limit is even less believable then the video one.
LOL. nice! kinda weird in a way how for once a company actually understates its product specs. though in this case to a ridiculous degree imo.
Deleted User 11865

Re: iPhone 4

Post by Deleted User 11865 »

Well, I got one. The SFR store I went to had 8 iPhones (six 16 GB and two 32 GB). I managed to get the last 32 GB model and was one of the lucky 3 to actually get a Micro SIM card.

What's ironic is that the 5 other people obviously knew the salesmen (who, apparently, had no idea the iPhone 4 required a new SIM card) and had pre-reserved their phone, so they didn't arrive at 9h30. By the time they got there, the 3 of us who actually showed up before the opening had our iPhones and SIM cards secured :D

I haven't tested its video capabilities yet (though all the videos that played on my 3GS play fine on this one, unsurprisingly), but I'll definitely test it soon.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: iPhone 4

Post by jbrjake »

Can you reproduce the dropped signal issue the Macrumors crowd discovered? Just curious, before I go pick up mine ;-)
Deleted User 11865

Re: iPhone 4

Post by Deleted User 11865 »

jbrjake wrote:Can you reproduce the dropped signal issue the Macrumors crowd discovered? Just curious, before I go pick up mine ;-)
No. I was able to maintain a call between my iPhone and my fixed-line phone for a good 4 minutes, holding the bottom-left corner any possible way (and also tried every other corner).

Of course I was unable to try two cell phones next to each other as SFR actually "recycled" my 3GS for a fairly decent €280 (I guess that might impact the results). I didn't try calling from a crowded area either.

Another note: despite the black bumper shipping "within 5-7 days" on the online store, the Apple Store in Montpellier still had some in stock. It's actually quite nice once you fit it on the phone properly. The store employee was reluctant to let me open one to try it on the phone (last time I bought a case in the same store, they let me try 7 non-Apple cases), but it turns out they had a demo unit.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: iPhone 4

Post by nightstrm »

jbrjake wrote:Can you reproduce the dropped signal issue the Macrumors crowd discovered? Just curious, before I go pick up mine ;-)
I haven't been able to reproduce it either... I've actually seen the signal indicator go up when I touch the left side. Maybe the pomade in my hair makes me a better antenna. :D

As far as video, I noticed a new option on the sync screen to "prefer standard definition videos" so I assume all of my AppleTV HD encodes should sync over, but I haven't had a chance to try it out yet.
Deleted User 11865

Re: iPhone 4

Post by Deleted User 11865 »

I'm pretty sure anything that plays on an AppleTV will play on an iPhone 4 (like on an iPad) - even my 3GS played files at rates which would most likely make the AppleTV stutter (tried the birds clip at 720x576 and a very low RF: ~18 Mbps average IIRC).

I'm encoding high-bitrate, placebo-like 720p versions of the birds clip to try on my iPhone 4. Once they complete (probably in a hours or so) I'll test them.
Deleted User 11865

Re: iPhone 4

Post by Deleted User 11865 »

OK. The following encodes of the birds clip sync and play stutter-free (as far as I can see) on my iPhone 4:

http://handbrake.fr/pastebin/pastebin.php?show=1511

Code: Select all

[16:04:53] job configuration:
[16:04:53]  * source
[16:04:53]    + /Volumes/LaCieDisk/excluded/TestClips/x264clips/Other/PlanetEarthBirds.mkv
[16:04:53]    + title 1, chapter(s) 1 to 1
[16:04:53]    + container: matroska
[16:04:53]    + data rate: 448 kbps
[16:04:53]  * destination
[16:04:53]    + /Users/tim/EyeTV Output/PlanetEarthBirds RF18 b-adapt optimal.mp4
[16:04:53]    + container: MPEG-4 (.mp4 and .m4v)
[16:04:53]  * video track
[16:04:53]    + decoder: h264
[16:04:53]    + frame rate: same as source (around 23.976 fps)
[16:04:53]    + dimensions: 1920 * 1080 -> 1280 * 720, crop 0/0/0/0
[16:04:53]    + encoder: x264
[16:04:53]      + options: ref=5:bframes=16:b-adapt=2:direct=auto:b-pyramid=normal:trellis=2
[16:04:53]      + quality: 18.00 (RF)
[16:04:53]  * subtitle track 0, English (id 2) Text [UTF-8] -> Pass-Through, Default
[16:04:53]  * subtitle track 0, French (id 3) Text [UTF-8] -> Pass-Through
[16:04:53]  * subtitle track 0, Spanish (id 4) Text [UTF-8] -> Pass-Through
[16:04:53]  * audio track 0
[16:04:53]    + decoder: English (AC3) (5.1 ch) (track 1, id 1)
[16:04:53]      + bitrate: 448 kbps, samplerate: 48000 Hz
[16:04:53]    + mixdown: Dolby Pro Logic II
[16:04:53]    + dynamic range compression: 1.000000
[16:04:53]    + encoder: ca_aac
[16:04:53]      + bitrate: 320 kbps, samplerate: 48000 Hz
[16:04:53]  * audio track 1
[16:04:53]    + decoder: English (AC3) (5.1 ch) (track 1, id 1)
[16:04:53]      + bitrate: 448 kbps, samplerate: 48000 Hz
[16:04:53]    + mixdown: 6-channel discrete
[16:04:53]    + dynamic range compression: 1.000000
[16:04:53]    + encoder: ca_aac
[16:04:53]      + bitrate: 768 kbps, samplerate: 48000 Hz
[16:04:53] encx264: min-keyint: 24, keyint: 240
[16:04:53] encx264: Encoding at constant RF 18.000000
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
x264 [info]: profile High, level 3.1

Code: Select all

[16:22:54] mux: track 0, 2698 frames, 172991104 bytes, 12284.75 kbps, fifo 64
http://handbrake.fr/pastebin/pastebin.php?show=1510

Code: Select all

[15:44:34] job configuration:
[15:44:34]  * source
[15:44:34]    + /Volumes/LaCieDisk/excluded/TestClips/x264clips/Other/PlanetEarthBirds.mkv
[15:44:34]    + title 1, chapter(s) 1 to 1
[15:44:34]    + container: matroska
[15:44:34]    + data rate: 448 kbps
[15:44:34]  * destination
[15:44:34]    + /Users/tim/EyeTV Output/PlanetEarthBirds RF16 b-adapt off.mp4
[15:44:34]    + container: MPEG-4 (.mp4 and .m4v)
[15:44:34]  * video track
[15:44:34]    + decoder: h264
[15:44:34]    + frame rate: same as source (around 23.976 fps)
[15:44:34]    + dimensions: 1920 * 1080 -> 1280 * 720, crop 0/0/0/0
[15:44:34]    + encoder: x264
[15:44:34]      + options: ref=5:bframes=16:b-adapt=0:direct=auto:b-pyramid=normal:trellis=2:psy-rd=1.0,0.25
[15:44:34]      + quality: 16.00 (RF)
[15:44:34]  * subtitle track 0, English (id 2) Text [UTF-8] -> Pass-Through, Default
[15:44:34]  * subtitle track 0, French (id 3) Text [UTF-8] -> Pass-Through
[15:44:34]  * subtitle track 0, Spanish (id 4) Text [UTF-8] -> Pass-Through
[15:44:34]  * audio track 0
[15:44:34]    + decoder: English (AC3) (5.1 ch) (track 1, id 1)
[15:44:34]      + bitrate: 448 kbps, samplerate: 48000 Hz
[15:44:34]    + mixdown: Dolby Pro Logic II
[15:44:34]    + dynamic range compression: 1.000000
[15:44:34]    + encoder: ca_aac
[15:44:34]      + bitrate: 320 kbps, samplerate: 48000 Hz
[15:44:34]  * audio track 1
[15:44:34]    + decoder: English (AC3) (5.1 ch) (track 1, id 1)
[15:44:34]      + bitrate: 448 kbps, samplerate: 48000 Hz
[15:44:34]    + mixdown: 6-channel discrete
[15:44:34]    + dynamic range compression: 1.000000
[15:44:34]    + encoder: ca_aac
[15:44:34]      + bitrate: 768 kbps, samplerate: 48000 Hz
[15:44:34] encx264: min-keyint: 24, keyint: 240
[15:44:34] encx264: Encoding at constant RF 16.000000
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
[15:44:34] reader: first SCR 0 id 0 DTS 0
x264 [info]: profile High, level 3.1

Code: Select all

[16:04:47] mux: track 0, 2698 frames, 283330263 bytes, 20120.35 kbps, fifo 32
Note that even the 787 Kbps 6-channel AAC track is selectable and plays (after changing the language to French in Subler). It's reported as stereo but then even Subler seems to think it's stereo (but MediaInfo Mac indicates it's 5.1).

The subtitle tracks seem to play fine too.
Last edited by Deleted User 11865 on Thu Jun 24, 2010 4:14 pm, edited 1 time in total.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: iPhone 4

Post by nightstrm »

Very nice... although its sad to see the AppleTV go from being the most powerful "modern" iPod-like device to the bottom of the barrel, but I guess that's what happens when you don't get a hardware refresh after three years.
Da Man
Bright Spark User
Posts: 181
Joined: Sat Mar 08, 2008 5:47 pm

Re: iPhone 4

Post by Da Man »

Has it really only been 3 years? Playing with my ipad makes the AppleTV feel like some 8 year old windows box... No offense to the Windows folks out there.
Post Reply