Add a short video to beginning of existing video WITHOUT REENCODING..?

1

is it possible to add an image or short video to the beginning of an existing video WITHOUT REENCODING?

Disclaimer: I am aware that not all video formats support concatenation without reencoding. Let's assume we are only talking about video formats/containers that actually allow concatenation.

I know it is possible, because I concatenated videos before. The problem is, in this case I don't control the codec, resolution, or basically anything of the existing video.

In principle I would need to read the video information (resolution, codec, etc.) of the existing video and then create my short video with those settings. The question is, what factors are impossible so concatenation will work? Do just the codec (h264, h265, webm, etc.) and resolution have to be identical? Or something else? I assume there is no flag in ffmpeg to tell it to encode a new video exactly like an existing video so concatenation works?

In the case of appending single images to an existing video: does this work at all without reencoding?

user3185993

Posted 2019-07-18T20:34:45.633

Reputation: 11

Welcome to Super User! My first question on here many moons ago may be helpful/related: https://superuser.com/questions/931969/specifying-parameters-to-create-videos-for-ffmpegs-concat-demuxer-to-avoid-a-l

– bertieb – 2019-07-19T00:08:37.377

Thanks. I read the post twice but I think I didn't understand everything. Did you finally manage to understand and fix your problem? Doesn't sound like it, right? So this also means I have no luck with my problem? – user3185993 – 2019-07-19T10:34:56.250

For people to help with your problem it would make sense if you uploaded a "minimal testcase" for people to download. With that I mean a short video file and the steps (ffmpeg commands etc.) you take to slice parts out, do the transition and put the parts back together. Just the absolute basic steps on the command line not including python scripts etc. – user3185993 – 2019-07-19T10:40:51.983

No answers