VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Member
    Join Date
    Aug 2011
    Location
    Earth
    Search Comp PM
    I've been recording live video feed from a CCTV camera to my Macbook using a video capture card (Elgato Video Capture) which saves the videos as .MP4 files. My problem is that there's no date and time on the feed so when I review a recorded video I can't see what time I'm looking at -- the only way is to manually subtract the hours/minutes from the end of the video duration in order to get the time, but this is a pretty big hassle. I write down logs of the Start and Stop times for the recordings so I know when each video begins and ends (for example, a 10 hour video from 11/22/2011 begins at 6:15AM and ends at 4:15PM, a 3 hour and 17 minute video from 11/24/2011 begins at 10:34AM and ends at 1:51PM etc) but I'd like to be able to add a running date/timestamp to the bottom of each video that reflects the time in the live feed.

    So, for example, for the 10 hour video from 11/22/2011 that begins at 6:15AM I'd like to add a timestamp to the bottom that starts at 6:15AM and runs for 10 hours to 4:15PM by the end of the video, and if I were to scroll to 5 hours and 12 minutes into the video it would show 11:27AM at the bottom. A format like "11/22/2011 06:15:00AM" is what I'm looking for (or mm/dd/yyyy hh:mm:ss AM/PM).

    How can I do this? I have Avidemux and iMovie on my Mac and VirtualDub/Avisynth on my PC but nothing fancier than that. Any help would be greatly appreciated!
    Quote Quote  
  2. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    With Avisynth, you can use the ShowTime() function.
    Use the 'offset' parameter to set the start time.
    Quote Quote  
  3. Member
    Join Date
    Aug 2011
    Location
    Earth
    Search Comp PM
    Originally Posted by Gavino View Post
    With Avisynth, you can use the ShowTime() function.
    Use the 'offset' parameter to set the start time.
    I know I'm responding several months later, but first of all thank you for this suggestion. For some reason I can't get "ShowTime()" to work since after writing the script and dragging it into VirtualDub I always get an error saying
    AviSynth open failure:
    Script error: ShowTime does not have a named argument "offset"
    (C:\Folder\video.avs, line 2)
    When I replace "ShowTime" with "ShowSMPTE" I can get it to work, though. The AviSynth script I'm using is this:

    Code:
    AVISource("C:\Folder\examplevideo.avi")
    ShowSMPTE(offset="04:25:43:00", font="arial", size=18, text_color=$FFFFFF)
    However, I was hoping to get some help with two things:

    • First, is there any way to get a "hh:mm:ss AM/PM" format? Using the above method, I can only display an increasing number of hours. So, if I have a 16-hour-long video that starts at 04:25:43 AM and ends at 8:25:43 PM, is there any way to specify AM and PM after the time and to make the increasing timestamp go from 12:59:59 to 01:00:00 at 1PM instead of going to 13:00:00?

    • Second, all of the video feeds I've recorded are .mp4 files in MPEG-4 format so I can't get AviSynth or VirtualDub to open them as is -- I've been using Avidemux to first convert them to XviD .avi files but since each video is 12+ hours long this is a very lengthy process (converting one video takes the entire day) and then processing it all over again with AviSynth and VirtualDub takes another full day to do. Is there a way to do the conversion from mp4 to avi and add the timestamp at the same time, rather than processing each video twice (once to convert to avi, once to add the timestamp)?
    Thanks again for the help!
    Quote Quote  
  4. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by quantice View Post
    For some reason I can't get "ShowTime()" to work since after writing the script and dragging it into VirtualDub I always get an error saying
    AviSynth open failure:
    Script error: ShowTime does not have a named argument "offset"
    (C:\Folder\video.avs, line 2)
    When I replace "ShowTime" with "ShowSMPTE" I can get it to work, though.
    Yes, sorry, my mistake. Unlike ShowSMPTE, ShowTime only has the offset_f parameter, allowing the start offset to be expressed in frames - not so convenient for your purpose. It could still be used, but you would have to work out yourself the frame offset corresponding to the start time (or perhaps write an Avisynth function to do it).

    if I have a 16-hour-long video that starts at 04:25:43 AM and ends at 8:25:43 PM, is there any way to specify AM and PM after the time and to make the increasing timestamp go from 12:59:59 to 01:00:00 at 1PM instead of going to 13:00:00?
    Unfortunately not, as it's designed to show elapsed time, not clock time.
    I guess you live somewhere (not Europe) where people are not used to the 24-hr clock.

    all of the video feeds I've recorded are .mp4 files in MPEG-4 format so I can't get AviSynth or VirtualDub to open them as is
    You can use FFmpegSource to open mp4 files in Avisynth.
    See http://forum.doom9.org/showthread.php?t=127037
    and http://code.google.com/p/ffmpegsource
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!