<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I am trying to record video. The recording time can be over an hour
and if I try to record to a single file, the file can get too large.<br>
<br>
I wrote a script to attempt to record a series of shorter videos -
and then use Ctrl-C to stop recording when I wanted to finish.
Below is a simplified version of the script.<br>
#!/bin/bash<br>
fileNamePart="${HOME}/video"<br>
v4l2-ctl -i 1<br>
counter=0<br>
while [ $counter -lt 100 ]; do<br>
let counter=counter+1<br>
fullFileName="${fileNamePart}-${counter}.avi"<br>
`gst-launch-1.0 v4l2src norm=PAL num-buffers=100 !
'video/x-raw,format=(string)I420,width=352,height=288,framerate=(fraction)25/1'
! queue ! mux. alsasrc num-buffers=440 ! audioconvert !
'audio/x-raw,rate=44100,channels=2' ! queue ! mux. avimux name=mux !
filesink location="$fullFileName"`<br>
<br>
Note that this test version has the num-buffers set to 100 for the
video source. When I run this script for a short while, I get the
following on the console<br>
[ian@localhost ~]$ ./testScript<br>
Video input set to 1 (Composite1: ok)<br>
./testScript: line 8: Setting: command not found<br>
./testScript: line 8: Setting: command not found<br>
^C<br>
[ian@localhost ~]$ <br>
<br>
The first video records without any comment, the second and
subsequent attempts get that 'Setting: command not found' message.<br>
<br>
The final video - the one that is terminated by the Ctrl-C - does
not seem to have recorded the video properly. When I try to view
the videos, that final video does not display the actual material,
just a 'filmstrip'. If I carry the videos from my Linux box to a
Windows machine, editors fail to open the final AVI file.<br>
<br>
Thus far, two questions.<br>
1) What is the meaning of that 'command not found'?<br>
2) Why does the final video, terminated by Ctrl-C not work?<br>
<br>
I then noticed that I have num-buffers on both the video and audio
sources - so I removed the 'num-buffers=440' - but now the first
video did not come to a natural end but waited until the Ctrl-C.<br>
<br>
Third question. Do I need to have num-buffers on both sources?<br>
<br>
Your help is appreciated.<br>
<br>
Ian<br>
<div class="moz-signature">-- <br>
--<br>
Ian Davidson<br>
<i>239 Streetsbrook Road, Solihull, West Midlands, B91 1HE</i><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.
</div>
</body>
</html>