mifi / lossless-cut

The swiss army knife of lossless video/audio editing
https://losslesscut.app/
GNU General Public License v2.0
28.24k stars 1.37k forks source link

Add pause/black/title between segments #255

Open mifi opened 4 years ago

mifi commented 4 years ago

This was requested by email:

Simple divider between clips i.e. black screen and for how long. I've created a little blank video that I use for that for now.

The problem with this, as can be seen in https://superuser.com/a/576568/658247 - is that we need to exactly match all audio/video parameters of the black video with the existing files. Maybe it can be done with a combination of ffprobe and map those parameters to ffmpeg args, but it will surely not work for all files and codec parameters.

As a workaround, it might be possible to do this manually by creating a black ffmpeg video of length X and matching up all parameters:

# Note that if you also have audio, you have to do the same to the audio track (generate silence)
ffmpeg -t 2 -f lavfi -i color=c=black:s=640x480:r=30 -c:v libx264 -pix_fmt yuv420p output.mp4

Then one can take this file and concat/merge it with the other files using LosslessCut...

This has similarities with #126 because it's about matching codec parameters.

Edit:

tomiko23lol commented 2 years ago

I would also like to see possibility to simply and fast add black screen pause between clips. For example to add it to this menu like "add pause before clip", "add pause after clip" and with possibility to somehow change length of pause.

image