Tutorial: How to delete the black frame at the end of a rendered .mp4

For some reason video editing programs tend to place a black frame at the end of the rendered clip. I really don’t know why, but that seems to be the usual thing. In my case that is kind of annoying, due to the fact, that I want to loop the video in unity.

After checking out several editing softwares, I ended up in the Ubuntu terminal:

ffmpeg, a command line video editor helps!

Use the first command to make your .mp4 to thousands of .jpg’s.

ffmpeg -i video.mp4 -qscale 0 scene%05d.jpg

By hand, you can easily delete the last frame…

With the second command, you can take all your frames back into a .mp4.

ffmpeg -framerate 25 -i scene%05d.jpg -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p newvideo.mp4

Than you end up with a mp4, without a black frame at the end! Such a nice work-around, Cheers!