Take a look at the multifilesink element.<br><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-multifilesink.html">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-multifilesink.html</a><br>
<br>You might be able to use it in a gst-launch line using the properties<br>- max-file-size<br>- next-file<br><br>Jesper<br><br><br><div class="gmail_quote">On Fri, Dec 14, 2012 at 7:13 PM, Ian Davidson <span dir="ltr"><<a href="mailto:id012c3076@blueyonder.co.uk" target="_blank">id012c3076@blueyonder.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Please can you advise me.<br>
<br>
I am attempting to record audio/video which I expect to last up to 1˝ hours. If I try to do that as one single file, storing as AVI, I get a file which is over 2GB and that causes problems. Therefore, I like to record 3 shorter videos - and in the past I have manually stopped the recording at a 'convenient point' and started a new recording - keeping each recording to a maximum of 40 minutes.<br>
<br>
An alternative approach would be to record for a certain time and then automatically stop and start a new recording. This would mean that the recording break would probably come when someone was speaking, so there would be a little 'hiccup'. I wrote the script below to see how much of a gap there was between successive recordings (the camera was pointing at a digital clock showing seconds). The videos did not turn out quite as I expected.<br>
<br>
<br>
#!/bin/bash<br>
fileNamePart="${HOME}/video"<br>
v4l2-ctl -i 1<br>
counter=0<br>
while [ $counter -lt 3 ]; do<br>
let counter=counter+1<br>
fullFileName="${fileNamePart}-<u></u>${counter}.avi"<br>
gst-launch-1.0 -e v4l2src norm=PAL num-buffers=100 ! 'video/x-raw,format=(string)<u></u>I420,width=352,height=288,<u></u>framerate=(fraction)25/1' ! queue ! mux. alsasrc num-buffers=440 ! audioconvert ! 'audio/x-raw,rate=44100,<u></u>channels=2' ! queue ! mux. avimux name=mux ! filesink location="$fullFileName"<br>
done<br>
<br>
It would appear that video-1 was fine. Video-2 then started and there was a slight break in the audio from the end of video-1. However, the video content of video-2 has a 4 second gap in the middle of the clip.<br>
<br>
I assume that the 2 sources v4l2src and alsasrc are each set to produce the nominated number of buffers - and that's what they are going to do. The fact that one source has produced an EOS (I assume) does not stop the other.<br>
<br>
Would I be correct in assuming that, if I wrote a C program, rather than using gst-launch, I would be able close both sources down at a time that suited me? And also that I cannot do it using gst-launch?<br>
<br>
Thanks<br>
<br>
Ian<br>
<br>
By the way, thanks to those who have already got me this far.<span class="HOEnZb"><font color="#888888"><br>
-- <br>
--<br>
Ian Davidson<br>
--<br>
Facts used in this message may or may not reflect an underlying objective reality. Facts are supplied for personal use only.<br>
Recipients quoting supplied information do so at their own risk. Facts supplied may vary in whole or part from widely accepted standards.<br>
While painstakingly researched, facts may or may not be indicative of actually occurring events or natural phenomena.<br>
The author accepts no responsibility for personal loss or injury resulting from memorisation and subsequent use.<br>
______________________________<u></u>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<u></u>freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/gstreamer-<u></u>devel</a><br>
</font></span></blockquote></div><br>