<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>.EmailQuote {
        BORDER-LEFT: #800000 2px solid; PADDING-LEFT: 4pt; MARGIN-LEFT: 1pt
}
</style><style id="owaParaStyle">P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</style>
</head>
<body ocsi="0" fPStyle="1">
<div style="FONT-FAMILY: Calibri; DIRECTION: ltr; COLOR: #000000; FONT-SIZE: 12pt">
<p>Hi,</p>
<p>Have a look at transport stream carrier.  This is used in broadcast to deliver video and audio to be synchronised using a presentation time for decode.  The PTS (presentation Time Stamp) ensures that the video and audio are rendered at the correct time. 
 You can use MPEG2<a target="_blank"></a> or h264<a target="_blank"></a> video in a transport stream for the video and normally mpeg or ac3<a target="_blank"></a> audio.</p>
<p> </p>
<p>There are quite a few options for the mpegts<a target="_blank"></a> plugin<a target="_blank"></a> and maybe other people on the forum will be able to assist.</p>
<p> </p>
<p>Regards</p>
<p>Marc</p>
<div>
<p> </p>
<div style="FONT-FAMILY: Tahoma; FONT-SIZE: 13px">
<div>
<p class="MsoNormal"> </p>
</div>
</div>
</div>
<div>
<hr tabindex="-1">
<div id="x_divRplyFwdMsg"><font color="#000000" size="2" face="Tahoma"><b>From:</b> gstreamer-devel-bounces+marcmltd=marcm.co.uk@lists.freedesktop.org<a target="_blank"></a> [gstreamer-devel-bounces+marcmltd<a target="_blank"></a>=marcm.co.uk@lists.freedesktop.org<a target="_blank"></a>]
 on behalf of Thomas Levine [occurrence@thomaslevine.com<a target="_blank"></a>]<br>
<b>Sent:</b> 07 December 2012 16:41<br>
<b>To:</b> Gstreamer<a target="_blank"></a> Devel<a target="_blank"></a><br>
<b>Subject:</b> Saving datetimes<a target="_blank"></a> as text<br>
</font><br>
</div>
<div></div>
</div>
<font size="2"><span style="FONT-SIZE: 10pt">
<div class="PlainText">Hi,<br>
<br>
I am going to record video, audio and electromyography (It doesn't <br>
matter if that<br>
means nothing to you.) at the same time, and I want to align the <br>
measurements.<br>
<br>
In case you are curious, I want to figure out why wrists make that <br>
cracking noise<br>
if you twist them in that weird way that you'll know about only if you <br>
do it.<br>
Electromyography measures electric potential across a muscle, so it's <br>
sort of like<br>
muscle activity. More here: <a href="https://github.com/tlevine/wrist-cracking" target="_blank">
https://github.com/tlevine/wrist-cracking</a><br>
<br>
All of the recording devices are plugged into the same computer, so I <br>
think that<br>
using clock time would less annoying than some other approaches. Thus, <br>
I want to<br>
get a datetime<a target="_blank"></a> out of the video and audio that I'm recording.<br>
<br>
This command seems decent for recording the video and audio.<br>
<br>
     gst<a target="_blank"></a>-launch-0.10 v4l2src<a target="_blank"></a> ! timeoverlay<a target="_blank"></a> halign<a target="_blank"></a>=right valign<a target="_blank"></a>=top ! \<br>
       clockoverlay<a target="_blank"></a> time-format="%Y-%m-%d %H:%M:%S" halign<a target="_blank"></a>=left
<br>
valign<a target="_blank"></a>=top ! \<br>
       video/x-raw-yuv,width<a target="_blank"></a>=640,height<a target="_blank"></a>=480 ! ffmpegcolorspace<a target="_blank"></a> ! <br>
theoraenc<a target="_blank"></a> ! \<br>
       oggmux<a target="_blank"></a> name=mux<a target="_blank"></a> ! filesink<a target="_blank"></a> location="$outfile<a target="_blank"></a>" pulsesrc<a target="_blank"></a> ! <br>
audioconvert<a target="_blank"></a> ! \<br>
       vorbisenc<a target="_blank"></a> ! mux<a target="_blank"></a>.<br>
<br>
On my computer, the video is laggy<a target="_blank"></a>, but the audio is not, and the audio
<br>
is more<br>
important.<br>
<br>
This command displays the time as an image, so it's enough for manually <br>
aligning<br>
the video/audio with the electromyography, but it would be nice if I <br>
could make<br>
it more automatic. I think that getting the start and end times of the <br>
video/audio<br>
recording as text would be fine.<br>
<br>
I've never written anything with gstreamer<a target="_blank"></a> except for hacks with
<br>
gst<a target="_blank"></a>-launch.<br>
It looks like I should use a descendant of GstClock<a target="_blank"></a>, but that's as far
<br>
as I've<br>
gotten. I haven't really written C before.<br>
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html" target="_blank">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html</a><br>
<br>
Can I do something like this in gst<a target="_blank"></a>-launch or in something similarly
<br>
simple?<br>
<br>
Thanks<br>
<br>
Tom<br>
_______________________________________________<br>
gstreamer-devel<a target="_blank"></a> mailing list<br>
gstreamer-devel@lists.freedesktop.org<a target="_blank"></a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</div>
</span></font></div>
</body>
</html>