Overlay while recording video?
developerandroid123 opened this issue · 18 comments
Can we add overlay like text,image or video while recording ?
I am not able to get any hint about overlay from #11
i also want overlay
i read that documentation and code, now where should is i place it? in resumeRecording() function? im not getting it
can anyone please help who successfully completed it?
@CrazyOrr, needs your help
How do i implement following code in this project:
drawtext="fontsize=15:fontfile=FreeSerif.ttf:text=LONG_LINE:y=h-line_h:x=-50*t"
this is drawtext property of ffmpeg, how do i implement this?
after searching i found THIS.
but i dont know where to add this command in this project so that text will be added to video.
Thanks!
Check out FFmpegFrameFilter
used in VideoRecordThread
, there are 'transpose' and 'crop' filters used in this project already as examples for you.
Thanks for your response!!
I see in code, you apply filter like this :
List<String> filters = new ArrayList<>();
String transpose = null;
transpose = "transpose=cclock"; //cclock is a filter
//then you add filter like this
filters.add(transpose);
FFmpegFrameFilter frameFilter = new FFmpegFrameFilter(TextUtils.join(",", filters),previewWidth, previewHeight);
List<String> filters = new ArrayList<>();
String drawtext = null;
drawtext = "drawtext=fontsize=15:fontfile=FreeSerif.ttf:text=LONG_LINE:y=h-line_h:x=-50*t";
//then apply text like this
filters.add(drawtext);
FFmpegFrameFilter frameFilter = new FFmpegFrameFilter(TextUtils.join(",", filters),previewWidth, previewHeight);
UPDATE
In drawtext
documentation of ffmpeg they wrote that :
To enable compilation of this filter, you need to configure FFmpeg with --enable-libfreetype.
Yes, according to this, --enable-libfreetype
has already been configured for building this FFmpeg library. If not so, try again with the latest version of JavaCV or build it by yourself.
okay thanks, can you then please help where i place this code, i tried with code that i posted here but it results in force close.
It crashes with Fatal signal 11 (SIGSEGV), code 1, fault addr 0x18 in tid 24319
now.
Refer to this issue of JavaCV.
Same error for me and I didn't find any solution there. that issue is for building JavaCV with libfreetype but this project is already configured for that, its a confusion now
got same error when use :
overlay
error:
android A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x18 in tid 320 (Thread-24542)
UPDATE:
I tried it with latest version of JAVACV by changing the version in dependencies and got the same error.
maybe I'm doing some syntax error I think.
yes in command line its working fine, I tested in Ubuntu