{"id":181,"date":"2015-10-12T10:12:41","date_gmt":"2015-10-12T10:12:41","guid":{"rendered":"http:\/\/toolbox.pingvinfeszek.hu\/?p=181"},"modified":"2016-02-15T20:44:55","modified_gmt":"2016-02-15T19:44:55","slug":"convert-videos-to-ipod-ipad-iphone-with-ffmpeg-under-ubuntu-or-mac-os-x","status":"publish","type":"post","link":"https:\/\/wp.gaborhargitai.hu\/convert-videos-to-ipod-ipad-iphone-with-ffmpeg-under-ubuntu-or-mac-os-x\/","title":{"rendered":"Convert Videos to iPod \/ iPad \/ iPhone with FFmpeg under Ubuntu or Mac OS X"},"content":{"rendered":"

We’ll pretend you have ffmpeg<\/b> up and running, with the necessary build options – for more info on that, refer to the FFmpeg Compilation Guide<\/a>.<\/p>\n

To convert to an iPod nano with a max screen size of 320×180, issue the following, replacing INPUT.AVI<\/b> and OUTPUT.MP4<\/b> to your desired filename (but be sure to keep the output extension as .mp4<\/b>!):<\/p>\n

 <\/p>\n

ffmpeg -i \"INPUT.AVI\" -c:a aac -cutoff 15000 -ab 128k -ar 44100 -ac 1 -strict -2 -async 1 -c:v libx264 -b:v 1024k -maxrate 2048k -bufsize 2048k -r 23.81 -s 320x180 -aspect 16:9 -pix_fmt yuv420p -movflags faststart -profile:v baseline -level 13 -partitions partb8x8+partp4x4+partp8x8+parti8x8 -b-pyramid 1 -weightb 0 -8x8dct 0 -fast-pskip 1 -trellis 1 -me_method hex -flags +loop -sws_flags fast_bilinear -direct-pred 1 -sc_threshold 40 -qmin 3 -qmax 51 -threads 4 -sn -y \"OUTPUT.mp4\"<\/code><\/p>\n

 <\/p>\n

If you’d rather not touch the size of the video, then issue the following (ideal for playing back on an iPad<\/strong>):<\/p>\n

 <\/p>\n

ffmpeg -i \"INPUT.AVI\" -c:a aac -cutoff 15000 -ab 128k -ar 44100 -ac 1 -strict -2 -async 1 -c:v libx264 -b:v 1024k -maxrate 2048k -bufsize 2048k -r 23.81 -pix_fmt yuv420p -movflags faststart -profile:v baseline -level 13 -partitions partb8x8+partp4x4+partp8x8+parti8x8 -b-pyramid 1 -weightb 0 -8x8dct 0 -fast-pskip 1 -trellis 1 -me_method hex -flags +loop -sws_flags fast_bilinear -direct-pred 1 -sc_threshold 40 -qmin 3 -qmax 51 -threads 4 -sn -y \"OUTPUT.mp4\"<\/code><\/p>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

We’ll pretend you have ffmpeg up and running, with the necessary build options – for more info on that, refer to the FFmpeg Compilation Guide. To convert to an iPod nano with a max screen size of 320×180, issue the following, replacing INPUT.AVI and OUTPUT.MP4 to your desired filename (but be sure to keep the […]<\/p>\n","protected":false},"author":1,"featured_media":210,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[8,17,7],"tags":[],"_links":{"self":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/181"}],"collection":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/comments?post=181"}],"version-history":[{"count":4,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/181\/revisions"}],"predecessor-version":[{"id":200,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/181\/revisions\/200"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/media\/210"}],"wp:attachment":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/media?parent=181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/categories?post=181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/tags?post=181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}