Let's say I have a video, which can have any dimensions or codec (e.g. mp4), and I want to add 3 seconds of black frames to its head.
I have seen other variants to this question which pertain to adding a single frame, and also answers which specify the width and height of the video. However the video can be of any width and height and I don't want to change those values. Just add the black. In a separate command, I'd also like to add the seconds of black to the tail.
There should be no audio in the black section - the black should just be concatenated to the front and end. Also, I'd like to avoid re-encoding the video if possible, and copy the result to a new file.
Any help would be appreciated.