Selon Jeff Sack <[EMAIL PROTECTED]>:

> Absolutely.  Thanks Mark.
>
> I'm pretty new to this API, so I may have a couple more questions as I
> progress...
>
> I am guessing this will be easiest if the two sources are identical in
> framerate, resolution, etc, so I will assume that for now.  Still, there may
> be some cropping/resizing needed to squeeze the two frames into each output
> frame.  Also, I will skip audio for the time being to keep things simple.
>
> Are there any samples or tutorials that might help with demonstrating how to
> copy a portion of frame data from a source to a target frame?  How about
> resizing frame data before copying it to a target frame?  I'll learn this
> API by looking at tons of code, so I'd like to know where is the best place
> to start.
>
> I am curious if there are any companies/individuals that offer a service for
> custom ffmpeg development in case this proves to be more involved.  Do you
> happen to know?
>
> On Mon, May 5, 2008 at 5:20 AM, Mark Heath <[EMAIL PROTECTED]> wrote:
>
> >
> > On 05/05/2008, at 6:51 AM, Jeff Sack wrote:
> >
> > > I would like some advice on how I might go about programmatically
> > > producing
> > > one video from two videos via the ffmpeg APIs.  The output video
> > > should be
> > > the two source videos positioned side by side (both audio and video
> > > synchronized).  Is this possible?
> >
> > This is not possible within the library, however you can decode the
> > audio and video, do the required processing (mix the audio and
> > concatenate the video frame) and then re-encode it to a new file.
> >
> > Does this make sense?
> >
> > Mark
> > _______________________________________________
> > libav-user mailing list
> > [email protected]
> > https://lists.mplayerhq.hu/mailman/listinfo/libav-user
> >
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user
>


Hey Jeff,

I've worked on a project that needed to integrate video-mixing and my group of
developpers had to mix two audio/video streams to make only one.

The way to do it is to decode both streams, mix them, and encode the new audio
and video streams. FFMPEG does a lot of work for you, but not all of it.

For audio, mixing the two streams is pretty easy, google it and you'll find some
answers.

For video,
> How about
> resizing frame data before copying it to a target frame?

The Swscale library in ffmpeg can do it for you pretty fast and even change the
frame's format (we used it to change from YUV to RGB and vice-versa as well as
resizing)

>  how to copy a portion of frame data from a source to a target frame?
I don't think that with RGB frames it is very hard to copy a portion of a frame
to another. For YUV (most encoders use this format for encoding/decoding)

however, I do not know if there are better ways to do the mixing.

JF


_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to