How To Add Date And Time On Video - 100% FREE WITH OBS STUDIO
ฝัง
- เผยแพร่เมื่อ 20 ส.ค. 2024
- Scott explains how to add date and time on video using OBS Studio. This 100% free software provides two ways to accomplish this task. One is to use the Datetime digital clock LUA script and the other is to use OBS Studio's built in chroma Key functionality when adding a Window Capture source.
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
WAIT TILL YOU SEE THESE KILLER FREE ANIMATED SUBSCRIBE BUTTONS.
I spent five long days learning how to make subscribe buttons in Blender.
The animations are KILLER, and I made 10 of them for you COMMERCIAL FREE.
Get Them Here ➤ scottfichter.c...
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
---------------------------------------------------------------------
Download the Datetime digital clock Script
---------------------------------------------------------------------
obsproject.com...
---------------------------------------------------------------------
LUA Date Time Script Commands
---------------------------------------------------------------------
%I:%M %p - %A - %B -%d, %Y
----------------------
Outtro Song
-----------------------
• 30 min of funky loop
-------------------------------------------------------------------------------------------------------------------------
Wanna Learn About More Tech That Will Help Your Channel? CLICK BELOW
------------------------------------------------------------------------------------------------------------------------
www.youtube.co...
■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■
■ SURF SCOTT'S GEAR & WHAT HE DESIRES FOR THE FUTURE ■
■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■ □ ■
▪► rebrand.ly/Lig...
▪► rebrand.ly/Cam...
▪► rebrand.ly/Mic...
▪► rebrand.ly/Com...
catobs
I have have optimized my previous script changes.
The function script_description, I have added %dx to provide the option to add the th,st,nd,th to the day and added the timezone %z and %Z
copy and paste the following code segment to replace the existing function
function script_description()
return "Sets a text source to act as a clock when the source is active.\
\
The datetime format can use the following tags:\
\
%a abbreviated weekday name (e.g., Wed)\
%A full weekday name (e.g., Wednesday)\
%b abbreviated month name (e.g., Sep)\
%B full month name (e.g., September)\
%c date and time (e.g., 09/16/98 23:48:10)\
%d day of the month (16) [01-31]\
%dx day of month with st,rd,th,nd (01st) [01-31]\
%H hour, using a 24-hour clock (23) [00-23]\
%I hour, using a 12-hour clock (11) [01-12]\
%M minute (48) [00-59]\
%m month (09) [01-12]\
%p either \"am\" or \"pm\" (pm)\
%S second (10) [00-61]\
%w weekday (3) [0-6 = Sunday-Saturday]\
%x date (e.g., 09/16/98)\
%X time (e.g., 23:48:10)\
%Y full year (1998)\
%y two-digit year (98) [00-99]\
%z timezone (0600)\
%Z timezone (Mountain Standard Time)\
%% the character `%´"
end
I have also modified the set_datetime_text function to accommodate the new %dx
copy and paste the following code segment to replace the existing function
function set_datetime_text(source, format)
if string.find(format, "%%dx") ~= nil then
local s = "thstndrd"
local i = 0
local d = os.date("%d")
if d[-1] == '1' then
i = 2
elseif d[-1] == '2' then
i = 4
elseif d[-1] == '3' then
i = 6
end
format = format.gsub(format, "%%dx", "%%d"..s.sub(s, i, 2))
end
local text = os.date(format)
local settings = obs.obs_data_create()
obs.obs_data_set_string(settings, "text", text)
obs.obs_source_update(source, settings)
obs.obs_data_release(settings)
end
killer!!!! Thank you!
The Actual Code is in the discussion page of the script...Thank You.
@@AnuvabSpeaks im copy and paste and didnt work
Is there a way to make the text instead of horizontal vertical?
Like
this
Hi Scott - I ran into a problem and here is how I solved it:
Copying/pasting the text from the script with Ctrl-A, Ctrl-C and Ctrl-V into a txt-file and subsequently renaming the file extension to .lua, did not work. Regardless of the extension one artificially adds, it remains a text file.
However, if, when positioned on the script, one right-clicks and "saves the PAGE as" "All Files" (and so NOT as a Text Document), then the .lua characteristics are maintained. And by the way, there is no need for renaming afterwards, either. Hope it may help some other users as well. Jos (Windows 10 environment).
Thanks for posting the solution. Best wishes
yeah ! it is working .......it was name of text which is need to be same as text source ......good work Scott...And thanks
Your solution is the proper one, Scott did it in a roundabout way. The reason it worked for him and not you is because he is showing file extensions on his computer, and you are not. Most tech people turn this on. What happened to you is you ended up with a file named datetime.lua.txt (but you couldn't see the .txt).
@@mikefarrington7141 Thanks! What I needed. I didn'tbunderstand what "when positioned on the script meant.
thanks bro
spent an hour trying to open the .lua script in mac at 4:42, writing this in case anyone else gets stuck - copying the script into textedit on mac doesn't save as .lua even if you rename it so obs won't recognise this file. to fix this download another text software (i used sublimetext) and if you rename that file it ill save as .lua and be loaded in :)
thank you man, i was disappointed but you saved me!
A neighbor just had their car ransacked so I set up a makeshift security camera with an old webcam and OBS. This video was a big help thank you!
This video is my go-to every time I need to set OBS up on a new computer. Thank you for the 40th time.
As an OBS user TH-camr, this is a good channel for OBS troubleshooting solution
thx
Thanks for the script Scott. As it stands, the script forces the time to be US local time, to change that, say for us BRITS, REMOVE THE LINE:
local time = time - (60*60*11) + (60*60*time_offset)
Or edit it to suit your local time.
For anybody having trouble turning the TXT file into LUA, your folders might be set to hide extensions for KNOWN files. Control Panel > Appearance and Personalization > File Explorer Option > View, under the Advance Settings you'll see Hide extensions for known file types, uncheck then apply. TXT files will now turn into LUA files when you rename them.
THANK YOU!!!!!
Your channel has become so awesome. Your tips and suggestions always help me out.
Thanks Scully!
Excellent video! Very easy to follow and to the point.
Got me up and running with a customizable date and time display for my OBS layout in just a few minutes. Thanks a lot!
Glad it helped Shiny. Stay Strong and Keep Fighting.
Excellent video. Followed the instructions and it worked. Love how controllable the formatting is.
the LUA tutorial was extremely helpful after the web link clock version I was using stopped working. Thank you!
Glad it helped!
In the LUA script, Line 111, change "source_id = obs.obs_source_get_id(source)" by "source_id = obs.obs_source_get_unversioned_id(source)", will fix the selector problem
THANK YOU!!!!!
I have looked and print it out and still can not find "source_id = obs.obs_source_get_id(source)" to replace with "source_id = obs.obs_source_get_unversioned_id(source)"
UPDATE: After looking over the print out I did find it. Will let you know if it will work, Thanks, KR222.
@@conspiracies1014 Did it work?
@@Pixiuchu Yes the date and time worked, but the add on Script line 111 did not work for me. I tried for about three hours and gave up. Good Luck. NR222.
Thank you big time, I've been seeing it on tv and wondered how they did it but walla! You've taught me that. Thanks again
Rock on Deejay!
ik this is lazy but i actually just open google and looked up my time zone, copied the link and opened a browser in sources and paste it after that i cropped the excesive stuff i didnt need till i had the time only after that i used a filter on the browser and applied a color key and choose in my case white after that i had a time cx
Yup, there are so many ways to skin the cat with OBS. Thanks for posting your method.
You did it again at 2:13 Scott! LOL!!!
HA HA HA HA! There's much more where that came from Chuck. HA
I've been trying to get this rigged up semi-proper for months now.
Thank You! I've got the Date/Time in my Favorite/Most Streamed Game's Font now! ^-^
Glad I could help!
Very awesome and informative video. I see it is so much you can do with OBS. Whenever I start to go live again I will for sure check will look into this. Also I see you are almost at 10K congratulations. Much love to you always!
Thanks Turtle - I want to record the flip to 10K but I think it'll happen at 4AM in the morning. UG!
Trying to emulate Geek Tools for Mac. My biggest want was to have a 50% opacity black background. The HTML overlay in OBS does not allow that, at least I was not able to code the opacity in. The LUA process in this video gives ver, very nice results. Legal video, depositions, date/time stamp.
Awesome video! You just improved my game in a big way. I've been trying to figure this out for a long time. Thanks, Scott!
Hi Scott, just say thanks for the time Stamp using the Lue script, great and easy for a 71 year old git ha ha ha
Awesome Graham! Stay strong brother.
Thank you Scott! I have been trying to learn how to add time and date to OBS ever since Covid hit and I had to take my deposition business online.
Welcome.
@@ScottFichter Thanks, I'm looking forward to watching your videos.
Thank you so much Scott. Now, I already knew how to put timer in my OBS studio. God bless you!
Happy to help! Free Life!
Thank you, Sir. You are a man of genius.
Thanks dude!
u r the best teacher !!!
Thank you so much for the help! This is gonna come in handy for make-shift security cam setups.
Thank you Scott for your help. I learn a lot from your video.
Another great video!
Thank you!
Glad you enjoyed it!
Thank you for your video. It helped me a lot!I like also the outro Song!
You're welcome Andree.
for those who want to change day language displayed to french, I added this to line 13 (before "-- Function to set the time text" ) :
-- Set the locale to French
os.setlocale("fr_FR.utf8")
or for german :
-- set our own "time" locale setting
os.setlocale("de_DE.UTF-8", "time")
(check comment #27 of the obs thread linked in description)
Another awesome video Scott. Keep them coming
Marcus I appreciate buddy. I'm committed to the venue..
You are the best !!!!!!!
Greetings from Grece :)
thanks alot man.totally love your videos from East Africa
Did the first one. Was very easy. Thanks.
GThanks you for all of the great tutorials! I added the date/time script and set the format as described here. Now my text is blinking and I cannot figure out how to make that stop. It is probably an easy fix, but I could not find how to do this.
Thank you for the great help. I was looking for such a plugin.
Glad I could help! Good fortune!
Thank you scott :D your channel is so helpful
Happy to help!
gratz on 10k subs
THANK YOU Jodofly!!!!
Thanks a lot for this video, everything is clear now.
I already had a clock for my streams in OBS, using a web page I built and hosted on my website, but I'm going to try the lua script so it doesn't have to go to my website all the time. Though it's not exactly resource or bandwidth heavy thing.
I do have another part that constantly updates too, target for what I'm looking at with my telescope. That gets updated via a form on my website. Seems a little easier than changing text in obs when needed.
hi scott i want to ask something from u, could u tell me how do u set u timer along and music ?while live streaming , i wanna make study with me videos .. in which videos go along
The easiest way is to make a video with a green background with a timer countdown in the left or right side then add your audio track to that video. Then import that video and make the green background transparent. BOOM! Now you have a song playing with a countdown timer that is the exact length of the song. The video can be placed on top of any source because the green background will be invisible.
Very helpful ! Thanks a lot !!
Glad it helped!
You are an amazing man, this was helpful
Thanks Clovis. Stay strong and keep fighting.
Hi Scott , I am a Chinese , and I also ran into a problem and here is how I solved it(I am a high school and my English isn't very good.Hope you can understand)
I found that I can't add 'datetime.lua' to scripts in OBS after I totally obeyed what you did. And then , I found that it is putting ‘datetime.lua’ in a Chinese characters-named folder that caused my failure in adding it to scripts in OBS.
Hope my way in sloving this problem would help others.
Thanks Louis! Your english is terrific! 保持堅強並保持戰鬥
thank you, it's very helpful content!
Glad it was helpful!
Thank you so much, this guide was very helpful!
You're super welcome
Thank you!
You're welcome!
Thanks, now I can show time on my streaming 😍😍
excellent
THANKS SCOTT
I'm using OBS v26.1.1 and in Tools->Scripts I can't select Text Source (same as explaind in this video). If I write name directly it works.
To fix this Text Source selection I have change line 111 from
source_id = obs.obs_source_get_id(source)
to
source_id = obs.obs_source_get_unversioned_id(source)
And then I can select Text Source.
Regards.
great comment, thanks
thanks for the vid it help me to set my time :)
Thanks for sharing Scott. Any chance we could get an update video on this? And if you could mention mac that would be so awesome. Thank you -🙏
many thanks! u r the best
Thank you very very much 😄😄
Welcome 😊
Thanks dude it was really helpfull. I learned a lot in this video
Thank you so much for this simple tutorial
You’re welcome 😊
Yes, It did work.
Good man.
Good, clear explanation. Thanks!
Glad it was helpful!
If you're using a browser source, you can just set the background to be transparent and then you won't have all the issues with using the green screen features.
YES!
Another excellent video next time 10k Scott
Thanks Eagle. I really appreciate your support buddy.
Helpful video. Thank you!
Glad it was helpful!
Not sure if some one said it or not.. You can always right click on the click to down and chose save link as.
Thx Mars
Great video and explanation!
Thank you!
etikas looked so great
Nice tutorial Scott ✌👍
Thanks Andy.
Thank you, it really helped me a lot. But is there anyway to change the time? For ex. I am in the UK but I want to change it into New York Time.
I have to refresh the script every time I re-open OBS. Otherwise the clock is stopped and static on the date/time when I last quit OBS. Not a big deal, it's kinda like kicking the motor to get it to turn over.
Hi there. This Video is very useful and thank you for it. I wonder if I can change the language for the date and name of the month?
do you know how to change the colors of the numbers from a website when they go up and down? like up it would be green and red for down
Yes, you could probably pull that off with a color correction filter.
Very Very Very useful,, Thank you, Thank you, Thank you, Thank you, Thank you, Thank you
You are most welcome
Hi Scott, thanks for making a video on "Date & Time" for the videos and for the live stream .
I came across a small program called SNAZ, through which , we can set Date, Time, Count Up and Down. If possible make another video on that, please. Thanks.
I will check it out
Love your vids Scott. No messing about, to the point and great for learning. I really like the HTTP Chromakey method and I have a question about that. If I have other browser windows open, and I jump to one of those other windows while broadcasting won't the clock disappear and be replaced by whatever is on those other windows? And how do you get around that? Thanks again for all the tips and tricks!! Love the channel.
Excellent question! I say this because I didn't know myself, and I uncovered something very cool. Let's say you have a browser with two tabs, one with the clock and one with a video on it. Your goal is to bring both Chrome tabs into your stream. The OBS "Window Capture" source has that pulldown that allows you to choose what program to show. You will only see "Chrome" as a choice. You do not have the option to select a tab. The solution is to grab the tab and drag it out of Chrome, so two instances of Chrome are created, not two tabs two instances. When you go back into "Window Capture," it will then show you both chrome windows. Wow!! I might make a video about this!!!!
@@ScottFichter Nice one Scott! How cool is that!!!! Hey....what works really good also is, rather than using a "Window Capture" source to grab the time.is website, use a "Browser Capture" source instead.....and then, rather than choosing Green in the Chroma Key filter choose a custom color and choose white instead!!!! Then just go ahead and make the color adjustments as you demonstrate in your video and you end up with all your times..........and you don't even need to keep a Chrome, or any other browser window even open!!!! You can close down all your Web windows and the time remains captured via the Browser Source!!!! As I said, LOVE the channel!!!!!
THANKS BRO YOU CRASHED ROBLOX!
Thank You so much!!! This helped me alot!
Glad it helped!
Lol if I wanted to watch an old guy get befuddled by LUA, I’d go watch my mirror. 🤣
Great video topic. Thanks!
😁
wow || Thanks a tonnes dude
Happy to help
@@ScottFichter Marvelous Man, Will Grow Together
dratzz! i tried to cheat and add the lua extension when saving str8 from notepad and it flunked me.. when will ii ever learn. Thanks for all the help. 🔔👍
Thank you very much
You are welcome
Awesome video! Thanks. Question: how can you add an interval timer to obs (for fitness classes)?
Hmmm, interval timer. Can I assume that the timer beeps every say 2 minutes or something similar?
Yes. Like 30 sec work with 10 rest then repeat multiple times.
A timer counter can I start and show onnthe screen seconds.. Min... Hours..
Yes
Hey Scott! THAT was informative. I don't normally use OBS (to cumbersome, in my opinion) but I know it has a ton of advantages over other projection apps. Guess I'll be drilling down into some of your content on this subject. You may change my mind.
Glad it was helpful!
10:46 Hi Scott. Is it me or does the Color Correction filter no longer have a color property? When I add the color correction filter, there is no color property. The last property is Opacity. I'm running OBS 27.0.0-rc1 (64 bit)
What??? No way... Ok... I'll have to take a look at it.
Hi Scott another great tip thank you. I set up 3 copies of the lua files, 1 for time, 1 for day and 1 for date... so I could arrange the three on just above each other with text aligned centrally in each source, and so I could have the time slightly larger than the rest. Is there an easy way to align all 3 source boxes relative to each other? Or is it just by eye?
I do it by eye but there has to be a way.
thank you sooo much
You're welcome!
Great videos! I just inserted a countdown in the opening. I looked like a Superstar! I'm now working on inserting song stanzas and chorus each as an image into a source. Is there a way to, not group, but nest these as one scene nested into another scene. Kind of like making lower thirds.
Great job!
You can nest scenes within scenes. Have a look at this feature and see if it is what you want to do. You can also create slideshows with automatic operation or manual using hotkeys.
@@gregorybell9912 thanks, I created a slideshow and used hot keys. Easier than it looked.
@@dwgun310 Keep an eye on slide file size because larger files will limit the number of slides recognized within a slideshow file list.
@@gregorybell9912Okay thanks. Im only using text, saved as .PNG. I don't think it'll ever be more than 10 slides, but thanks for the heads up.
Thank you
You're welcome
OMG, that script looks like Visual Basic. I don't use OBS but still an interesting video!
It's LUA have you dabbled with it?
@@ScottFichter I have not worked with it but the BEGIN and END blocks syntax is the same in Visual Basic
thx
You're welcome
sorry, I am really not very tech. i video amateur rugby games and it would be useful to have a clock to count up/down to 40 mins, i cant work out what i need to download and from where to do this on my OBS. can you help?
I get to seeing the script file open and the script but no options below that, the end of the script says No properties available
Why does this script not use the meta data of the video? It shows the existing date and time....
please I could not complete the process because I do not get it where you down loaded what you copy on the OBS website and I got stock. Please if you can share that portion of where paste the information you copy from OBS website will be great.
Thank you
I didn't understand the "Text source" in OBS scripts, what should I type there?
Thank you
You need to first create a text source. Create your text. When you keep the wording simple so you can remember it. Then when you open the LUA script there's a pulldown in most cases the pulldown will allow you to select the text source that you just created, if not, you need to enter the name of the text source. Upon doing that correctly the text sournce will switch to the countdown timer. Does that make sense.
Hi how can I save the script on MacBook as it doesn’t not have option for text document.
The script is just text. Simply copy and paste it into a text file and save it. It's not a big deal. You can use anything that saves text.
thank you
You're welcome
Stupid question, does the time and date come from the system set time date or are you able to manually adjust time and date? Basically what I wanted to know is can this time and date be manipulated?
I'm almost sure the answer is yes. What are you looking to accomplish by adjusting the time? Are you looking to display multiple time zones?
@@ScottFichter it’s a bit of a strange situation, we are using obs software to record a projectile being fired across a tube and then working out the force applied in a pharmaceutical environment. I’ve been tasked with validating the method. The biggest issue I’m having is, with the software overwrite check box under advanced settings. I need to ensure analyst cannot overwrite unwanted data or if data manipulation has occurred a reviewer is easily able to identify this. I tried to test whether I could lock this feature out but couldn’t find a way to do it. The next best way is to actually have time and date stamp on the video itself as this will enable us to see when a test is done and if there is a big gap between tests it would indicate possible over written data. The key point is though we need to ensure the time stamp on the obs takes its time from the laptop (which is locked by our internal regulations and cannot be manipulated meaning the it is compliant). If however the obs time stamp is self adjustable this would fail our IQOQ tests.
Hi. Im looking for an Anolog Clock for OBS. Any recommendations please?
Hmmmm... I will look into this for you. When the video gets produced I will give you a shoutout.
so im using windows 10 and trying to follow on with this but to access the code originally i made it by default open with notepad, i continue to try change the new .txt into .lua but my pc doesnt allow me to change it from .txt into .lua is there a way around this???
Hello, is there a way to set the clock in another language than english please? Thank you
Hello scot, Facebook is blocked in our country therefore streaming with obs became hard yet i really want to keep my Facebook community engaged, how can I do it to stream freely?
Paul, so Facebook is blocked but you want to keep your Facebook community engaged? Did you mean to say that Facebook streaming is blocked?