Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


VLC snapshots from video stream with added date and time overlay

Posted on 2013-01-19
Medium Priority
Last Modified: 2013-01-25
I cant figure out how to add date and time overlay when making a snapshot of a video stream in VLC player and command line. In the attached example I can see date and time in the player but its not saved with the snapshot file.
Question by:petlar930
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 70

Expert Comment

ID: 38797476
This what I see dropping your file onto VLC
Says it's a undf?
No suitable decoder module:
VLC does not support the audio or video format "undf". Unfortunately there is no way for you to fix this.
VLC errorUse .asf format?
I don't know if you can add the date and time to the live streaming maybe later once you stop capturing.
I'm not familiar with using VLC via cmd line either but I dare say adding a date and type would be like a subfilter
See if this helps
LVL 38

Accepted Solution

BillDL earned 2000 total points
ID: 38798243
From my lengthy experimenting I do not think you can include the time and date in the snapshot because it is only an overlay applied at runtime, and not actually embedded into the video.

I had wondered whether the text was included in the snapshot image as a layer that was not visible, and would be lost in JPG images that don't support transparency and layers but retained in PNG snapshots, but I have looked at PNG snapshots and see no sign of any hidden layers with the text overlay.  They are just single layer images.

I think you are going to have to apply the time stamp to the image immediately after the snapshot is created by VLC Player using another command line utility such as ImageMagick.

The second or two difference in time may or may not be important to you, and it's an additional complication that you probably didn't want, but that's the only way I think you will achieve this.

It is possible that there may be some other advanced display settings that concern "blending" of content layers or similar, whereby snapshot screen capture includes the overlaid content, but I haven't discovered any.

You are using VLC's "marquee filter" to display the time and date in the video when played.  You can use a text string and/or any of the built in variables shown here:
I have been testing with %d.%m.%y  %H:%M-%S which displays as eg. 20.01.2013  09:55-12

The manual equivalent to your scripted method of playing the video and showing the marquee is to configure the user settings then click the snapshot tool.

Tools > Preferences > Show settings > Click "All" for advanced settings.
Scroll down to and expand the sections shown in the screenshots below.

Note that the 4th image is a composite and is only representative of how it looked in VLC Player, not actually what I captured.  I had to do some copying and pasting and insert text using a text tool to simulate the appearance and position of the date/time stamp.
.  .  .Date/Time stamp overlay in VLC Player  Date/Time overlay text not captured in snapshotThe image editing tools I currently have installed on this PC capture the VLC Player window, but the content of the actual video is captured as live content (OLE - Object Linking and Embedding) that is impossible to merge into the image and retain using standard image editing applications.  It's the same with trying to use Alt + PrintScreen to capture something in Windows Media Player.  All you get is black screen area surrounded by the application window.  I think it is to do with the manner in which Windows layers content on the screen display.

As far as ImageMagick is concerned, there is a learning curve but the online documentation is very full.  Basically it comprises a suite of separate EXE files namely: animate, compare, composite, conjure, convert, display, identify, import, mogrify, montage, and stream.

Eack of the programs support a lot of different commands, each with their own parameters, and many of the commands apply to more than one of the programs.  To help narrow down which program, command, and switches best suit your needs, there are examples and references:

Annotating the images is what you would be looking for:
You can label an image above or below it, or right on top of it, and format the area for this label/caption:
Alternatively you can watermark an image with text and format it:

It's easy enough to get the System date and time from the variables %DATE% and %TIME% at the command line, and format them to a more friendly format for ImageMagick to use as the annotation or labelling text.  This question shows an example:
but there are quite a few other ways to achieve the same thing.

The difficult part of running a VLC Player script to generate a snapshot image and then call ImageMagick to annotate or label it would be knowing the file name of the snapshot that VLC Player just created.  Probably the best way would be to create one Windows batch file to call both the programs, and have the batch file maintain a counter so that it can track what the file name should be each time it runs.  If you use incrementing numbers as your file names rather than the date and time it would be a whole lot easier to achieve.

What do you think?

Author Comment

ID: 38815859
BillDL thanks a lot for your answer, I understand the problem and will try imagequick. It looks like the right tool for this.
LVL 38

Expert Comment

ID: 38817774
Thank you petlar930

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article provides the solution to a question (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28674207.html) posed here at Experts Exchange. The asker of the question has many JPG images in many folders, and all of t…
All of the resources available today make learning a new digital media easier than ever-- if you know where to begin. This is a clear, simple guide to a few of the basic digital art mediums and how to begin learning them on your own.
The goal of the tutorial is to teach the user how to make his/her own presets while editing so it is easier to edit there photos. Create a preset you like and copy that setting then save it in to your presets folder.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question