Answers.Body: <p>Did you install ffmpeg? This script uses it so it'd be good to have it...</p>
  
  <p>The Idea is that you create a txt-document with all the file-names inside, which will then get stitched together. You can read up on how it works here:</p>
  
  <blockquote>
    <p><a href="https://trac.ffmpeg.org/wiki/Concatenate" rel="nofollow noreferrer">https://trac.ffmpeg.org/wiki/Concatenate</a></p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-29T10:57:30.127Z
Answers.LastActivityDate: 2019-07-29T10:57:30.127Z
Answers.UserDisplayName: Florian Claaßen
Body: <p>I have 500+ videos. I need to add intro and outro to them.</p>
  
  <p>Found this .bat script on a different website, and tried it. But it didn't work for me. As the script only ads outro - still didn't work.</p>
  
  <pre><code>SET RESOLUTION="1280:720"
  SET INPUT_FOLDER="input"
  SET INTRO="intro.mp4"
  SET OUTPUT_FOLDER="output"
  
  for %%a in ("%INPUT_FOLDER%\*.*") do ffmpeg -i %INTRO% -i "%%a" -filter_complex "[0:v]scale=%RESOLUTION%:force_original_aspect_ratio=1,pad=%RESOLUTION%:(ow-iw)/2:(oh-ih)/2[v0]; [1:v]scale=%RESOLUTION%:force_original_aspect_ratio=1,pad=%RESOLUTION%:(ow-iw)/2:(oh-ih)/2[v1]; [v0][0:a][v1][1:a]concat=n=2:v=1:a=1[v][a]" -map [v] -map [a] "%OUTPUT_FOLDER%\%%~na.mp4"
  </code></pre>
  
  <p>I'm on Windows OS, but I also have Linux Mint installed on my workstation.</p>
  
  <p>My question is: how to add 1 intro and 1 outro to 500+ videos?</p>
  
  <p><strong>PS:</strong> Intro and Outro files are the same file.</p>
  
  <p>Thank you.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-07-29T17:37:51.543Z
Comments.Text: No errors or log? Is the problem with your batch script or the ffmpeg command?
Comments.UserDisplayName: llogan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-07-31T04:39:25.530Z
Comments.Text: I ran the .bat file, but it didn't give me any error. Have to mention the batch script is located in the same place as the video files and intro/outro file -> 4 videos in total for testing purpose. I have no log.
Comments.UserDisplayName: Sita Gabriel
Tags: <ffmpeg><video-editor><editing>
Title: Batch add intro and outro to videos
UserDisplayName: Sita Gabriel
ThreadText: # Batch add intro and outro to videos
  
  (Asked by: username_0 on 2019-07-28)
  
  I have 500+ videos. I need to add intro and outro to them.
  
  Found this .bat script on a different website, and tried it. But it didn't work for me. As the script only ads outro - still didn't work.
  
  ```
  SET RESOLUTION="1280:720"
  SET INPUT_FOLDER="input"
  SET INTRO="intro.mp4"
  SET OUTPUT_FOLDER="output"
  
  for %%a in ("%INPUT_FOLDER%\*.*") do ffmpeg -i %INTRO% -i "%%a" -filter_complex "[0:v]scale=%RESOLUTION%:force_original_aspect_ratio=1,pad=%RESOLUTION%:(ow-iw)/2:(oh-ih)/2[v0]; [1:v]scale=%RESOLUTION%:force_original_aspect_ratio=1,pad=%RESOLUTION%:(ow-iw)/2:(oh-ih)/2[v1]; [v0][0:a][v1][1:a]concat=n=2:v=1:a=1[v][a]" -map [v] -map [a] "%OUTPUT_FOLDER%\%%~na.mp4"
  
  ```
  
  I'm on Windows OS, but I also have Linux Mint installed on my workstation.
  
  My question is: how to add 1 intro and 1 outro to 500+ videos?
  
  **PS:** Intro and Outro files are the same file.
  
  Thank you.
  
  **Tags:** ffmpeg, video-editor, editing
  
  > **Comments:**
  > **username_1**: No errors or log? Is the problem with your batch script or the ffmpeg command?  
  > **username_0**: I ran the .bat file, but it didn't give me any error. Have to mention the batch script is located in the same place as the video files and intro/outro file -> 4 videos in total for testing purpose. I have no log.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-07-29. Score: 0
  
  Did you install ffmpeg? This script uses it so it'd be good to have it...
  
  The Idea is that you create a txt-document with all the file-names inside, which will then get stitched together. You can read up on how it works here:
  
  > <https://trac.ffmpeg.org/wiki/Concatenate>
  
  
  ---
  
  