To Merge Images And Videos to One Video with Transition
Asked Answered
P

1

10

In Objective -C

Anyone has an idea to merge images and videos to one video with Transition effect..?

1)Images to one video it is possible but How to add Transition effect in that ?

2) Multiple Videos to one Video possible but...Images and Videos to one Video Possible with Transition?

If anyone has an idea let me know or give useful link and documents.

Thanks

Plantation answered 19/8, 2014 at 6:2 Comment(4)
even I have a same problem, someone please help us with thisSorilda
i am looking for this since last 6 months.will look forward for answer by someone.Tumblebug
Any One have get solution of this Question?Vesicant
If u find the answer then please upload ur code....Thank u.Toluene
E
0

Apple Provides library for video and audio editing library that is AVFoundation Please Refer that library

You can check the sample code for merging videos and also adding images on video on the below link

https://github.com/darcyliu/SampleCode/tree/master/AVSimpleEditoriOS

I the class AVSEAddWatermarkCommand you will find watermarkLayerForSize method which add text layer in the same way you can add image. use below method to add image.

you also need to understand the AVMutableCompositionTrack class this which is used in AVSEAddMusicCommand this will help you. you can use the same class to merge videos.

- (CALayer*)imageLayerForSize:(CGSize)videoSize
{
    // Create a layer for the title
    CALayer *imageLayer = [CALayer layer];

    imageLayer.bounds = CGRectMake(0, 0, videoSize.width, videoSize.height);
    imageLayer.contents = (id)[UIImage imageNamed:@"myimage.png"];

    return imageLayer;
}

I hope you will get your answer. still if you have any problem please comment it.

Edgar answered 19/8, 2014 at 9:31 Comment(3)
hi, In that we can't merge image and video.we can merge video ,audio,text,metadata.but can't add image to video.Supported Media type =AVMediaTypeVideo AVMediaTypeAudio AVMediaTypeText AVMediaTypeClosedCaption AVMediaTypeSubtitle AVMediaTypeTimecode AVMediaTypeMetadata AVMediaTypeMuxedPlantation
in that we can add layer(image,water text etc..) on video layer. in this way it is possible my following senario. First Display one image after some time video display then image like wise..Plantation
i want to merge images and videos. Display like SlideShow one image second video third image like wise.Plantation

© 2022 - 2024 — McMap. All rights reserved.