View Full Version : x264 settings for iPhone using crf mode
stax76
23rd September 2009, 19:54
In megui the iPhone profile uses --vbv-maxrate 10000, is it right that if the --vbv-maxrate is required depends on the image size? I mean on a small image size it's unlikely that 10000 is exceeded?
Assuming I use crf 23 and I use the native iPhone resolution 480x..., how likely is it the max working bitrate is exceeded? If it's possible how do I restrict it? I was reading --vbv-maxrate should only be used in 2pass mode so what do I use in crf mode? I guess it's --qpmin, which value could I use for a 480x... image size?
My current command line looks as follows:
x264.exe --profile main --output "<target>" "<source>"
It's minimalistic, I try to avoid pointless switches. It uses crf 23 and the image size is 480x... with PAR 1:1, as I was reading the iPhone don't support anamorphic images. What else switches should I consider to add? I don't have a I phone but would like a add a few templates for popular devices like iPhone and PS3 to StaxRip.
Dark Shikari
23rd September 2009, 19:56
I was reading --vbv-maxrate should only be used in 2pass modeYou read wrong.
stax76
23rd September 2009, 19:59
IIRC I was reading this in the megui wiki about x264.
Dark Shikari
23rd September 2009, 20:01
IIRC I was reading this in the megui wiki about x264.Then the MeGUI wiki is wrong/outdated, as that was only true before lookahead VBV.
stax76
23rd September 2009, 20:09
Thanks, I update the cmdl then to:
--profile main --preset slow --vbv-maxrate 10000
Dark Shikari
23rd September 2009, 20:12
As x264 will loudly tell you, maxrate doesn't even do anything without a bufsize.
stax76
23rd September 2009, 20:18
Update to:
--profile main --preset slow --vbv-bufsize 10000 --vbv-maxrate 10000
I'm not sure if crf 23 makes sense for the iPhone.
me7
23rd September 2009, 21:18
@Dark Shikari: small question about VBV: AFAIK VBV "hurts" quality and should only be used when needed. Does this mean that it hurts coding efficiency in general or just in the cases when the specified vbv-maxrate isn't suffiecent?
Dark Shikari
23rd September 2009, 21:21
@Dark Shikari: small question about VBV: AFAIK VBV "hurts" quality and should only be used when needed. Does this mean that it hurts coding efficiency in general or just in the cases when the specified vbv-maxrate isn't suffiecent?It can slightly hurt quality in general, but there is really only a significant effect when the maxrate is reached or nearly reached.
rack04
23rd September 2009, 22:16
iPhone video specifications lists only baseline profile.
Dark Shikari
23rd September 2009, 23:50
iPhone video specifications lists only baseline profile.What a shocker, the Apple specifications are wrong. Next thing you'll know there will be water falling out of the rainclouds.
rack04
27th September 2009, 02:34
What a shocker, the Apple specifications are wrong. Next thing you'll know there will be water falling out of the rainclouds.
Actually I just tested two encodes. Exact same settings except one main profile and the other was baseline profile. Only the baseline profile encode was accepted by iTunes.
RunningSkittle
27th September 2009, 03:55
Actually I just tested two encodes. Exact same settings except one main profile and the other was baseline profile. Only the baseline profile encode was accepted by iTunes.
iTunes, not the iPhone (which can play back more than baseline). This is why apple specs are incorrect.
Who uses itunes anyway :devil:
Chengbin
27th September 2009, 04:11
No, the iPhone can play high profile if you can bypass iTunes.
benwaggoner
27th September 2009, 18:21
It can slightly hurt quality in general, but there is really only a significant effect when the maxrate is reached or nearly reached.
...and since the bits that would have otherwise be spent get redistributed to less complex parts of the video, improvements can be seen elsewhere.
I've certainly seen cases with highly variable content where lowering a VBV from a really high ABR/PBR ratio actually improved to overall experience, because longer, simpler parts of the video were getting relatively bit starved compared to short, very complex peaks.
Kind of the flip side of the minimum bitrate often used in MPEG-2.
rack04
29th September 2009, 02:27
No, the iPhone can play high profile if you can bypass iTunes.
How do I bypass iTunes to load these videos?
RunningSkittle
29th September 2009, 03:23
How do I bypass iTunes to load these videos?
use something other than itunes...
benwaggoner
30th September 2009, 20:09
No, the iPhone can play high profile if you can bypass iTunes.
High or Main? AFAIK, the only non-Baseline iPhone/iPod device was the iPhone 3GS, and even that was Main only.
Some Apple devices do support Baseline+B, like AppleTV.
Dark Shikari
30th September 2009, 20:20
iPhone 3GS, and even that was Main only.3GS supports high.
benwaggoner
30th September 2009, 20:49
3GS supports high.
Well, that's an excellent thing to find out on the last day I can edit the proofs for my book! Thanks. Are there any more details specs for what it supports anywhere?
And I'm also pleased to see another device skipping Main for High. Since Main doesn't have any decode complexity advantage over High, I hope we can see Main fade out as a delivery target over the next few years.
Dark Shikari
30th September 2009, 21:02
Well, that's an excellent thing to find out on the last day I can edit the proofs for my book! Thanks. Are there any more details specs for what it supports anywhere?Well, it's in Chinese... (http://bbs.weiphone.com/read.php?tid=469047&fpage=2)
kemuri-_9
1st October 2009, 00:18
Well, it's in Chinese... (http://bbs.weiphone.com/read.php?tid=469047&fpage=2)
google power? (http://translate.google.com/translate?hl=en&sl=zh-CN&u=http://bbs.weiphone.com/read.php%3Ftid%3D469047&ei=OtjDSr7DLoeN8AbGk_jfCQ&sa=X&oi=translate&resnum=1&ct=result&prev=/search%3Fq%3Dhttp://bbs.weiphone.com/read.php%253Ftid%253D469047%2526fpage%253D2%26hl%3Den)
Chengbin
1st October 2009, 02:15
Who has an iPhone 3GS?
I honestly don't believe it can play 1080p high profile. The author claimed 35Mbps 1080p high profile was playable on the iPhone. I REALLY don't believe that.
nurbs
1st October 2009, 07:39
He said that it stutters with high bitrates. Here's a video of the iphone playing a 1080p trailer (probably main profile). http://www.youtube.com/watch?v=jASj5NlPJBA
Blue_MiSfit
3rd October 2009, 03:21
I honestly don't believe it can play 1080p high profile
Why not? It's definitely a lot more demanding than baseline 480p, but there are plenty of hardware decoders out there that can do this easily.
~MiSfit
benwaggoner
3rd October 2009, 03:57
Why not? It's definitely a lot more demanding than baseline 480p, but there are plenty of hardware decoders out there that can do this easily.
And from this:
http://www.rapidrepair.com/guides/iphone-3g-s-repair/iphone-3g-s-dissasembly-repair-guide.html
it uses a Samsung S5PC100, which in fact supports H.264 High Profile up to 720p30. VC-1 AP and MPEG-4 ASP as well.
That'd run Silverlight like a champ :).
Blue_MiSfit
3rd October 2009, 04:29
oooo! Cool :)
Given that, surprising it can handle 1080p - at least in some form.
~MiSfit
0028606
5th October 2009, 15:27
For anyone that use iTunes for there media and wants to sync out of spec video files to the iPhone/iPod,
Here is a little trick to get iTunes to do it.
All you need to do is combine a blank movie (of about a seconds duration), that is within itunes specs to the out of spec movie you want to sync.
Here is one to Download -
http://rapidshare.com/files/288967531/nothing.mov
You will then Use the blank movie to create syncable files
I use Quicktime Pro to do this, but you can use any muxing tool (but has to be muxed into a supported container, .mp4, .mov, .m4v)
1. Open the blank movie.
2. Open the Video file
3. Select all and copy
4. Switch to the blank movie
5. Select 'Add to Movie' from the edit menu
6. Save a copy of this movie, self contained, to your hard drive
7. Import the movie into iTunes
8. Change the title or other tags as appropriate
9. Sync with your iPhone/iPod.
LooperSDF
6th November 2009, 02:31
Hi - does anyone have any tips for reducing iPhone streaming start up time?
Chengbin
6th November 2009, 04:43
Hi - does anyone have any tips for reducing iPhone streaming start up time?
Please read the rules, no double posting.
lexor
6th November 2009, 15:04
Does the high profile support extend to iTouch as well? I mean >8gb versions. I would assume they share the hardware with the 3GS, since they are significantly more powerful than the 8gb version (getting almost 3x fps in some games, based on some reviews I've seen). But I'd like a confirmation, if someone is able to provide it.
Thank you.
rack04
22nd March 2010, 15:51
So can anyone confirm that an Apple iPhone 3GS can play 24000/1001p 1280x720 video files using the following x264 settings if I bypass iTunes?
Echo.
Echo.
Echo.Encoding Pass 1 ...
Echo.
@Echo on
"C:\Program Files\x264\x264.exe" --preset slower --tune film --level 4.1 --pass 1 --bitrate 2500 --stats "C:\Personal\Videos\kickass-tlr4_h720p.stats" --output NUL "C:\Personal\Videos\kickass-tlr4_h720p.avs"
@Echo off
Echo.
Echo.
Echo.Encoding Pass 2 ...
Echo.
@Echo on
"C:\Program Files\x264\x264.exe" --preset slower --tune film --level 4.1 --pass 2 --bitrate 2500 --stats "C:\Personal\Videos\kickass-tlr4_h720p.stats" --output "C:\Personal\Videos\kickass-tlr4_h720p-output.264" "C:\Personal\Videos\kickass-tlr4_h720p.avs"
@Echo off
moviefan
22nd March 2010, 20:40
You should probably give the values of the variables that you use for encoding with your script (%PRESET% and %VIDBITRATE% should be the important ones).
rack04
22nd March 2010, 21:15
You should probably give the values of the variables that you use for encoding with your script (%PRESET% and %VIDBITRATE% should be the important ones).
Agreed. I updated my post above. Thanks.
The Scientist
22nd March 2010, 23:58
So can anyone confirm that an Apple iPhone 3GS can play 24000/1001p 1280x720 video files using the following x264 settings if I bypass iTunes?
Yes it can, just tried it on a 2 minute clip I have. I resized a 1080p to 720p via script to test, then quickly mp4boxed the '.264' file so I had an '.mp4' and used 'Air Files' to transfer it to the 3GS, worked a treat, looked lovely too.
rack04
23rd March 2010, 17:12
Yes it can, just tried it on a 2 minute clip I have. I resized a 1080p to 720p via script to test, then quickly mp4boxed the '.264' file so I had an '.mp4' and used 'Air Files' to transfer it to the 3GS, worked a treat, looked lovely too.
What were the x264 encode settings of the clip you used?
The Scientist
23rd March 2010, 17:42
What were the x264 encode settings of the clip you used?
Exactly as you previously typed above... the :
--preset slower --tune film --level 4.1 --pass 1 --bitrate 2500
I just cut/pasted into a bat file (and only changed the file paths).
The source was 1080p 24000/1001p and I had a simple resize script to 1280x720.
rack04
23rd March 2010, 18:09
Exactly as you previously typed above... the :
--preset slower --tune film --level 4.1 --pass 1 --bitrate 2500
I just cut/pasted into a bat file (and only changed the file paths).
The source was 1080p 24000/1001p and I had a simple resize script to 1280x720.
Weird! I can't even get this (http://www.multiupload.com/PF2C6A9HG2) file to play on my iPhone 3GS. :confused:
The Scientist
23rd March 2010, 21:02
Weird! I can't even get this (http://www.multiupload.com/PF2C6A9HG2) file to play on my iPhone 3GS. :confused:
Neither can I.... the problem is your audio.
If I take your file, no variation of re-encoding the video allows me to play it, as soon as I change the audio to 2 channel, it works. I converted your file to 720p and 1080p, both worked.
rack04
23rd March 2010, 21:08
Neither can I.... the problem is your audio.
If I take your file, no variation of re-encoding the video allows me to play it, as soon as I change the audio to 2 channel, it works. I converted your file to 720p and 1080p, both worked.
I never thought to check that. Thanks for the tip.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.