{"id":39242,"date":"2025-11-10T13:51:41","date_gmt":"2025-11-10T21:51:41","guid":{"rendered":"https:\/\/cloudinary.com\/blog\/?p=39242"},"modified":"2025-11-10T13:51:42","modified_gmt":"2025-11-10T21:51:42","slug":"how-can-i-concatenate-videos-with-ffmpeg","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/","title":{"rendered":"How can I concatenate videos with FFmpeg?"},"content":{"rendered":"\n<p>Stitching multiple clips into one file is a common editing task for demos, tutorials, and social reels. If you have recordings from different devices, or you want to join phone segments without re-encoding, FFmpeg can handle it quickly once you pick the right method.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Question:<\/h2>\n\n\n\n<p><em>Hi all,<\/em><\/p>\n\n\n\n<p><br><em>I have a handful of MP4 clips and I want to join them into one video using FFmpeg. Some clips come from the same camera, others are from different sources, so codecs and frame rates might not match. I want to keep quality high, avoid re-encoding if possible, and keep audio in sync.<\/em><\/p>\n\n\n\n<p><br><em>How can I concatenate videos with FFmpeg? What is the difference between ffmpeg concat demuxer and the concat filter, and when should I use each? Also, any tips for dealing with mismatched parameters or VFR footage?<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Answer:<\/h2>\n\n\n\n<p>FFmpeg offers two primary ways to concatenate clips. Pick based on whether your inputs are already identical at the stream level or if they need re-encoding. Let\u2019s dig a little deeper:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1) Fastest if everything matches: the concat demuxer<\/h3>\n\n\n\n<p>Use this when all inputs share the same codec, resolution, pixel format, frame rate, and audio parameters. It does a stream copy, so there is no re-encode.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\"><span class=\"hljs-comment\"># list.txt<\/span>\nfile <span class=\"hljs-string\">'a.mp4'<\/span>\nfile <span class=\"hljs-string\">'b.mp4'<\/span>\nfile <span class=\"hljs-string\">'c.mp4'<\/span>\n\n<span class=\"hljs-comment\"># Concat without re-encoding<\/span>\nffmpeg -f concat -safe <span class=\"hljs-number\">0<\/span> -i <span class=\"hljs-keyword\">list<\/span>.txt -c copy -fflags +genpts output.mp4<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Here\u2019s what this command means:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-safe 0<\/code> allows absolute paths in list.txt.<\/li>\n\n\n\n<li><code>-fflags +genpts<\/code> can regenerate timestamps for smoother playback on some players.<\/li>\n<\/ul>\n\n\n\n<p>If any stream parameter differs, this will fail or produce glitchy output. In that case, use the filter method.<\/p>\n\n\n\n<p>Want a deeper primer on FFmpeg capabilities and tradeoffs? See <a href=\"https:\/\/cloudinary.com\/guides\/video-formats\/ffmpeg-features-use-cases-and-pros-cons-you-should-know\">FFmpeg features and use cases<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2) Works with mixed inputs: the concat filter<\/h3>\n\n\n\n<p>Use this when inputs differ. It re-encodes to a single, unified format. You can also insert scales, format fixes, and audio resampling to prevent drift.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\"><span class=\"hljs-comment\"># Three inputs, normalize video and audio, then concatenate<\/span>\nffmpeg -i a.mp4 -i b.mp4 -i c.mp4 \\\n\u00a0 -filter_complex <span class=\"hljs-string\">\"\\\n\u00a0 &#91;0:v]scale=1920:-2,format=yuv420p&#91;v0];&#91;0:a]aresample=async=1&#91;a0];\\\n\u00a0 &#91;1:v]scale=1920:-2,format=yuv420p&#91;v1];&#91;1:a]aresample=async=1&#91;a1];\\\n\u00a0 &#91;2:v]scale=1920:-2,format=yuv420p&#91;v2];&#91;2:a]aresample=async=1&#91;a2];\\\n\u00a0 &#91;v0]&#91;a0]&#91;v1]&#91;a1]&#91;v2]&#91;a2]concat=n=3:v=1:a=1&#91;v]&#91;a]\"<\/span> \\\n\u00a0 -map <span class=\"hljs-string\">\"&#91;v]\"<\/span> -map <span class=\"hljs-string\">\"&#91;a]\"<\/span> \\\n\u00a0 -r <span class=\"hljs-number\">30<\/span> -c:v libx264 -crf <span class=\"hljs-number\">20<\/span> -preset medium \\\n\u00a0 -c:a aac -b:a <span class=\"hljs-number\">160<\/span>k -movflags +faststart output.mp4<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Why these options?:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>scale=1920:-2<\/code> and <code>format=yuv420p<\/code> align resolution and pixel format for broad compatibility.<\/li>\n\n\n\n<li><code>aresample=async=1<\/code> helps keep audio in sync when source time bases differ.<\/li>\n\n\n\n<li><code>-r 30<\/code> sets a consistent output frame rate.<\/li>\n\n\n\n<li><code>-movflags +faststart<\/code> optimizes MP4 for web playback by moving the moov atom to the front.<\/li>\n<\/ul>\n\n\n\n<p>For encoder choices and settings, check these <a href=\"https:\/\/cloudinary.com\/guides\/video-formats\/h-264-video-encoding-how-it-works-benefits-and-9-best-practices\">H.264 best practices<\/a> and MP4 container features in our <a href=\"https:\/\/cloudinary.com\/guides\/video-formats\/mp4-format-mpeg-4-part-14-how-it-works-pros-and-cons\">MP4 format guide<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Make clips compatible, then use the fast demuxer<\/h3>\n\n\n\n<p>If you prefer stream copy at the end, pre-normalize each clip once, then concat with <code>-c copy<\/code>.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\"><span class=\"hljs-comment\"># Normalize each input to a common profile<\/span>\nffmpeg -i in1.mp4 -c:v libx264 -preset veryfast -crf <span class=\"hljs-number\">20<\/span> -r <span class=\"hljs-number\">30<\/span> \\\n\u00a0 -vf <span class=\"hljs-string\">\"scale=1920:-2,format=yuv420p\"<\/span> -c:a aac -ar <span class=\"hljs-number\">48000<\/span> -ac <span class=\"hljs-number\">2<\/span> -b:a <span class=\"hljs-number\">160<\/span>k norm1.mp4\nffmpeg -i in2.mp4 -c:v libx264 -preset veryfast -crf <span class=\"hljs-number\">20<\/span> -r <span class=\"hljs-number\">30<\/span> \\\n\u00a0 -vf <span class=\"hljs-string\">\"scale=1920:-2,format=yuv420p\"<\/span> -c:a aac -ar <span class=\"hljs-number\">48000<\/span> -ac <span class=\"hljs-number\">2<\/span> -b:a <span class=\"hljs-number\">160<\/span>k norm2.mp4\n\n<span class=\"hljs-comment\"># Then concatenate losslessly<\/span>\nprintf <span class=\"hljs-string\">\"file 'norm1.mp4'\\nfile 'norm2.mp4'\\n\"<\/span> &gt; <span class=\"hljs-keyword\">list<\/span>.txt\nffmpeg -f concat -safe <span class=\"hljs-number\">0<\/span> -i <span class=\"hljs-keyword\">list<\/span>.txt -c copy -fflags +genpts output.mp4<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">Common pitfalls and fixes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>One file lacks audio:<\/strong> Use concat with <code>a=0<\/code> or add a dummy audio track for that input before concatenation.<\/li>\n\n\n\n<li><strong>Variable frame rate inputs:<\/strong> Explicitly set a target frame rate on output (<code>-r 30<\/code>) or per input using <code>-vsync<\/code> and <code>fps<\/code> filters.<\/li>\n\n\n\n<li><strong>Timebase or timestamp gaps:<\/strong> Add <code>-fflags +genpts<\/code> on concat demuxer outputs.<\/li>\n\n\n\n<li><strong>Absolute paths in list.txt:<\/strong> Include <code>-safe 0<\/code>. Use single quotes around paths with spaces.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Using Cloudinary for instant delivery<\/h3>\n\n\n\n<p>FFmpeg on its own is a fantastic tool, but if you need to concat videos at scale, you might want a service that stores clips, stitches them on demand, and delivers globally optimized streams. Cloudinary can do this with a simple transformation that appends videos using a splice step, then serves the result via a CDN.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\"><span class=\"hljs-comment\"># Example: append clip2 after clip1 on the fly<\/span>\nhttps:<span class=\"hljs-comment\">\/\/res.cloudinary.com\/&lt;cloud_name&gt;\/video\/upload\/l_video:clip2\/fl_splice\/clip1.mp4<\/span>\n\n<span class=\"hljs-comment\"># Chain more clips<\/span>\nhttps:<span class=\"hljs-comment\">\/\/res.cloudinary.com\/&lt;cloud_name&gt;\/video\/upload\/l_video:clip2\/fl_splice\/l_video:clip3\/fl_splice\/clip1.mp4<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>You can upload your sources once, generate concatenations dynamically, and inherit sensible encoding defaults for the web.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">TL;DR<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the concat demuxer for identical streams and get a fast, lossless join.<\/li>\n\n\n\n<li>Use the concat filter when inputs differ, and re-encode to a unified format.<\/li>\n\n\n\n<li>Normalize resolution, pixel format, frame rate, and audio to avoid sync issues.<\/li>\n\n\n\n<li>Cloud workflows like Cloudinary can splice videos on demand and deliver via CDN.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Learn More<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/cloudinary.com\/tools\/mkv-to-mp4\">MKV to MP4 Converter<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/cloudinary.com\/tools\/webm-to-mp4\">WEBM to MP4 Converter<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/cloudinary.com\/guides\/video\/video-engineering\">Video Engineering Guide<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/cloudinary.com\/guides\/video\/video-as-a-service\">Video as a Service<\/a><\/li>\n<\/ul>\n\n\n\n<p>Ready to streamline video concatenation, optimization, and delivery at scale? <a href=\"https:\/\/cloudinary.com\/users\/register_free\">Create a free Cloudinary account<\/a> and start building a faster, more reliable media pipeline today.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Stitching multiple clips into one file is a common editing task for demos, tutorials, and social reels. If you have recordings from different devices, or you want to join phone segments without re-encoding, FFmpeg can handle it quickly once you pick the right method. Question: Hi all, I have a handful of MP4 clips and [&hellip;]<\/p>\n","protected":false},"author":88,"featured_media":39243,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[423],"class_list":["post-39242","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-questions"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.6 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How can I concatenate videos with FFmpeg?<\/title>\n<meta name=\"description\" content=\"Stitching multiple clips into one file is a common editing task for demos, tutorials, and social reels. If you have recordings from different devices, or\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How can I concatenate videos with FFmpeg?\" \/>\n<meta property=\"og:description\" content=\"Stitching multiple clips into one file is a common editing task for demos, tutorials, and social reels. If you have recordings from different devices, or\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-10T21:51:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-10T21:51:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1762811478\/how_can_I_concatenate_videos_with_ffmpeg_featured_image\/how_can_I_concatenate_videos_with_ffmpeg_featured_image.jpg?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"1999\" \/>\n\t<meta property=\"og:image:height\" content=\"1100\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"damjanantevski\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/\"},\"author\":{\"name\":\"damjanantevski\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/43592e43c12520a1e867d456b1e8cf7e\"},\"headline\":\"How can I concatenate videos with FFmpeg?\",\"datePublished\":\"2025-11-10T21:51:41+00:00\",\"dateModified\":\"2025-11-10T21:51:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/\"},\"wordCount\":615,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1762811478\/how_can_I_concatenate_videos_with_ffmpeg_featured_image\/how_can_I_concatenate_videos_with_ffmpeg_featured_image.jpg?_i=AA\",\"keywords\":[\"Questions\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2025\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/\",\"url\":\"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/\",\"name\":\"How can I concatenate videos with FFmpeg?\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1762811478\/how_can_I_concatenate_videos_with_ffmpeg_featured_image\/how_can_I_concatenate_videos_with_ffmpeg_featured_image.jpg?_i=AA\",\"datePublished\":\"2025-11-10T21:51:41+00:00\",\"dateModified\":\"2025-11-10T21:51:42+00:00\",\"description\":\"Stitching multiple clips into one file is a common editing task for demos, tutorials, and social reels. If you have recordings from different devices, or\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1762811478\/how_can_I_concatenate_videos_with_ffmpeg_featured_image\/how_can_I_concatenate_videos_with_ffmpeg_featured_image.jpg?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1762811478\/how_can_I_concatenate_videos_with_ffmpeg_featured_image\/how_can_I_concatenate_videos_with_ffmpeg_featured_image.jpg?_i=AA\",\"width\":1999,\"height\":1100},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How can I concatenate videos with FFmpeg?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"name\":\"Cloudinary Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudinary.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\",\"name\":\"Cloudinary Blog\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"width\":312,\"height\":60,\"caption\":\"Cloudinary Blog\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/43592e43c12520a1e867d456b1e8cf7e\",\"name\":\"damjanantevski\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3b40c995531fe4d510212a06c9d4fc666d2cb8efbfebc98a94191701accf4817?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3b40c995531fe4d510212a06c9d4fc666d2cb8efbfebc98a94191701accf4817?s=96&d=mm&r=g\",\"caption\":\"damjanantevski\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How can I concatenate videos with FFmpeg?","description":"Stitching multiple clips into one file is a common editing task for demos, tutorials, and social reels. If you have recordings from different devices, or","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:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/","og_locale":"en_US","og_type":"article","og_title":"How can I concatenate videos with FFmpeg?","og_description":"Stitching multiple clips into one file is a common editing task for demos, tutorials, and social reels. If you have recordings from different devices, or","og_url":"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/","og_site_name":"Cloudinary Blog","article_published_time":"2025-11-10T21:51:41+00:00","article_modified_time":"2025-11-10T21:51:42+00:00","og_image":[{"width":1999,"height":1100,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1762811478\/how_can_I_concatenate_videos_with_ffmpeg_featured_image\/how_can_I_concatenate_videos_with_ffmpeg_featured_image.jpg?_i=AA","type":"image\/jpeg"}],"author":"damjanantevski","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/"},"author":{"name":"damjanantevski","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/43592e43c12520a1e867d456b1e8cf7e"},"headline":"How can I concatenate videos with FFmpeg?","datePublished":"2025-11-10T21:51:41+00:00","dateModified":"2025-11-10T21:51:42+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/"},"wordCount":615,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1762811478\/how_can_I_concatenate_videos_with_ffmpeg_featured_image\/how_can_I_concatenate_videos_with_ffmpeg_featured_image.jpg?_i=AA","keywords":["Questions"],"inLanguage":"en-US","copyrightYear":"2025","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/","url":"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/","name":"How can I concatenate videos with FFmpeg?","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1762811478\/how_can_I_concatenate_videos_with_ffmpeg_featured_image\/how_can_I_concatenate_videos_with_ffmpeg_featured_image.jpg?_i=AA","datePublished":"2025-11-10T21:51:41+00:00","dateModified":"2025-11-10T21:51:42+00:00","description":"Stitching multiple clips into one file is a common editing task for demos, tutorials, and social reels. If you have recordings from different devices, or","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1762811478\/how_can_I_concatenate_videos_with_ffmpeg_featured_image\/how_can_I_concatenate_videos_with_ffmpeg_featured_image.jpg?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1762811478\/how_can_I_concatenate_videos_with_ffmpeg_featured_image\/how_can_I_concatenate_videos_with_ffmpeg_featured_image.jpg?_i=AA","width":1999,"height":1100},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/questions\/how-can-i-concatenate-videos-with-ffmpeg\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How can I concatenate videos with FFmpeg?"}]},{"@type":"WebSite","@id":"https:\/\/cloudinary.com\/blog\/#website","url":"https:\/\/cloudinary.com\/blog\/","name":"Cloudinary Blog","description":"","publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudinary.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudinary.com\/blog\/#organization","name":"Cloudinary Blog","url":"https:\/\/cloudinary.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","width":312,"height":60,"caption":"Cloudinary Blog"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/43592e43c12520a1e867d456b1e8cf7e","name":"damjanantevski","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3b40c995531fe4d510212a06c9d4fc666d2cb8efbfebc98a94191701accf4817?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3b40c995531fe4d510212a06c9d4fc666d2cb8efbfebc98a94191701accf4817?s=96&d=mm&r=g","caption":"damjanantevski"}}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1762811478\/how_can_I_concatenate_videos_with_ffmpeg_featured_image\/how_can_I_concatenate_videos_with_ffmpeg_featured_image.jpg?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/39242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/users\/88"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=39242"}],"version-history":[{"count":1,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/39242\/revisions"}],"predecessor-version":[{"id":39244,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/39242\/revisions\/39244"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/39243"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=39242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=39242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=39242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}