Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add watermark/sticker/text over video at specific time, location scale and rotation #27

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

pawaom
Copy link

@pawaom pawaom commented May 14, 2017

Fixes issue #.
  • This pull request follows the coding standards
    Add watermark/sticker/text over video at specific time, location scale and rotation

Can we add a feature for this project to be able to add watermark/ text on video between a specific time range, which can be rotated , scaled, and positioned according to user inputs,

This PR changes:

I am an android developer and came across this library when looking for trimming videos, now we need to add stickers, for that I have came across this
http://stackoverflow.com/questions/15475805/how-to-handle-stickers-with-resize-and-rotate-functionality/35739505#35739505

and the FFMpeg command would be this,
String[] complexCommand2 = {"-y", "-i", videoFilePath, "-i", imagepath, "-filter_complex","[1:v] format=bgra, rotate=30*PI/180:c=none:ow=rotw(30*PI/180):oh=roth(30*PI/180) [rotate];[rotate]scale=50:50[scale];[0:v][scale] overlay=40:10","-codec:a","copy", outputFilePath};

however , my problem arises how to pass the user input data from android to the ffmpeg command , If this feature is added to this library it would make it better

@pawaom
Copy link
Author

pawaom commented May 15, 2017

During further research I came accross these two articles

https://medium.com/uptech-team/how-to-create-snapchat-like-stickers-for-android-50512957c351

and

https://medium.com/uptech-team/how-to-create-beautiful-text-stickers-for-android-10eeea0cee09

these provide an explantion of the process to be followed and
this also

https://github.com/helloJp/Sticker

this project helps create stickers on images, it creates a canvas of the whole image and stickers and then creates a new bitmap out of it

this gave me the idea to create a canvas of the stickers and overlay it on the video with the ffmpeg command, the problem is to get dimensions of the stickers from user inputs

Are any of you guys who have participated in this request working on any thing , please comment so that I can add further inputs,

EDIT

for positioning video this is helpful
https://www.factorialcomplexity.com/blog/2016/12/11/adding-animated-overlays-to-videos-on-android.html

@saikiran143
Copy link

saikiran143 commented Apr 19, 2020

I have a matrix, which contains width and height and x and y and scale and angle. but i am unable to overlay image on particular postion with x,y,scale,skew (Everything is their in matrix), i need to implement matrix of float 9 values of image on video..

@ashish9718
Copy link

how to put image at a specific time in the video?
command for android?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants