Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Video Encoding is driving me mad!

  1. #1
    Automated Home Sr Member John Winter's Avatar
    Join Date
    Dec 2007
    Location
    Buckinghamshire
    Posts
    56

    Default Video Encoding is driving me mad!

    Hello Folks

    Apologies for the melodramatic thread title, but I have an issue with video encoding in Cortex that I hope you can provide suggestions for. I've been fiddling with this, on and off for months (years?) and despite this effort, I still have a problem.

    It goes like this - I have Cortex set to record video on 3 cameras around my house, activated by motion on external PIRs associated with each camera. This bit works fine. Cortex detects motion, and sets off the recordings as expected. The playback of said recordings is the problem. When I play the video back in Cortex, it plays at around 120% of normal speed, and only intermittently. When I play back the video in WMP, I get around 1-2 seconds of playback at the correct speed, then playback stops, freezing on a frame. When Cortex playback fails, it does so in the same manner as in WMP.

    Now, something that I just discovered today that I think is a symptom that may get me to the root cause - the duration of the clip, according to windows explorer, is massively over exaggerated, for instance a 10 second clip is tagged at 20mins, and a 1 minute clip at over 2 hours!

    This duration error ties in with a number of other behaviours. On WMP, the slider bar at the bottom of the screen is grossly exaggerated in line with the clip's apparent length, I think somehow causing the clip to stop when it realises the bar's out of sync with the real length. Also, in Cortex itself - and I think this may be important - the 'time' indicator in the bottom left of the video window in Cortex always seems to jump forward at a huge pace, whether recording or not - in 10 seconds it could move forward 2 hours.

    So in essence I think the duration of a clip is being tagged using incorrect information - making the clip freeze on playback.

    I've played with all sorts of codecs, 2 different capture cards, and 2 servers, to no avail, so any suggestions appreciated.

    Cheers

    John
    --------------------------

    www.nodeone.blogspot.com

  2. #2
    Automated Home Ninja Viv's Avatar
    Join Date
    Dec 2004
    Posts
    284

    Default

    Have you tried Recording Method | ASF?
    If so do you get the same problems?

    Viv

  3. #3
    Automated Home Sr Member John Winter's Avatar
    Join Date
    Dec 2007
    Location
    Buckinghamshire
    Posts
    56

    Default

    Hi Viv

    Yes - unfortunately the same result I'm afraid. I ran with ASF for a while but I think the root cause is something to do with the fact that the 'Time' thingy is running away with itself...

    Could I have a duff quad video capture card or drivers? What would you recommend for reliable 25FPS capture?

    John
    --------------------------

    www.nodeone.blogspot.com

  4. #4
    Automated Home Ninja Viv's Avatar
    Join Date
    Dec 2004
    Posts
    284

    Default

    As a guess perhaps the PC cannot handle processing 3 cameras at 25fps.
    The video windows can have the player controls visible in mosaic or full screen view.
    If you had all the cameras up in mosaic view and all recording then see if on the player controls it is reporting dropped frames. Check CPU usage in Windows task manager for Cortex under such circumstances. Processor usage for the Idranet is quite low. Cameras are by far the biggest user.
    Have you tried a lower frame rate and still have had the problems?
    I know it goes against the grain to have good cameras and a fast capture card and then have to reduce the frame rate but it may be necessary depending on PC capability.

    Viv.

  5. #5
    Automated Home Legend chris_j_hunter's Avatar
    Join Date
    Dec 2007
    Location
    North Lancashire
    Posts
    1,676

    Default

    we were wondering what frame rate might be best, and noticed that this:

    http://www.surveillancehelp.com/uplo...barticleid=115

    offers this as a rule of thumb :

    "for residential surveillance 1-3 fps is the norm; for light commercial surveillance applications like retail stores 3-5 fps is typical. For higher-end surveillance we commonly see between 7-15 fps. Its ... fairly typical for research facilities and casinos to demand 2030 fps ... "

  6. #6
    Moderator toscal's Avatar
    Join Date
    Oct 2005
    Location
    Near Alicante Spain
    Posts
    2,021

    Default

    Have you tried playing the file in VLC media player or media player classic.

    And have you tried capturing video without using Cortex and does this produce the same results.
    Viv's idea of lowering the frame rate may also do the trick.
    What sort of PC do you have.
    IF YOU CAN'T FIX IT WITH A HAMMER, YOU'VE GOT AN ELECTRICAL PROBLEM.
    www.casatech.eu Renovation Spain Blog

  7. #7
    Automated Home Sr Member John Winter's Avatar
    Join Date
    Dec 2007
    Location
    Buckinghamshire
    Posts
    56

    Default

    Hi Guys

    Thanks for your suggestions...

    In terms of PC performance, the server is running with a 64bit dual core Athlon, with 2Gb Ram and a fast HDD. I'm encoding 768x576@25fps using Xvid at over 4500Kbps on the fly - so when 2 cameras are recording CPU load is around 90%. I honestly don't think it's a performance issue as I did try reduced frame rates, and resolutions.

    Chris - in a previous life I ran a CCTV company so I guess my demands are higher than most... We used to cover everything from department stores to Pharma - I suppose the very least I'd settle for is 17fps as that's about when the human eye stops perceiving one frame after another, and sees smooth motion.

    I'm getting zero dropped frames on the encode - even with 3 cameras at 100% cpu load...

    I did try this file -



    on VLC, as it is a robust player designed to handle dodgy files, but no joy 1/2 second of video, then freezeframe...

    Notice though, the stats of the file - 1500 frames at 24fps. Should be around 60sec worth of video, but the tag on the file is 1hr 2mins!

    I also tried capturing video using amcap - no problems at all on playback.

    I'm sure it's something to do with the fact that the 'time' display on Cortex's video window just runs at huge rate, much faster than real time.

    Could it be my 'china special' video card? Has anyone had success with a quad SAA712x based board?

    Could it be a bug in the video implementation in Cortex?
    Last edited by John Winter; 7th July 2011 at 11:11 AM.
    --------------------------

    www.nodeone.blogspot.com

  8. #8
    Automated Home Legend chris_j_hunter's Avatar
    Join Date
    Dec 2007
    Location
    North Lancashire
    Posts
    1,676

    Default

    >in a previous life I ran a CCTV company ...

    ah, then could I ask what cameras you'd recommend for use with Cortex etc ... ?

    we bought a 40GBP dome camera to get things going, but we don't expect much of it (we're busy wiring-up & installing, so it could be a while before we take it from its box to give it a go) ...

    for the real ones, the Y-cam IP bullet camera & the Mobotix Q24 seem to be good value (*) but we've yet to investigate compatibility with Idratek ...

    (*) not the same as affordable !!
    Last edited by chris_j_hunter; 7th July 2011 at 07:43 PM.

  9. #9
    Moderator toscal's Avatar
    Join Date
    Oct 2005
    Location
    Near Alicante Spain
    Posts
    2,021

    Default

    Notice though, the stats of the file - 1500 frames at 24fps. Should be around 60sec worth of video, but the tag on the file is 1hr 2mins!
    Its 62.5 seconds. So some where it seems to be changing the seconds to minutes hence the 1hr 2 mins or 62 minutes.

    Do you have audio encoding on or off,
    IF YOU CAN'T FIX IT WITH A HAMMER, YOU'VE GOT AN ELECTRICAL PROBLEM.
    www.casatech.eu Renovation Spain Blog

  10. #10
    Automated Home Sr Member John Winter's Avatar
    Join Date
    Dec 2007
    Location
    Buckinghamshire
    Posts
    56

    Default

    Well spotted! Now that you've pointed it out it's so obvious..

    I've just checked some other clips, and they all have the same symptom - seconds are being recorded as minutes...

    I wonder if this could help in the troubleshooting process?

    BTW I'm not encoding audio.
    --------------------------

    www.nodeone.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •