<pre><code>ffmpeg -y -i 55.mp4 -loop 1 -framerate 30000/1001 -t 5 -i 55.png -t 0.5 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -filter_complex "[0:a]atempo=1.15,volume=1.6,pan=stereo|c0&lt;c0+0*c1|c1&lt;c0+0*c1,aeval=val(0)|-val(1) [amain]; [0:v]setpts=PTS/1.15,crop=iw/1.2:ih/1.2,scale=1280:720,setdar=16/9 [vmain]; [1:v]premultiply=inplace=1,scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1[vintro]; [vintro][2][vmain][amain]concat=n=2:v=1:a=1" -vcodec libx264 -pix_fmt yuv420p -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -bufsize 500000k -threads 0 -preset superfast out2222.mp4
</code></pre>

<ul>
<li><p>The intro needs audio to concat to the audio of <code>55.mp4</code> or else concat will fail. This example uses the <a href="https://ffmpeg.org/ffmpeg-filters.html#anullsrc" rel="nofollow noreferrer">anullsrc</a> filter to generate silent audio. A short duration is declared because anullsrc duration by default is infinite. The <a href="https://ffmpeg.org/ffmpeg-filters.html#concat" rel="nofollow noreferrer">concat</a> filter will automatically extend this shortened duration to match its associated video segment.</p></li>
<li><p>The width, height, and aspect ratio of the <code>55.png</code> is modified with the <a href="https://ffmpeg.org/ffmpeg-filters.html#scale" rel="nofollow noreferrer">scale</a>, <a href="https://ffmpeg.org/ffmpeg-filters.html#pad" rel="nofollow noreferrer">pad</a>, and <a href="https://ffmpeg.org/ffmpeg-filters.html#setsar" rel="nofollow noreferrer">setsar</a> filters to match those of <code>55.mp4</code>.</p></li>
</ul>

CC BY-SA 4.0
2020-04-15T23:24:56.063Z
1 word excellent Bravo, 1 issue is the intro logo is to big,it enlarges to much can we have it fit center?
das
CC BY-SA 4.0
2020-04-15T23:31:40.010Z
Can we have it centered like this https://i.imgur.com/DEsi9Fr.png  ,And look at your updated code image https://i.imgur.com/gFk7S2R.png
das
CC BY-SA 4.0
2020-04-15T23:38:55.933Z
intro should be like this https://streamable.com/0sj61i
das
CC BY-SA 4.0
2020-04-15T23:59:51.017Z
new update 100% correct, can you remove white background if not its ok since the image is png transperant it should be plain right ? if you cant its ok let me know thank you and yes you read my mind it is exactly how i want it.
das
CC BY-SA 4.0
2020-04-16T00:05:02.760Z
@das Provide a link to `55.png`.
llogan
CC BY-SA 4.0
2020-04-16T00:05:54.710Z
https://i.imgur.com/v2fzSUS.png i also notice the video playback is 1x extra fast? can i tune it to be normal
das
CC BY-SA 4.0
2020-04-16T00:11:41.827Z
https://streamable.com/rx4ye8 your video time 2:37
https://streamable.com/r1tv48 original video  go to time 2:56 and listen to sound playback compare
das
CC BY-SA 4.0
2020-04-16T00:15:38.777Z
@das That's due to your inclusion of `atempo=1.15` and `setpts=PTS/1.15` which I assumed you wanted to keep.
llogan
CC BY-SA 4.0
2020-04-16T00:20:34.340Z
thanks sir, am compiling and tuning that line of code and testing which is better for me,sorry about that,can you remove the white background
das
CC BY-SA 4.0
2020-04-16T00:30:25.560Z
@das See updated answer. Most PNG with alpha wouldn't need premultiply filter, but yours does.
llogan
CC BY-SA 4.0
2020-04-16T00:54:50.177Z
the audo how do to make it sound better just like original video no hissing noise higher audio quality
das
CC BY-SA 4.0
2020-04-16T01:02:16.767Z
@das Remove `volume=1.6` as the audio volume is probably clipping. This is becoming a never ending series of questions. I already answered the main question. The rest of these questions are not related to the main question of "how to add intro". You're supposed to make one question and it gets one answer. Then if you have another, separate issue you post a new question and it gets its own answer.
llogan
CC BY-SA 4.0
2020-04-16T01:03:57.830Z
thank you @llogan you was so helpful may god bless you
das
CC BY-SA 4.0
2020-04-15T23:13:20.527Z
2020-04-16T00:29:41.127Z
2020-04-16T00:29:41.127Z
llogan
<pre><code>ffmpeg -y -i 55.mp4 -loop 1 -framerate 30000/1001 -t 5 -i 55.png -t 0.5 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -filter_complex "[0:a]atempo=1.15,volume=1.6,pan=stereo|c0&lt;c0+0*c1|c1&lt;c0+0*c1,aeval=val(0)|-val(1) [amain]; [0:v]setpts=PTS/1.15,crop=iw/1.2:ih/1.2,scale=1280:720,setdar=16/9 [vmain]; [1:v]premultiply=inplace=1,scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1[vintro]; [vintro][2][vmain][amain]concat=n=2:v=1:a=1" -vcodec libx264 -pix_fmt yuv420p -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -bufsize 500000k -threads 0 -preset superfast out2222.mp4
</code></pre>

CC BY-SA 4.0
2020-04-16T01:02:20.220Z
2020-04-16T01:02:20.220Z
das
<p>I want to make a 5 second intro from <code>55.png</code>, and concatenate it to the beginning of <code>55.mp4</code>. I would like to incorporate it into this command:</p>

<pre><code>ffmpeg -y -i 55.mp4 -i intro -filter_complex "[0:a]atempo=1.15,volume=1.6,pan=stereo|c0&lt;c0+0*c1|c1&lt;c0+0*c1,aeval=val(0)|-val(1) [amain]; [0:v]setpts=PTS/1.15,crop=iw/1.2:ih/1.2,scale=1280:720,setdar=16/9 [vmain]; [1:v]scale=1280:720,setdar=16/9 [vintro]; [vintro][1:a][vmain][amain]concat=n=2:v=1:a=1" -vcodec libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v 1400k -profile:v main -level 3.1 -acodec libmp3lame -b:a 128k -ar 44100 -metadata title="" -metadata artist="" -metadata album_artist="" -metadata album="" -metadata date="" -metadata track="" -metadata genre="" -metadata publisher="" -metadata encoded_by="" -metadata copyright="" -metadata composer="" -metadata performer="" -metadata TIT1="" -metadata TIT3="" -metadata disc="" -metadata TKEY="" -metadata TBPM="" -metadata language="eng" -metadata encoder="" -bufsize 500000k -threads 0 -preset superfast out2222.mp4
</code></pre>

<p>Info about my ffmpeg and about <code>55.mp4</code>:</p>

<pre><code>ffmpeg version git-2020-04-13-59e3a9a Copyright (c) 2000-2020 the FFmpeg develop
ers
  built with gcc 9.3.1 (GCC) 20200328
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfi
g --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libb
luray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --e
nable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-lib
twolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --
enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --e
nable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo
-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --ena
ble-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable
-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 42.102 / 56. 42.102
  libavcodec     58. 78.102 / 58. 78.102
  libavformat    58. 42.100 / 58. 42.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 77.101 /  7. 77.101
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '55.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2020-03-26T08:17:13.000000Z
  Duration: 00:04:29.12, start: 0.000000, bitrate: 1402 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709)
, 1280x720 [SAR 1:1 DAR 16:9], 1270 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 t
bc (default)
    Metadata:
      creation_time   : 2020-03-26T08:17:13.000000Z
      handler_name    : ISO Media file produced by Google Inc. Created on: 03/26
/2020.
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, flt
p, 127 kb/s (default)
    Metadata:
      creation_time   : 2020-03-26T08:17:13.000000Z
      handler_name    : ISO Media file produced by Google Inc. Created on: 03/26
/2020.
</code></pre>

<p>Info about <code>55.png</code>:</p>

<pre><code>    Stream #0:0: Video: png, rgba(pc), 305x432 [SAR 3778:3778 DAR 305:432], 25 tbr, 25 tbn, 25 tbc
</code></pre>

CC BY-SA 4.0
2020-04-15T22:05:05.580Z
post updated, added the code shown from video
das
CC BY-SA 4.0
2020-04-15T22:25:31.780Z
boss sorry, allow me to provide the info for the intro.mp4 made from ffmpeg, this is the one that prevents the compile to work
das
CC BY-SA 4.0
2020-04-15T22:38:17.763Z
Post updated sir sorry for the confusion, what am trying to do is create a intro.mp4 using the command line rather than opening sony vegas, everytime and then compile the intro with my 55.mp4, i just want to make intro.mp4 using command line and compile it with the final code i have
das
CC BY-SA 4.0
2020-04-15T22:53:04.243Z
Just use the image itself as an input, loop it, and concat it  yes please this is exactly what i want to do, i just want a 5 second intro using my 55.png then start my original video wich is 55.mp4  ffmpeg -i 55.png wait i wil post it
das
CC BY-SA 4.0
2020-04-15T22:57:41.230Z
post updated. added 55.png info
das
<ffmpeg>
Create 5 second intro from image and concatenate to a video
das
# Create 5 second intro from image and concatenate to a video

(Asked by: username_0 on 2020-04-15)

I want to make a 5 second intro from 55.png, and concatenate it to the beginning of 55.mp4. I would like to incorporate it into this command:
ffmpeg -y -i 55.mp4 -i intro -filter_complex "[0:a]atempo=1.15,volume=1.6,pan=stereo|c0
Info about my ffmpeg and about 55.mp4:
ffmpeg version git-2020-04-13-59e3a9a Copyright (c) 2000-2020 the FFmpeg develop
ers
  built with gcc 9.3.1 (GCC) 20200328
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfi
g --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libb
luray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --e
nable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-lib
twolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --
enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --e
nable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo
-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --ena
ble-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable
-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 42.102 / 56. 42.102
  libavcodec     58. 78.102 / 58. 78.102
  libavformat    58. 42.100 / 58. 42.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 77.101 /  7. 77.101
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '55.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2020-03-26T08:17:13.000000Z
  Duration: 00:04:29.12, start: 0.000000, bitrate: 1402 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709)
, 1280x720 [SAR 1:1 DAR 16:9], 1270 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 t
bc (default)
    Metadata:
      creation_time   : 2020-03-26T08:17:13.000000Z
      handler_name    : ISO Media file produced by Google Inc. Created on: 03/26
/2020.
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, flt
p, 127 kb/s (default)
    Metadata:
      creation_time   : 2020-03-26T08:17:13.000000Z
      handler_name    : ISO Media file produced by Google Inc. Created on: 03/26
/2020.

Info about 55.png:
    Stream #0:0: Video: png, rgba(pc), 305x432 [SAR 3778:3778 DAR 305:432], 25 tbr, 25 tbn, 25 tbc

**Tags:** ffmpeg

> **Comments:**
> **username_0**: post updated, added the code shown from video  
> **username_0**: boss sorry, allow me to provide the info for the intro.mp4 made from ffmpeg, this is the one that prevents the compile to work  
> **username_0**: Post updated sir sorry for the confusion, what am trying to do is create a intro.mp4 using the command line rather than opening sony vegas, everytime and then compile the intro with my 55.mp4, i just want to make intro.mp4 using command line and compile it with the final code i have  
> **username_0**: Just use the image itself as an input, loop it, and concat it  yes please this is exactly what i want to do, i just want a 5 second intro using my 55.png then start my original video wich is 55.mp4  ffmpeg -i 55.png wait i wil post it  
> **username_0**: post updated. added 55.png info  

---

## 2 answers

### Answer by username_1 on 2020-04-15. Score: 0 | Accepted answer

ffmpeg -y -i 55.mp4 -loop 1 -framerate 30000/1001 -t 5 -i 55.png -t 0.5 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -filter_complex "[0:a]atempo=1.15,volume=1.6,pan=stereo|c0

The intro needs audio to concat to the audio of 55.mp4 or else concat will fail. This example uses the anullsrc filter to generate silent audio. A short duration is declared because anullsrc duration by default is infinite. The concat filter will automatically extend this shortened duration to match its associated video segment.
The width, height, and aspect ratio of the 55.png is modified with the scale, pad, and setsar filters to match those of 55.mp4.

> **Comments:**
> **username_0**: 1 word excellent Bravo, 1 issue is the intro logo is to big,it enlarges to much can we have it fit center?  
> **username_0**: Can we have it centered like this https://i.imgur.com/DEsi9Fr.png  ,And look at your updated code image https://i.imgur.com/gFk7S2R.png  
> **username_0**: intro should be like this https://streamable.com/0sj61i  
> **username_0**: new update 100% correct, can you remove white background if not its ok since the image is png transperant it should be plain right ? if you cant its ok let me know thank you and yes you read my mind it is exactly how i want it.  
> **username_1**: @username_0 Provide a link to `55.png`.  
> **username_0**: https://i.imgur.com/v2fzSUS.png i also notice the video playback is 1x extra fast? can i tune it to be normal  
> **username_0**: https://streamable.com/rx4ye8 your video time 2:37 https://streamable.com/r1tv48 original video  go to time 2:56 and listen to sound playback compare  
> **username_1**: @username_0 That's due to your inclusion of `atempo=1.15` and `setpts=PTS/1.15` which I assumed you wanted to keep.  
> **username_0**: thanks sir, am compiling and tuning that line of code and testing which is better for me,sorry about that,can you remove the white background  
> **username_1**: @username_0 See updated answer. Most PNG with alpha wouldn't need premultiply filter, but yours does.  
> **username_0**: the audo how do to make it sound better just like original video no hissing noise higher audio quality  
> **username_1**: @username_0 Remove `volume=1.6` as the audio volume is probably clipping. This is becoming a never ending series of questions. I already answered the main question. The rest of these questions are not related to the main question of "how to add intro". You're supposed to make one question and it gets one answer. Then if you have another, separate issue you post a new question and it gets its own answer.  
> **username_0**: thank you @username_1 you was so helpful may god bless you  

---

### Answer by username_0 on 2020-04-16. Score: 0

ffmpeg -y -i 55.mp4 -loop 1 -framerate 30000/1001 -t 5 -i 55.png -t 0.5 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -filter_complex "[0:a]atempo=1.15,volume=1.6,pan=stereo|c0


---

