EasyDarwin / EasyPusher-Android

免费组件:简单、高效、稳定、免费的一款标准RTSP/RTP协议直播推送库,支持将H.264/H.265/G.711/G.726/AAC等音视频数据推送到RTSP流媒体服务器(例如EasyDarwin)进行低延时直播或者视频通信,支持Windows、Linux、ARM、Android、iOS等平台,EasyPusher配套EasyDarwin流媒体服务器、EasyPlayer RTSP播放器适用于特殊行业的低延时应急指挥需求! Android迁移到了https://github.com/EasyDarwin/EasyPusher-Android , iOS迁移到了https://github.com/EasyDarwin/EasyPusher-iOS

Home Page:http://www.easydarwin.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

推流设置带黑色背景框的时间水印不起作用

TomYang1985 opened this issue · comments

public void overlay(byte[] data, String txt) {
// txt = "drawtext=fontfile="+context.getFileStreamPath("SIMYOU.ttf")+": text='EasyPusher
// 2017':x=(w-text_w)/2:y=H-60 :fontcolor=white :box=1:boxcolor=0x00000000@0.3";
// txt = "movie=/sdcard/qrcode.png [logo];[in][logo] "
// + "overlay=" + 0 + ":" + 0
// + " [out]";
// if (ctx == 0) throw new RuntimeException("init should be called at first!");
if (ctx == 0)
return;
String txt2 = String.format(
"drawtext=fontfile=%s: text='%s%s':x=(w-text_w)/2:y=H-60 :fontcolor=white :box=1:boxcolor=0x00000000@0.3",
context.getFileStreamPath("SIMYOU.ttf"), "EasyPusher",
new SimpleDateFormat("yyyy-MM-ddHHmmss").format(new Date()));
// txtOverlay(ctx, data, String.format(OVERLAY_FORMAT,
// context.getFileStreamPath("SIMYOU.ttf"), txt));
txtOverlay(ctx, data, txt2);
}
image

@Wellsen @babosa

Is there a way to change the color of the overlay text?