On Tue, Mar 2, 2010 at 5:32 PM, Dan Dennedy <[email protected]> wrote: > On Tue, Mar 2, 2010 at 1:08 PM, Dan Dennedy <[email protected]> wrote: >> On Tue, Mar 2, 2010 at 10:09 AM, Carl Karsten <[email protected]> wrote: >>> I want to encode PyCon videos as mp4 so that people can use the iTunes >>> feed and watch the talks on their iPhone. Anyone know what res and >>> bitrate options I should use? here is my current line: >>> >>> melt -profile dv_ntsc foo.mlt -consumer avformat: foo.mp4 >> >> You do not want to keep all the attributes of the dv_ntsc profile. You >> want to use 432x320 for 4:3 or 480x320 for 16:9 as maximum resolution > > You might have realized that 480/320 != 16/9. I think the idea is that > iphone plays either full width (480) or full height (320); so, if you > hold either of those dimensions constant, it must scale the other to > proper display aspect ratio and then crop within output. However, it > should be noted that QuickTime Player X for OS X outputs my test clip > as 480x270 when you ask it to save it for iPhone. > >> - you can go lower, e.g. 320x240. If your XML project has stuff being >> composited, then it will be position-sensitive if not using >> percentages or changing aspect ratios. Otherwise, you can safely >> append the following consumer properties: >> s=432x320 aspe...@4/3 >> This display aspect property setting forces the sample aspect to be >> recomputed and override the profile, which is what you want. >> If you have position-sensitive stuff in your xml project, then you >> need to run it as: >> >> melt -profile something consumer:path/to/your.mlt profile=dv_ntsc >> -consumer avformat:... >> >>> acodec=libmp3lame ab=128k ar=44100 vcodec=mpeg4 minrate=0 b=900k >> >> Usually, AAC is used for audio encoding on iPod/iPhone, and H.264 for >> video encoding. >> acodec=aac vcodec=libx264 >> >>> progressive=1 deinterlace_method=onefield >> >> why onefield and not the superior yadif? remove the property to let it >> default to yadif >> >>> I don't have an iphone, so I can't really try stuff and test. >> >> You should also add the following consumer property to configure x264 >> in a manner compliant with iphone: >> vpre=/usr/share/ffmpeg/libx264-ipod640.ffpreset > > On my version of ffmpeg+libx264 this alone fails to produce video. > Instead, I found it necessary to use libx264-default.ffpreset and > append the ipod profile options. In summary, this works for me on the > iPhone: > > melt -profile dv_ntsc file0017.mov -consumer avformat:file0017.mp4 > s=480x320 aspe...@16/9 progressive=1 acodec=aac ar=44100 ab=128k > vcodec=libx264 b=700k > vpre=/usr/local/share/ffmpeg/libx264-default.ffpreset $(cat > /usr/local/share/ffmpeg/libx264-ipod640.ffpreset) > > Now, a final wrinkle is that if you want to make it progressive > download, you need to run the output through qt-faststart: > http://multimedia.cx/qt-faststart.c > > It comes with ffmpeg source. >
My iPhone guy says "It looks awesome. Plays on the iPhone, and the quality (both audio and video) is great." Thanks Dan. If anyone wants the code: "melt -progress -profile %s %s -consumer avformat:%s s=432x320 aspe...@4/3 progressive=1 acodec=libfaac ar=44100 ab=128k vcodec=libx264 b=700k vpre=/usr/share/ffmpeg/libx264-ipod640.ffpreset" % ( self.options.format.lower(), mlt_pathname, out_pathname, ) ["qt-faststart", tmp_pathname, dst_pathname] http://github.com/CarlFK/veyepar/blob/master/dj/scripts/enc.py -- Carl K ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mlt-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mlt-devel
