1 Star 5 Fork 2

coderman / BPShortVideoSample

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

短视频录制demo

抖音、快手、火山小视频等一系列 App使短视频录制已经成功热门的功能。阿里云短视频 SDK、趣拍云 SDK、涂图 SDK、七牛短视频 SDK等市面上的短视频 SDK 均收费昂贵。 看到有人给我 star,请期待我后续更新,把代码抽离出来。

功能特性

  • 短视频录制
  • 不含第三方收费 SDK,使用 GPUImage 开源框架和科大讯飞免费的离线人脸识别 SDK开发
  • 支持延迟拍摄、录制中拍照、切换摄像头
  • 仿全民 K 歌,原唱伴唱切换,歌词滚动显示
  • 录制实时美颜,滤镜可调节参数、强弱程度
  • 实时切换背景音乐、调整音量
  • 音视频分离录制,防止黑屏
  • 录制断点续拍、多段合成(可实现回删功能)
  • 实时添加动态固定或人脸贴纸
  • 多视频合成
  • 多轨道合成
  • 上传后文件预览播放
  • 视频转码便于网络传输
  • 自己制作人脸贴纸、动态贴纸,png 序列帧配合 json配置 文件打包(可自主实现加密),简单易懂

操作界面

demo.gif

录制效果

product_demo.gif

人脸、动态贴纸制作格式简单说明

贴纸资源采用zip打包压缩制作,json文件配置,配置格式如下:

{
    "fixed_stickers": [
        {
            "sticker_directory": "flower",
            "filename_format": "flower_%zd",
            "frame_count": 100,
            "positionX": 0.5,
            "positionY": 1,
            "anchorpointX": 0.5,
            "anchorpointY": 1,
            "width": 540,
            "height": 200,
            "animation_duration": 5,
            "display_width": 1,
            "display_height": 0
        }
    ],
    "face_stickers": [
        {
            "sticker_directory": "cap",
            "filename_format": "cap_%zd",
            "frame_count": 25,
            "face_type": "head",
            "width": 330,
            "height": 220,
            "animation_duration": 3
        }
    ]
}
类型 参数名称 说明
固定贴纸/人脸贴纸 sticker_directory 贴纸资源所在目录
固定贴纸/人脸贴纸 filename_format 名称格式化
固定贴纸/人脸贴纸 frame_count 帧数
固定贴纸 positionX 坐标值x(取值0~1)
固定贴纸 positionY 坐标值y(取值0~1)
固定贴纸 anchorpointX 锚点x(取值0~1)
固定贴纸 anchorpointY 锚点y(取值0~1)
固定贴纸/人脸贴纸 width 贴纸原始宽度
固定贴纸/人脸贴纸 height 贴纸原始高度
固定贴纸 display_width 相对屏幕宽度的展示宽度(0为自动)
固定贴纸 display_height 相对屏幕高度的展示高度(0为自动)
固定贴纸/人脸贴纸 animation_duration 完成一次动画的时长
人脸贴纸 face_type 人脸识别类型(face、nose、head、mouth)
Copyright (c) 2018 bubue <hi@bubue.cn> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Face Filter Based on GPUImage, Short Video Recording, Face Sticker Examples. 短视频录制的一个例子,拥有美颜滤镜、人脸贴纸功能。 展开 收起
Objective-C
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Objective-C
1
https://gitee.com/coderali/BPShortVideoSample.git
git@gitee.com:coderali/BPShortVideoSample.git
coderali
BPShortVideoSample
BPShortVideoSample
master

搜索帮助