1

I am using Ubuntu 14.04. How can I add an image at the end of a video from the terminal? For example, I have a video called input.mp4, and I want to add an image called input.png showing my Facebook and Twitter accounts to the end of that video and output the results to a new video called output.mp4. How can I do that from the command-line?

 ________                          ________            ________
|        |                        |        |          |        |
| input  |  add image at the end  | input  |  avconv  | output |  
| mp4    |  ------------------->  | png    |  ----->  | mp4    | 
|________|                        |________|          |________|
1

The easiest way to do this with ffmpeg is create a video with just the png file

ffmpeg -loop 1 -i input.png -c:v libx264 -t 30 -pix_fmt yuv420p picture.mp4

Note: -t 30is how long you want the image to be displayed for in seconds

Then combine the two into a single video

ffmpeg -i "concat:input.mp4|picture.mp4" -c copy output.mp4

Hope that helps!

Good luck :)

  • I just try this in Ubuntu 18 and the concat dont works.. – mlacunza May 27 '18 at 21:06
  • @mlacunza - This was for Ubuntu 14.04. Please start a new question if you're having issues with a later version of Ubuntu. – ThatGuy Jun 1 '18 at 10:20
  • Many commands work in all Linux and in most of the new versions, is valid my comment because it's an update of your post – mlacunza Jun 1 '18 at 14:42
  • @mlacunza - A valid point, but not relevant to the original post. Either edit the original question to include all versions of Ubuntu, then edit the answer to reflect the change, OR start a new question if you need help. – ThatGuy Jun 2 '18 at 10:46
  • Not relevant for you maybe, this answer is linked in many others threads, I'm just updated it and for that reason I use a COMMENT for it and not and ANSWER, bye – mlacunza Jun 2 '18 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.