{"id":7591,"date":"2021-05-27T20:34:46","date_gmt":"2021-05-27T15:34:46","guid":{"rendered":"https:\/\/ahmadawais.com\/?p=7591"},"modified":"2021-05-27T20:52:34","modified_gmt":"2021-05-27T15:52:34","slug":"ffmpeg-command-line-audio-video-workflows","status":"publish","type":"post","link":"https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/","title":{"rendered":"My Command Line Audio Video Workflows with FFmpeg"},"content":{"rendered":"<p>If you know anything about me then you know I love <a href=\"https:\/\/NodeCLI.com\">automating anything<\/a> and everything. I even have a complete course on <a href=\"https:\/\/NodeCLI.com\">building automation CLI tools with Node.js<\/a>.<\/p>\n<p>In this post, I am sharing a couple of super useful <code>ffmpeg<\/code> workflows.<\/p>\n<blockquote><p><a href=\"https:\/\/www.ffmpeg.org\/\">FFmpeg<\/a> is a free and open-source software project consisting of a large suite of libraries and programs for handling video, audio, and other multimedia files and streams. At its core is the FFmpeg program itself, designed for command-line-based processing of video and audio files.<\/p><\/blockquote>\n<p>Converting videos and audio has never been this easy. I&#8217;m able to do a lot of excellent tricks with this command-line tool. Actually, that&#8217;s a good enough introduction \u2014 let me share the real deal.<\/p>\n<h2 id=\"gif-to-video-with-ffmpeg\">Gif to Video with FFmpeg<a href=\"#gif-to-video-with-ffmpeg\" class=\"heading-link\">#<\/a><\/h2>\n<pre class=\"lang:bash\"># Gif to video.\r\n# https:\/\/web.dev\/replace-gifs-with-videos\/\r\nfunction gif2vid() {\r\n\tif [[ \"-h\" == \"$1\" ]]; then\r\n\t\techo \"-\"\r\n\t\techo \"${wb}${bf}\u2014 Help! \u2014${r}\"\r\n\t\techo \"${wb}${bf}USAGE: rgif2vid some.gif nameOfVideos${r}\"\r\n\t\techo \"-\"\r\n\t\treturn 1\r\n\telse\r\n\t\tffmpeg -i \"$1\" \"$2\".mp4\r\n\t\tffmpeg -i \"$1\" -c vp9 -b:v 0 -crf 41 \"$2\".webm\r\n\tfi\r\n}<\/pre>\n<h2 id=\"cut-1-minute-from-the-start-of-a-video-with-ffmpeg\">Cut 1 Minute from the start of a video with FFmpeg<a href=\"#cut-1-minute-from-the-start-of-a-video-with-ffmpeg\" class=\"heading-link\">#<\/a><\/h2>\n<pre class=\"lang:bash\"># Video cutting.\r\nfunction cut1min() {\r\n\tfor i in *.mp4;\r\n\tdo name=`echo \"$i\" | cut -d'.' -f1`\r\n\techo \"$name\"\r\n\tffmpeg -ss 00:00:00.000 -i \"$i\" -t 60 -c:v libx264 -c:a copy \"${name}-1min.mp4\"\r\n\tdone\r\n}<\/pre>\n<h2 id=\"trim-x-seconds-from-the-start-of-a-video-ffmpeg-bar\">Trim X seconds from the start of a video (<a href=\"https:\/\/github.com\/sidneys\/ffmpeg-progressbar-cli\">FFmpeg-bar<\/a>)<a href=\"#trim-x-seconds-from-the-start-of-a-video-ffmpeg-bar\" class=\"heading-link\">#<\/a><\/h2>\n<pre class=\"lang:bash\"># vidtrim &lt;vid file name&gt; &lt;seconds to trim from start&gt;\r\n# vidtrim vid.mp4 5\r\nfunction vidtrim() {\r\n\tffmpeg-bar -i \"$1\" -ss \"$2\" -vcodec copy -acodec copy trimmed-\"$1\"\r\n}<\/pre>\n<h2 id=\"join-multiple-videos-with-ffmpeg-without-re-encoding\">Join multiple videos with FFmpeg \u2014 without re-encoding<a href=\"#join-multiple-videos-with-ffmpeg-without-re-encoding\" class=\"heading-link\">#<\/a><\/h2>\n<pre class=\"lang:bash\"># vidjoin &lt;intro vid file name&gt; &lt;actual vid file name&gt;\r\n# vidjoin intro.mp4 input.mp4\r\nfunction vidjoin() {\r\n\t echo file \"$1\" &gt;&gt; vidjoin.txt\r\n\t echo file \"$2\" &gt;&gt; vidjoin.txt\r\n\t ffmpeg-bar -f concat -i vidjoin.txt -c copy output.mp4\r\n\t rm vidjoin.txt\r\n}<\/pre>\n<h2 id=\"extract-audio-stream-from-video-without-re-encoding\">Extract audio stream from video without re-encoding<a href=\"#extract-audio-stream-from-video-without-re-encoding\" class=\"heading-link\">#<\/a><\/h2>\n<pre class=\"lang:bash\">ffmpeg -i input-video.avi -vn -acodec copy output-audio.aac<\/pre>\n<ul>\n<li><code>-vn<\/code> is no video.<\/li>\n<li><code>-acodec copy<\/code> use the same audio stream that&#8217;s already in there.<\/li>\n<\/ul>\n<h2 id=\"rotate-a-video-with-ffmpeg\">Rotate a video with FFmpeg<a href=\"#rotate-a-video-with-ffmpeg\" class=\"heading-link\">#<\/a><\/h2>\n<pre class=\"lang:bash\"># Rotate 90 clockwise:\r\nffmpeg -i in.mov -vf \"transpose=1\" out.mov<\/pre>\n<p>For the transpose parameter you can pass:<br \/>\n0 = 90 Counter Clockwise and Vertical Flip (default)<br \/>\n1 = 90 Clockwise<br \/>\n2 = 90 Counter Clockwise<br \/>\n3 = 90 Clockwise and Vertical Flip<\/p>\n<p>Use <code>-vf \"transpose=2,transpose=2\"<\/code> for 180 degrees.<\/p>\n<h2 id=\"convert-an-entire-directory-to-one-video-with-ffmpeg\">Convert an entire directory to one video with FFmpeg<a href=\"#convert-an-entire-directory-to-one-video-with-ffmpeg\" class=\"heading-link\">#<\/a><\/h2>\n<p>For <strong>Linux<\/strong> and <strong>macOS<\/strong> this can be done in one line, using <a href=\"https:\/\/mywiki.wooledge.org\/BashFAQ\/073\" rel=\"noreferrer\">parameter expansion<\/a> to change the filename extension of the output file:<\/p>\n<pre class=\"lang:bash\">for i in *.avi; do ffmpeg -i \"$i\" \"${i%.*}.mp4\"; done<\/pre>\n<p>An alternate method would be like this:<\/p>\n<pre class=\"lang:bash\">for i in *.avi;\r\n  do name=`echo \"$i\" | cut -d'.' -f1`\r\n  echo \"$name\"\r\n  ffmpeg -i \"$i\" \"${name}.mov\"\r\ndone<\/pre>\n<p>To convert with subdirectories use:<\/p>\n<pre class=\"lang:bash\">find . -exec ffmpeg -i {} {}.mp3 \\;<\/pre>\n<h2 id=\"get-ffmpeg-information-in-a-friendly-way\">Get FFmpeg information in a friendly way<a href=\"#get-ffmpeg-information-in-a-friendly-way\" class=\"heading-link\">#<\/a><\/h2>\n<p>You can use <code>-progress -<\/code> to print-friendly info formatted by <code>key=value<\/code>.<\/p>\n<pre class=\"lang:bash\">ffmpeg -i vid.mp4 -progress - -y out.mp4\r\n\r\nspeed=3.15x\r\nframe=458\r\nfps=45.8\r\nstream_0_0_q=39.0\r\nbitrate=2337.0kbits\/s\r\ntotal_size=1231258682\r\nout_time_ms=12323423\r\nout_time=00:00:58.44534\r\ndup_frames=0\r\ndrop_frames=0<\/pre>\n<h2 id=\"capture-high-quality-images-from-a-video-with-ffmpeg\">Capture High-quality Images from a video with FFmpeg<a href=\"#capture-high-quality-images-from-a-video-with-ffmpeg\" class=\"heading-link\">#<\/a><\/h2>\n<p>You can use <code>-qscale:v<\/code> (or the alias <code>-q:v<\/code>) to control image quality from a video as an output option.<\/p>\n<ul>\n<li>The normal range for JPEG is 2-31 with 31 being the worst quality.<\/li>\n<li>Linear scale with double <code>qscale<\/code> being roughly half the bitrate.<\/li>\n<li>I recommend trying values of 2-5.<\/li>\n<li>You can use a value of 1 but you must add the <code>-qmin 1<\/code> output option (because the default is <code>-qmin 2<\/code>).<\/li>\n<\/ul>\n<div>\n<h3 id=\"output-a-series-of-images\">Output a series of images<a href=\"#output-a-series-of-images\" class=\"heading-link\">#<\/a><\/h3>\n<pre class=\"lang:bash\">ffmpeg -i input.mp4 -qscale:v 2 output_%03d.jpg<\/pre>\n<p>See the <a href=\"https:\/\/ffmpeg.org\/ffmpeg-formats.html#image2-2\" rel=\"noreferrer\">image muxer documentation<\/a> for more options involving image outputs and their quality requirements.<\/p>\n<h3 id=\"output-a-single-image-at-60-seconds-duration\">Output a single image at ~60 seconds duration<a href=\"#output-a-single-image-at-60-seconds-duration\" class=\"heading-link\">#<\/a><\/h3>\n<pre class=\"lang:clike\">ffmpeg -ss 60 -i input.mp4 -qscale:v 4 -frames:v 1 output.jpg<\/pre>\n<h2 id=\"add-text-subtitles-to-a-video-using-ffmpeg\">Add Text subtitles to a video using FFmpeg<a href=\"#add-text-subtitles-to-a-video-using-ffmpeg\" class=\"heading-link\">#<\/a><\/h2>\n<pre class=\"lang:bash\">ffmpeg -i infile.mp4 -i infile.srt -c copy -c:s mov_text outfile.mp4<\/pre>\n<div>\n<p>The order of <code>-c copy -c:s mov_text<\/code> is quite important.<\/p>\n<p>You are telling FFmpeg to do the following:<\/p>\n<ol>\n<li>Video: copy, Audio: copy, Subtitle: copy<\/li>\n<li>Subtitle: mov_text<\/li>\n<\/ol>\n<p>Alternatively, you could just use <code>-c:v copy -c:a copy -c:s mov_text<\/code> in any order.<br \/>\nThis method adds the subtitles to your video file as one of the streams. You will need player support to view the subtitles (such as VLC).<\/p>\n<h2 id=\"burn-subtitles-to-a-video-using-ffmpeg\">Burn subtitles to a video using FFmpeg<a href=\"#burn-subtitles-to-a-video-using-ffmpeg\" class=\"heading-link\">#<\/a><\/h2>\n<p>This will &#8220;burn them into&#8221; the video, meaning you can&#8217;t turn them off in the player. This is different from adding them as a subtitle stream which can be read by the player and displayed if the viewer wants them.<\/p>\n<p>If your FFmpeg has libass enabled at compile-time, you can directly do:<\/p>\n<pre class=\"lang:bash\">ffmpeg -i mymovie.mp4 -vf subtitles=subtitles.srt mysubtitledmovie.mp4<\/pre>\n<p>Otherwise, you can the <a href=\"http:\/\/ffmpeg.org\/ffmpeg.html#ass\" rel=\"noreferrer\"><code>libass<\/code><\/a> library (make sure your FFmpeg install has the library in the configuration <code>--enable-libass<\/code>).<\/p>\n<p>First, convert the subtitles to <code>.ass<\/code> format: (haha fun extension name)<\/p>\n<pre class=\"lang:bash\">ffmpeg -i subtitles.srt subtitles.ass<\/pre>\n<p>Then add them using a video filter:<\/p>\n<pre class=\"lang:bash\">ffmpeg -i mymovie.mp4 -vf ass=subtitles.ass mysubtitledmovie.mp4<\/pre>\n<\/div>\n<div id=\"question-header\" class=\"grid sm:fd-column\">\n<h2 id=\"extract-duration-from-ffmpeg-video-output\">Extract duration from FFmpeg video output<a href=\"#extract-duration-from-ffmpeg-video-output\" class=\"heading-link\">#<\/a><\/h2>\n<pre class=\"lang:bash\">ffmpeg -i file.mp4 2&gt;&amp;1 | grep Duration | sed 's\/Duration: \\(.*\\), start\/\\1\/g'<\/pre>\n<\/div>\n<\/div>\n<p>I hope you enjoy some of these. I&#8217;ll take some more time out to explain all of these and add a couple more which are tied up in a bit extra complex workflow, un-needed for this post.<\/p>\n<p>Use your code for good. Peace!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you know anything about me then you know I love automating anything and everything. I even have a complete course on building automation CLI tools with Node.js. In this post, I am sharing a couple of super useful ffmpeg workflows. FFmpeg is a free and open-source software project consisting of a large suite of libraries and programs for handling video, audio, and other multimedia files and streams. At its core is the FFmpeg program itself, designed for command-line-based processing of video and audio files. Converting videos and audio has never been this easy. I&#8217;m able to do a lot [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":7595,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"webmentions_disabled_pings":false,"webmentions_disabled":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[286,215],"tags":[287,288],"class_list":["post-7591","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bash","category-web","tag-ffmpeg","tag-video-editing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>My Command Line Audio Video Workflows with FFmpeg<\/title>\n<meta name=\"description\" content=\"If you know anything about me then you know I love automating anything and everything. I even have a complete course on building automation CLI tools with\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"My Command Line Audio Video Workflows with FFmpeg\" \/>\n<meta property=\"og:description\" content=\"If you know anything about me then you know I love automating anything and everything. I even have a complete course on building automation CLI tools with\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/\" \/>\n<meta property=\"og:site_name\" content=\"Ahmad Awais\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/AhmadAwais\" \/>\n<meta property=\"article:author\" content=\"https:\/\/facebook.com\/AhmadAwais\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-27T15:34:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-27T15:52:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ahmadawais.com\/wp-content\/uploads\/2021\/05\/FFmpeg.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ahmad Awais\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@MrAhmadAwais\" \/>\n<meta name=\"twitter:site\" content=\"@MrAhmadAwais\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ahmad Awais\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/ffmpeg-command-line-audio-video-workflows\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/ffmpeg-command-line-audio-video-workflows\\\/\"},\"author\":{\"name\":\"Ahmad Awais\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#\\\/schema\\\/person\\\/1d1b9504182dca2315cf039fb4ebb85b\"},\"headline\":\"My Command Line Audio Video Workflows with FFmpeg\",\"datePublished\":\"2021-05-27T15:34:46+00:00\",\"dateModified\":\"2021-05-27T15:52:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/ffmpeg-command-line-audio-video-workflows\\\/\"},\"wordCount\":572,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#\\\/schema\\\/person\\\/1d1b9504182dca2315cf039fb4ebb85b\"},\"image\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/ffmpeg-command-line-audio-video-workflows\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/FFmpeg.jpg\",\"keywords\":[\"FFmpeg\",\"Video Editing\"],\"articleSection\":[\"Bash\",\"Web\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ahmadawais.com\\\/ffmpeg-command-line-audio-video-workflows\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/ffmpeg-command-line-audio-video-workflows\\\/\",\"url\":\"https:\\\/\\\/ahmadawais.com\\\/ffmpeg-command-line-audio-video-workflows\\\/\",\"name\":\"My Command Line Audio Video Workflows with FFmpeg\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/ffmpeg-command-line-audio-video-workflows\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/ffmpeg-command-line-audio-video-workflows\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/FFmpeg.jpg\",\"datePublished\":\"2021-05-27T15:34:46+00:00\",\"dateModified\":\"2021-05-27T15:52:34+00:00\",\"description\":\"If you know anything about me then you know I love automating anything and everything. I even have a complete course on building automation CLI tools with\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/ffmpeg-command-line-audio-video-workflows\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ahmadawais.com\\\/ffmpeg-command-line-audio-video-workflows\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/ffmpeg-command-line-audio-video-workflows\\\/#primaryimage\",\"url\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/FFmpeg.jpg\",\"contentUrl\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/FFmpeg.jpg\",\"width\":1920,\"height\":1080,\"caption\":\"Ffmpeg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/ffmpeg-command-line-audio-video-workflows\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ahmadawais.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"My Command Line Audio Video Workflows with FFmpeg\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#website\",\"url\":\"https:\\\/\\\/ahmadawais.com\\\/\",\"name\":\"Ahmad Awais\",\"description\":\"Founder &amp; CEO of CommandCode.ai f\\\/k\\\/a Langbase | Google Developers Advisory Board (gDAB) founding member\",\"publisher\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#\\\/schema\\\/person\\\/1d1b9504182dca2315cf039fb4ebb85b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ahmadawais.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/#\\\/schema\\\/person\\\/1d1b9504182dca2315cf039fb4ebb85b\",\"name\":\"Ahmad Awais\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Ahmad-Awais-face.jpg\",\"url\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Ahmad-Awais-face.jpg\",\"contentUrl\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Ahmad-Awais-face.jpg\",\"width\":2299,\"height\":1705,\"caption\":\"Ahmad Awais\"},\"logo\":{\"@id\":\"https:\\\/\\\/ahmadawais.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Ahmad-Awais-face.jpg\"},\"description\":\"Founder & CEO of \u2318 Command Code coding agent with taste. Founded Langbase.com, AI cloud to build, deploy, and scale AI agents with tools & memory \u00b7 Creator of Command.new. \\\"Awais is an awesome example for developers\\\" \u2014 Satya Nadella, CEO of Microsoft. NASA Mars Ingenuity Helicopter mission code contributor 8th GitHub Stars Award recipient with 5x GitHub Stars Award (Listed as GitHub's #1 JavaScript trending developer). Google Developers Expert Web DevRel. Ex VP Eng (DevTools & DevRel) Rapid \u00b7 Google Developers Advisory Board (gDAB) founding member \u00b7 AI\\\/ML\\\/DevTools Angel Investor (Replit, Resend, Daytona, Gumroad and you?) \u276f AI\\\/ML Advisory Board San Francisco, DevNetwork. Award-winning Open Source Engineering leader authored hundreds of open-source dev-tools and software libraries used by millions of developers, including Shades of Purple code theme and corona-cli. Linux Foundation (Node.js Committee Lead), OpenAPI Business Governing Board. Taught 108K+ developers via NodeCLI.com and VSCode.pro course. 274 million views, blogging for 24 yrs. \u276f Read more about Ahmad Awais or come say hi on \ud835\udd4f @MrAhmadAwais.\",\"sameAs\":[\"https:\\\/\\\/AhmadAwais.com\\\/\",\"https:\\\/\\\/facebook.com\\\/AhmadAwais\",\"https:\\\/\\\/instagram.com\\\/MrAhmadAwais\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/MrAhmadAwais\\\/\",\"https:\\\/\\\/x.com\\\/MrAhmadAwais\",\"https:\\\/\\\/youtube.com\\\/AhmadAwais\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"My Command Line Audio Video Workflows with FFmpeg","description":"If you know anything about me then you know I love automating anything and everything. I even have a complete course on building automation CLI tools with","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/","og_locale":"en_US","og_type":"article","og_title":"My Command Line Audio Video Workflows with FFmpeg","og_description":"If you know anything about me then you know I love automating anything and everything. I even have a complete course on building automation CLI tools with","og_url":"https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/","og_site_name":"Ahmad Awais","article_publisher":"https:\/\/facebook.com\/AhmadAwais","article_author":"https:\/\/facebook.com\/AhmadAwais","article_published_time":"2021-05-27T15:34:46+00:00","article_modified_time":"2021-05-27T15:52:34+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2021\/05\/FFmpeg.jpg","type":"image\/jpeg"}],"author":"Ahmad Awais","twitter_card":"summary_large_image","twitter_creator":"@MrAhmadAwais","twitter_site":"@MrAhmadAwais","twitter_misc":{"Written by":"Ahmad Awais","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/#article","isPartOf":{"@id":"https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/"},"author":{"name":"Ahmad Awais","@id":"https:\/\/ahmadawais.com\/#\/schema\/person\/1d1b9504182dca2315cf039fb4ebb85b"},"headline":"My Command Line Audio Video Workflows with FFmpeg","datePublished":"2021-05-27T15:34:46+00:00","dateModified":"2021-05-27T15:52:34+00:00","mainEntityOfPage":{"@id":"https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/"},"wordCount":572,"commentCount":0,"publisher":{"@id":"https:\/\/ahmadawais.com\/#\/schema\/person\/1d1b9504182dca2315cf039fb4ebb85b"},"image":{"@id":"https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/#primaryimage"},"thumbnailUrl":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2021\/05\/FFmpeg.jpg","keywords":["FFmpeg","Video Editing"],"articleSection":["Bash","Web"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/","url":"https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/","name":"My Command Line Audio Video Workflows with FFmpeg","isPartOf":{"@id":"https:\/\/ahmadawais.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/#primaryimage"},"image":{"@id":"https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/#primaryimage"},"thumbnailUrl":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2021\/05\/FFmpeg.jpg","datePublished":"2021-05-27T15:34:46+00:00","dateModified":"2021-05-27T15:52:34+00:00","description":"If you know anything about me then you know I love automating anything and everything. I even have a complete course on building automation CLI tools with","breadcrumb":{"@id":"https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/#primaryimage","url":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2021\/05\/FFmpeg.jpg","contentUrl":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2021\/05\/FFmpeg.jpg","width":1920,"height":1080,"caption":"Ffmpeg"},{"@type":"BreadcrumbList","@id":"https:\/\/ahmadawais.com\/ffmpeg-command-line-audio-video-workflows\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ahmadawais.com\/"},{"@type":"ListItem","position":2,"name":"My Command Line Audio Video Workflows with FFmpeg"}]},{"@type":"WebSite","@id":"https:\/\/ahmadawais.com\/#website","url":"https:\/\/ahmadawais.com\/","name":"Ahmad Awais","description":"Founder &amp; CEO of CommandCode.ai f\/k\/a Langbase | Google Developers Advisory Board (gDAB) founding member","publisher":{"@id":"https:\/\/ahmadawais.com\/#\/schema\/person\/1d1b9504182dca2315cf039fb4ebb85b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ahmadawais.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/ahmadawais.com\/#\/schema\/person\/1d1b9504182dca2315cf039fb4ebb85b","name":"Ahmad Awais","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/06\/Ahmad-Awais-face.jpg","url":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/06\/Ahmad-Awais-face.jpg","contentUrl":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/06\/Ahmad-Awais-face.jpg","width":2299,"height":1705,"caption":"Ahmad Awais"},"logo":{"@id":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2020\/06\/Ahmad-Awais-face.jpg"},"description":"Founder & CEO of \u2318 Command Code coding agent with taste. Founded Langbase.com, AI cloud to build, deploy, and scale AI agents with tools & memory \u00b7 Creator of Command.new. \"Awais is an awesome example for developers\" \u2014 Satya Nadella, CEO of Microsoft. NASA Mars Ingenuity Helicopter mission code contributor 8th GitHub Stars Award recipient with 5x GitHub Stars Award (Listed as GitHub's #1 JavaScript trending developer). Google Developers Expert Web DevRel. Ex VP Eng (DevTools & DevRel) Rapid \u00b7 Google Developers Advisory Board (gDAB) founding member \u00b7 AI\/ML\/DevTools Angel Investor (Replit, Resend, Daytona, Gumroad and you?) \u276f AI\/ML Advisory Board San Francisco, DevNetwork. Award-winning Open Source Engineering leader authored hundreds of open-source dev-tools and software libraries used by millions of developers, including Shades of Purple code theme and corona-cli. Linux Foundation (Node.js Committee Lead), OpenAPI Business Governing Board. Taught 108K+ developers via NodeCLI.com and VSCode.pro course. 274 million views, blogging for 24 yrs. \u276f Read more about Ahmad Awais or come say hi on \ud835\udd4f @MrAhmadAwais.","sameAs":["https:\/\/AhmadAwais.com\/","https:\/\/facebook.com\/AhmadAwais","https:\/\/instagram.com\/MrAhmadAwais\/","https:\/\/www.linkedin.com\/in\/MrAhmadAwais\/","https:\/\/x.com\/MrAhmadAwais","https:\/\/youtube.com\/AhmadAwais"]}]}},"jetpack_featured_media_url":"https:\/\/ahmadawais.com\/wp-content\/uploads\/2021\/05\/FFmpeg.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/posts\/7591","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/comments?post=7591"}],"version-history":[{"count":5,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/posts\/7591\/revisions"}],"predecessor-version":[{"id":7597,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/posts\/7591\/revisions\/7597"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/media\/7595"}],"wp:attachment":[{"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/media?parent=7591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/categories?post=7591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahmadawais.com\/api\/wp\/v2\/tags?post=7591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}