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