Saving datetimes as text

Thomas Levine occurrence at thomaslevine.com
Fri Dec 7 08:41:53 PST 2012


Hi,

I am going to record video, audio and electromyography (It doesn't 
matter if that
means nothing to you.) at the same time, and I want to align the 
measurements.

In case you are curious, I want to figure out why wrists make that 
cracking noise
if you twist them in that weird way that you'll know about only if you 
do it.
Electromyography measures electric potential across a muscle, so it's 
sort of like
muscle activity. More here: https://github.com/tlevine/wrist-cracking

All of the recording devices are plugged into the same computer, so I 
think that
using clock time would less annoying than some other approaches. Thus, 
I want to
get a datetime out of the video and audio that I'm recording.

This command seems decent for recording the video and audio.

     gst-launch-0.10 v4l2src ! timeoverlay halign=right valign=top ! \
       clockoverlay time-format="%Y-%m-%d %H:%M:%S" halign=left 
valign=top ! \
       video/x-raw-yuv,width=640,height=480 ! ffmpegcolorspace ! 
theoraenc ! \
       oggmux name=mux ! filesink location="$outfile" pulsesrc ! 
audioconvert ! \
       vorbisenc ! mux.

On my computer, the video is laggy, but the audio is not, and the audio 
is more
important.

This command displays the time as an image, so it's enough for manually 
aligning
the video/audio with the electromyography, but it would be nice if I 
could make
it more automatic. I think that getting the start and end times of the 
video/audio
recording as text would be fine.

I've never written anything with gstreamer except for hacks with 
gst-launch.
It looks like I should use a descendant of GstClock, but that's as far 
as I've
gotten. I haven't really written C before.
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html

Can I do something like this in gst-launch or in something similarly 
simple?

Thanks

Tom


More information about the gstreamer-devel mailing list