前往
大廳
主題

【實況】OBS顯示時間、自定瀏覽器停駐視窗、多串流

漆野 | 2021-11-25 18:50:11 | 巴幣 0 | 人氣 2327

由香港IT9GameLog(sam0737)工程師編輯,發想來源是因為他弟弟實況主要加入時間功能,使用Html5+CSS編寫。

這代碼是為了在OBS Studio中嵌入現在的日期和時間而寫的。而且不需要安裝其他軟件或插件即可使用,只需要OBS Studio和原生的Browser Source輸入。

OBS > 來源+ > 瀏覽器來源 > 網址貼上以下語法

你一定會好奇香草是什麼。
Vanilla 香草是一個用於表示「一個事物沒有經過自訂的改動而仍然保留著它們預設的形式」的術語。

反正我們要看的地方是Examples

2017時間(網址已失效)
●Vanilla 香草
https://cdn.rawgit.com/sam0737/a0ee8ca253fc5c84b2aa2ac018f7b8ad/raw/108196e17c2c9d79ff60ed3bf788973ab94da9af/clock.html

●White text 白色文字
https://cdn.rawgit.com/sam0737/a0ee8ca253fc5c84b2aa2ac018f7b8ad/raw/108196e17c2c9d79ff60ed3bf788973ab94da9af/clock.html?style=font: bold 30px monospace; color: white;

●Rounded rectangle 圓角邊框
https://cdn.rawgit.com/sam0737/a0ee8ca253fc5c84b2aa2ac018f7b8ad/raw/108196e17c2c9d79ff60ed3bf788973ab94da9af/clock.html?style=font: bold 30px monospace; color: lightgray; display: inline-block; border-radius: 5px; padding: 2px 5px; background-color: rgba(0, 0, 0, 0.5);

●With US date formatting 使用美國格式
https://cdn.rawgit.com/sam0737/a0ee8ca253fc5c84b2aa2ac018f7b8ad/raw/108196e17c2c9d79ff60ed3bf788973ab94da9af/clock.html?style=font: bold 30px monospace; color: lightgray; display: inline-block; border-radius: 5px; padding: 2px 5px; background-color: rgba(0, 0, 0, 0.5)&format=MMM DD YYYY HH:mm:ss;


2021時間(新網址)

●Vanilla 香草
https://gists.rawgit.com/sam0737/a0ee8ca253fc5c84b2aa2ac018f7b8ad/raw/108196e17c2c9d79ff60ed3bf788973ab94da9af/clock.html

●White text 白色文字(年-月-日T時:分:秒+時區)
https://gists.rawgit.com/sam0737/a0ee8ca253fc5c84b2aa2ac018f7b8ad/raw/108196e17c2c9d79ff60ed3bf788973ab94da9af/clock.html?style=font: bold 30px monospace; color: white;

●Rounded rectangle 圓角邊框(圓角底框+年-月-日T時:分:秒+時區)
https://gists.rawgit.com/sam0737/a0ee8ca253fc5c84b2aa2ac018f7b8ad/raw/108196e17c2c9d79ff60ed3bf788973ab94da9af/clock.html?style=font: bold 30px monospace; color: lightgray; display: inline-block; border-radius: 5px; padding: 2px 5px; background-color: rgba(0, 0, 0, 0.5);

●With US date formatting 使用美國格式(圓角底框+英文月份 日 年 時:分:秒;)
https://gists.rawgit.com/sam0737/a0ee8ca253fc5c84b2aa2ac018f7b8ad/raw/108196e17c2c9d79ff60ed3bf788973ab94da9af/clock.html?style=font: bold 30px monospace; color: lightgray; display: inline-block; border-radius: 5px; padding: 2px 5px; background-color: rgba(0, 0, 0, 0.5)&format=MMM DD YYYY HH:mm:ss;


●我個人的格式
2021-XX-XX 英文星期 時:分:秒 AM/PM

OBS>瀏覽器來源>網址貼上以下語法,寬180、高120

其他詳情CSS語法
 角1 角2
    口
 角3 角4

 border-radius: 圓角值px;(如5px;)
 border-radius:角1 px 角2px 角3px 角4px;(如10px 50px 150px 100px;)

 YYYY=年、MMM=英文月份、MM=數字月份、DD=日
 ddd  =Sun/ Mon/ Tue/ Wed/ Thu /Fri/ Sat
 dddd=Sunday/ Monday/ Tuesday/ Wednesday/ Thursday /Friday/ Saturday
 h=時(12小時制,如7)、hh=時(12小時制,如07)
 HH=時(24小時制,如早上顯示7點;晚上顯示19點)
 mm=分、ss=秒、A=AM/PM
 字體粗細:
   normal - 這是預設值,可以不用設定。
   bold - 這就是粗體字型。
   bolder - 更粗的字型,不過用起來跟 bold 似乎沒什麼差異。
   lighter - 細體,不過與 normal 沒什麼差異。
   數字 - 可以設定的有 100、200、300、400、500、600、700、800、900。
 字體大小:輸入數字px.。
 字體:字體類別
   通用字體共有五種
   serif (襯線體), sans-serif(無襯線體), monospace(等寬體), cursive(草書體) 和 fantasy(幻想體) 。
 字體顏:Colors 類別
 background-color背景透明度改法:
 background-color: rgba(0, 0, 0, 0.5)、alpha、transparency

https://gists.rawgit.com/sam0737/a0ee8ca253fc5c84b2aa2ac018f7b8ad/raw/108196e17c2c9d79ff60ed3bf788973ab94da9af/clock.html?style=font: bold 30px monospace; color: AliceBlue; display: inline-block; border-radius: 5px; padding: 2px 5px; background-color: rgba(0, 0, 0, 0)&format=YYYY-MM-DD   dddd h:mm:ss A  




停駐視窗

打開obs→「檢視」→「停駐視窗」→「自定瀏覽器停駐視窗」→跳出設定的視窗→
輸入「停駐視窗名稱」及「貼上URL」套用→關閉→自訂的停駐視窗出現

#創作者儀錶板→實況管理工具→跳出顯示→即可顯示下方網址

編輯實況資訊頁面:
https://dashboard.twitch.tv/popout/u/你的TwitchID/stream-manager/edit-stream-info

快速操作:
https://dashboard.twitch.tv/popout/u/你的TwitchID/stream-manager/quick-actions

聊天室:(關注別台聊天也可以輸入對方帳號,Youtube則無法留言只能觀看聊天室)
https://www.twitch.tv/popout/你的TwitchID/chat?popout=




多串流,下載後丟到OBS路徑底下

送禮物贊助創作者 !
0
留言

創作回應

更多創作