{"id":1219,"date":"2012-03-21T22:38:44","date_gmt":"2012-03-21T18:38:44","guid":{"rendered":"http:\/\/sandalov.org\/blog\/?p=1219"},"modified":"2012-04-12T12:57:41","modified_gmt":"2012-04-12T08:57:41","slug":"bulk-ffmpeg-encoding","status":"publish","type":"post","link":"https:\/\/sandalov.org\/blog\/1219\/","title":{"rendered":"Bulk ffmpeg encoding"},"content":{"rendered":"<div class=\"2d836d85a73757df15d0de19d7bef594\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-2287684400845931\";\r\n\/* valerymorozov *\/\r\ngoogle_ad_slot = \"5606708872\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>Code:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n find . -name '*.AVI' -exec ffmpeg -i {} -b 1600k {}.mpeg \\;\r\n<\/pre>\n<p>Using ffmpeg to encode video for my Android phone:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nfind . -iname &quot;*&quot; -exec ffmpeg -i {} -s 480x320 -vcodec mpeg4 \\\r\n  -acodec aac -ac 1 -ar 16000 -r 13 -ab 32000 -aspect 3:2 \\\r\n  -strict experimental {}.mp4 \\;\r\n<\/pre>\n<p>Explanation:<\/p>\n<p>find command searches for all files with AVI extention and for each of them executes command after \u2014exec switch (which is ffmpeg -i input file -b bit rate). Curly brackets stand for currently found file. <\/p>\n<div class=\"2d836d85a73757df15d0de19d7bef594\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-2287684400845931\";\r\n\/* valerymorozov *\/\r\ngoogle_ad_slot = \"5606708872\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Code: find . -name &#8216;*.AVI&#8217; -exec ffmpeg -i {} -b 1600k {}.mpeg \\; Using ffmpeg to encode video for my Android phone: find . -iname &quot;*&quot; -exec ffmpeg -i {} -s 480&#215;320 -vcodec mpeg4 \\ -acodec aac -ac 1 -ar 16000 -r 13 -ab 32000 -aspect 3:2 \\ -strict experimental &hellip; <a class=\"continue-reading-link\" href=\"https:\/\/sandalov.org\/blog\/1219\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1219","post","type-post","status-publish","format-standard","hentry","category-unsorted"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/1219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/comments?post=1219"}],"version-history":[{"count":9,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/1219\/revisions"}],"predecessor-version":[{"id":1257,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/1219\/revisions\/1257"}],"wp:attachment":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/media?parent=1219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/categories?post=1219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/tags?post=1219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}