{"id":913,"date":"2016-01-02T15:12:28","date_gmt":"2016-01-02T15:12:28","guid":{"rendered":"http:\/\/malemuk.com\/olofee\/?p=913"},"modified":"2016-01-02T15:12:54","modified_gmt":"2016-01-02T15:12:54","slug":"ffmpeg-tips","status":"publish","type":"post","link":"https:\/\/malemuk.com\/olofee\/ffmpeg-tips\/","title":{"rendered":"ffmpeg tips"},"content":{"rendered":"<p>NOTE: ffmpeg has been replaced by\u00a0avconv, but commands below might apply to avconv as well.<\/p>\n<p><strong>Change the frame rate of videos<\/strong><br \/>\nExample: convert a video file with any frame rate to a video file with 30 fps (frames per second)<\/p>\n<p><code>$ ffmpeg -i inputfile.mp4 -r 30 -vcodec copy -acodec copy outputfile.mp4<\/code><\/p>\n<p><strong>Format videos for Vimeo upload<\/strong><br \/>\nUse the following command<\/p>\n<p><code>$ ffmpeg -i inputvideo.avi -vcodec libx264 -r 30 -b 5000k -s 1280x720 outputvideo.mp4<\/code><\/p>\n<p>You will need the libx264 codec. For that purpose, install libavformat-extra-53 (Ubuntu 12.04).<\/p>\n<p>You may have to convert the audio as well. If so, add the following:<\/p>\n<p><code>$ -acodec libvo_aacenc -ab 192k<\/code><\/p>\n<p>libvo_aacenc is installed with libavformat-extra-53<\/p>\n<p><strong>Split a video<\/strong><\/p>\n<p><code>$ ffmpeg -i inputvideo.avi -vcodec copy -acodec copy -ss 00:00:00 -t 00:30:00 output1.avi<\/code><\/p>\n<p><strong>Format videos for Windows movie player<\/strong><br \/>\nUse the following command<\/p>\n<p><code>$ ffmpeg -i infile -vcodec wmv2 -sameq -acodec wmav2 outfile.asf<\/code><\/p>\n<p><strong>Convert ogg to mp3<\/strong><br \/>\nMake sure you have libavcodec-extra-53 installed. Then type<\/p>\n<p><code>$ ffmpeg -i file.ogg file.mp3<\/code><\/p>\n<p>Unfortunately, ffmpeg produces layer-2-mp3, which my mp3-player isn&#8217;t able to read.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NOTE: ffmpeg has been replaced by\u00a0avconv, but commands below might apply to avconv as well. Change the frame rate of videos Example: convert a video file with any frame rate to a video file with 30 fps (frames per second) $ ffmpeg -i inputfile.mp4 -r 30 -vcodec copy -acodec copy outputfile.mp4 Format videos for Vimeo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-913","post","type-post","status-publish","format-standard","hentry","category-computer-stuff"],"jetpack-related-posts":[{"id":910,"url":"https:\/\/malemuk.com\/olofee\/emacs-tips\/","url_meta":{"origin":913,"position":0},"title":"Emacs tips","date":"December 31, 2015","format":false,"excerpt":"Essential shortcuts M-: META key (ALT on most keyboards) C-: CONTROL key C-x C-f : open file C-x b : switch to buffer C-x k : kill buffer C-s : search text forward C-r : search text backward C-+ \/ C-- : Zoom in\/out C-space: mark set (start of the\u2026","rel":"nofollow","context":"In \"Computer stuff\"","img":{"src":"","width":0,"height":0},"classes":[]},{"id":900,"url":"https:\/\/malemuk.com\/olofee\/significant-figures\/","url_meta":{"origin":913,"position":1},"title":"Significant figures","date":"December 31, 2015","format":false,"excerpt":"John Denker argues that it is insane to use significant figures. Instead one should follow these guidelines: Keep all the original data. Do not round off the original data. In the introductory class, the following \u201chouse rules\u201d apply: Basic 3-digit rule: For a number in scientific notation, the rule is\u2026","rel":"nofollow","context":"In \"Science\"","img":{"src":"","width":0,"height":0},"classes":[]},{"id":137,"url":"https:\/\/malemuk.com\/olofee\/alpine-configuration\/","url_meta":{"origin":913,"position":2},"title":"Alpine configuration","date":"October 23, 2010","format":false,"excerpt":"Alpine is to email software what Emacs is to text-editing software. I love it. First, create a collection list -- I think you may skip this part if you're using pop instead of imap: S L A Nickname: any nickname Server: my.server.net:port\/ssl\/user=my_username If you're not using ssl, write tls instead.\u2026","rel":"nofollow","context":"In \"Computer stuff\"","img":{"src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/malemuk.com\/olofee\/wp-json\/wp\/v2\/posts\/913","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/malemuk.com\/olofee\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/malemuk.com\/olofee\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/malemuk.com\/olofee\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/malemuk.com\/olofee\/wp-json\/wp\/v2\/comments?post=913"}],"version-history":[{"count":3,"href":"https:\/\/malemuk.com\/olofee\/wp-json\/wp\/v2\/posts\/913\/revisions"}],"predecessor-version":[{"id":941,"href":"https:\/\/malemuk.com\/olofee\/wp-json\/wp\/v2\/posts\/913\/revisions\/941"}],"wp:attachment":[{"href":"https:\/\/malemuk.com\/olofee\/wp-json\/wp\/v2\/media?parent=913"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/malemuk.com\/olofee\/wp-json\/wp\/v2\/categories?post=913"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/malemuk.com\/olofee\/wp-json\/wp\/v2\/tags?post=913"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}