سؤال

I need to write a program that is a television like.

I will need to create 1 video form

e.g. 4 video files (lets say first video should be in top-left corner, second in top-right corner of the stream, etc.).

Also I'll need to add some scrolling text to the video and so on and so on...

So, the question is,

if there are any libs that could help me with that?

Thank you.

هل كانت مفيدة؟

المحلول

You question missed many details. Do you write cross-platform program? Or should it work on Windows or *nix only? Also do you have unlimited budget for possible libraries? Or are you looking for open source libraries? So...

From common sense you could use FFMPEG library which is crossplatform. If you can use Windows platform than you could use Avisynth, it provides really powerful scripting mechanism that allows you to combine multiple videos into one and you could add your own filters that add watermark or other kind of effects

نصائح أخرى

Not sure about libraries, and you also haven't mentioned the format of the video input files (I'll presume they are in a compressed format like H.264 since if they are raw that is just a subset), but I would need to do shis on Windows, I'd do the following:

1) Read and decoded the frames from the input files (either with FFMPEG or VFW) an then put the encoded data in a larger bitmap with the resulting size of the 4 screens

2) Since now it is a raw bitmap apply the text or whatever is needed using e.g. DrawText(http://msdn.microsoft.com/en-us/library/windows/desktop/dd162498(v=vs.85).aspx), to ease the use of WinAPI you could use some GDI wrapper library.

I guess one of the main pitfalls here is to properly synchronize the presentation times of the frames from different files, since they can all have different fps and time breaks so you can't just read frame by frame but you need to keep track which frame from which file is supposed to be presented at each step when applying the transformations you need.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top