<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Mike,<br>
Wow, that works flawlessly on my DM365, thanks! <br>
Interestingly, when I subbed in:<br>
<span
style="font-family: arial,sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);"><font
face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
! TIImgenc1 iColorSpace=UYVY oColorSpace=YUV420P qValue=75
engineName=codecServer \<br>
<br>
for your </span></font></span> generic:<br>
<span style="font-family: courier new,monospace;"><br>
! jpegenc \<br>
<br>
it hung again. Something is rotten in Denmark, where Denmark = </span><span
style="font-family: arial,sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);"><font
face="Times New Roman" size="3"><span style="font-size: 12pt;">TIImgenc1.<br>
</span></font></span><br>
Guess I need to profile the CPU loading to see how painful doing a
non-HW-acclerated JPEG compression is, but this looks promising.<br>
<br>
Thanks,<br>
Paul<br>
<br>
Mike Mitchell wrote:
<blockquote
cite="mid:CA+RV4CO4XjdF3VBvWoBRiz8SUHDVSCXguxkYb_b7RLCa2=JXqg@mail.gmail.com"
type="cite">Paul,<br>
<br>
First Wes was right that you need multifilesink, otherwise your output
will be appended, not overwritten. I could not use your <span
style="font-family: arial,sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);"><font
face="Times New Roman" size="3"><span style="font-size: 12pt;">TIVidResize</span></font></span>
or <span
style="font-family: arial,sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);"><font
face="Times New Roman" size="3"><span style="font-size: 12pt;">TIImgenc1.
</span></font></span>So I used the generic modules. Below you will
find a linux example that creates a JPG for every second of the
incoming video. Notice the caps on either side of the videorate
element. These tell videorate that it must drop frames to meet your
criterion, and with silent=FALSE you can see it will drop 95/100. I
think it is working as you would expect . At first I guessed it would
drop 97 frames and forward only 30,60 and 90. But perhaps it's
forwarding frames 1,31,61,91 and an EOS frame.<br>
<br>
<b>Mike Mitchell, MBA</b><br>
Principal<br>
Panometric LLC<br>
<br>
<span style="font-family: courier new,monospace;">gst-launch -vt
--gst-plugin-spew \</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> videotestsrc
num-buffers=100 \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">! 'video/x-raw-yuv,
framerate=30/1' \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">! videorate
silent=FALSE \</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">! jpegenc \</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">! 'image/jpeg,
width=(int)320, height=(int)240, framerate=(fraction)1/1,
pixel-aspect-ratio=(fraction)1/1' \</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">! multifilesink
location=output-%05d.jpg</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">ls -al outpu*.jpg</span><br
style="font-family: courier new,monospace;">
<br>
<br>
<br>
<span
style="font-family: arial,sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);">----------
Forwarded message ----------<br>
From: Paul Stuart <<a moz-do-not-send="true"
href="mailto:Paul_Stuart@seektech.com">Paul_Stuart@seektech.com</a>><br>
To: "<a moz-do-not-send="true"
href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>"
<<a moz-do-not-send="true"
href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>><br>
Date: Tue, 13 Sep 2011 16:23:51 -0700<br>
Subject: How to capture a still image while previewing live video?<br>
<div>
<div>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;">Hi,</span></font></p>
<p><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;"> </span></font>We need
to simultaneously capture/preview video on a TI DM365 while
asynchronously taking JPEG stills from the same video stream. Playing
around with gst-launch, it only seems to work correctly when v4l2src
num-buffers=1. Sample working pipeline:</p>
<p><font face="Times New Roman" size="3"><span
style="font-size: 12pt;">gst-launch -v v4l2src num-buffers=1
always-copy=FALSE input-src=composite \<br>
! TIVidResize contiguousInputFrame=TRUE \<br>
! 'video/x-raw-yuv,width=(int)736,height=(int)480' \<br>
! queue \<br>
! TIImgenc1 iColorSpace=UYVY oColorSpace=YUV420P qValue=75
engineName=codecServer \<br>
! queue \<br>
! filesink location=output.jpg</span></font></p>
<p><font face="Times New Roman" size="3"><span
style="font-size: 12pt;"> </span></font></p>
<p><font face="Times New Roman" size="3"><span
style="font-size: 12pt;">If I modify the above to remove
num-buffers=1, or even just set num-buffers=2, it hangs and never
produces a valid JPEG. I would have expected it to just overwrite
output.jpg</span></font></p>
<p><font face="Times New Roman" size="3"><span
style="font-size: 12pt;"> </span></font></p>
<p><font face="Times New Roman" size="3"><span
style="font-size: 12pt;">If, I change this to something that is, for
instance, previewing the video at the same time, things break as well.
Sample Pipeline:</span></font></p>
<p><font face="Times New Roman" size="3"><span
style="font-size: 12pt;">gst-launch -v v4l2src always-copy=FALSE
input-src=composite \<br>
! queue \<br>
! tee name= t \<br>
! 'video/x-raw-yuv,width=(int)736,height=(int)480' \<br>
! tidisplaysink2 video-standard=vga display-output=lcd
mmap-buffer=FALSE dma-copy=TRUE \<br>
t. \<br>
! queue \<br>
! 'video/x-raw-yuv,width=(int)736,height=(int)480' \<br>
! videorate \<br>
! TIImgenc1 iColorSpace=UYVY oColorSpace=YUV420P qValue=75
engineName=codecServer \<br>
! filesink location=output.jpg</span></font></p>
<p><font face="Times New Roman" size="3"><span
style="font-size: 12pt;"> </span></font></p>
<p><font face="Times New Roman" size="3"><span
style="font-size: 12pt;">Is it possible to create a gstreamer pipeline
using “standard” parts to accomplish what I need, or will I need to
modify my JPEG encoder element to make this work?</span></font></p>
<p><font face="Times New Roman" size="3"><span
style="font-size: 12pt;"> </span></font></p>
<p><font face="Times New Roman" size="3"><span
style="font-size: 12pt;">Thanks!</span></font></p>
<p><font face="Times New Roman" size="3"><span
style="font-size: 12pt;">Paul</span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;"> </span></font></p>
</div>
<div><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;"><br>
</span></font></div>
</div>
</span></blockquote>
<br>
</body>
</html>