Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help: Video Recording in Real Time

7 views
Skip to first unread message

Hui Li

unread,
May 22, 2012, 5:18:46 AM5/22/12
to
Hi all,

I have an odd issues here when recording videos under Linux. I'm not sure
if it's related w/ real time stuff but I'll put every details here.

I just wrote a small shell script to record cameras video to local hard
disks and remove old videos in every rotation.

And I noticed a very interesting and odd issue. Every recording instance
starts at the same time and ends w/ the same time too, but the video
length is not the same. The default setting is recording video 2 hrs. I
starts 7 record instances for 7 cameras. 2 hrs later all video saved well
but length is not the same. The longest one is only 70mins and the
shortest is only 33mins. My script also provide logging function. After I
checked the log, it seems all instances starts/ends in the same time. I
use ffmpeg as the recorder software, also ask the same question in ffmpeg
channel. The guys in that channel tell me that I'd better use a RT kernel
for that. But I'm wondering is there any other way to fix that? I will
paste my codes here and I really appreciate any hints.

[1]Daemon Configuration File: http://pastebin.com/frBqpRaL
[2]Camera Configuration File: http://pastebin.com/wVPD1v7j
Every camera has an individual configuration file.
[3]Daemon Source Code: http://pastebin.com/gPyBGYnA

So I got some questions here.

1. Is there anything wrong w/ my codes/configuration? I just take a view
about log seems everything runs well but video clips are w/ different
length.

2. Do I have to use a RT kernel for this stuff? If yes, anything need to
change? Do I need to rewrite the codes?

3. If I don't need to change kernel, is there any way to fix that?

Thanks.

Hui

Bill Marcum

unread,
May 26, 2012, 5:31:16 PM5/26/12
to
On 2012-05-22, Hui Li <openlin...@gmail.com> wrote:
> Hi all,
>
> I have an odd issues here when recording videos under Linux. I'm not sure
> if it's related w/ real time stuff but I'll put every details here.
>
> I just wrote a small shell script to record cameras video to local hard
> disks and remove old videos in every rotation.
>
> And I noticed a very interesting and odd issue. Every recording instance
> starts at the same time and ends w/ the same time too, but the video
> length is not the same. The default setting is recording video 2 hrs. I
> starts 7 record instances for 7 cameras. 2 hrs later all video saved well
> but length is not the same. The longest one is only 70mins and the
> shortest is only 33mins. My script also provide logging function. After I
> checked the log, it seems all instances starts/ends in the same time. I
> use ffmpeg as the recorder software, also ask the same question in ffmpeg
> channel. The guys in that channel tell me that I'd better use a RT kernel
> for that. But I'm wondering is there any other way to fix that? I will
> paste my codes here and I really appreciate any hints.
>
Are you sure your video cameras don't detect motion and stop recording when
nothing is moving? Could you place a clock in front of each camera to see
when they don't record?


--
OS X: Because making Unix user-friendly was easier than debugging Windows

Hui Li

unread,
May 29, 2012, 12:54:47 AM5/29/12
to
Hi mate,

Yes, the camera is quite simple and it does not detect motion and stop
recording when nothing is moving. BTW, is there any wrong w/ my program?

Hui
0 new messages