网课整活小记:OBS虚拟摄像头、Live2D、虚拟桌面……
网课整活小记:OBS虚拟摄像头、Live2D、虚拟桌面……

网课整活小记:OBS虚拟摄像头、Live2D、虚拟桌面……

Tags
OBS
整活
Created At
Apr 14, 2022

OBS介绍

OBS(Open Broadcaster Software)是由OBS Project开发的自由开源推流和录像程序。
你可以在Download | OBS (obsproject.com)下载相应软件,微云镜像
在本场景中,我们只需要虚拟摄像头,无需录像或推流。
界面大概是这样的:
notion image

添加小钟表

效果:
创建clock.html,将以上内容复制。
OBS中新建→浏览器,输入以下地址
https://file-cdn.qmcmc.cn/static/clock.html
notion image
notion image

樱花飘落

https://file-cdn.qmcmc.cn/static/sakura.html
notion image
宽高设置为1920x1080,置于顶层,覆盖屏幕。

赛博全息地球

如果弹出一些窗口,可以点击互动并关闭
notion image

国际空间站直播

https://live.bilibili.com/14047 https://www.youtube.com/embed/86YLFOog4GM

虚拟桌面

首先,你需要一个纯色背景的桌面或桌布,最好为红、绿、蓝色,且确保衣着不含该颜色以免成为赛博透明人。
notion image
添加视频采集设备→滤镜→色值→关键颜色类型,然后调节相似度,直到隐去桌面。
将需要的图层置于视频采集设备以下。
效果
notion image

自动念诗

原理:从Hotokoto每30s自动更新到文本
notion image
Python源代码
import requests, os, time while True: url = "https://v1.hitokoto.cn/?c=i&min_length=16" try: response = requests.get(url).json() file = open('p.txt','w',encoding='utf-8') file.write(response['hitokoto']+"\n"+response['from_who']+" 《"+response['from']+"》") file.close() except: print ("Error") print(response) time.sleep(30)
创建p.txt,然后在OBS中添加文本(GDI+)2,字体建议选手写体,这里用的是Zhi Mang Xing

Live2d

面部捕捉实现:Live2DViewerEX
效果(
notion image

最终整活效果

notion image

实时字幕生成

📹
Mark:
OBS实时字幕生成