Changing frame rate?

Phil
2005-04-02
2013-06-03
  • Phil
    Phil
    2005-04-02

    I have a new problem! The frame rate of the camera now seems to change on its own? I did a filming trip yesterday but unfortunately I was only able to get a max of 19fps & sometimes it would fluctuate causing the finished video to become unusable. Settings were the same as normal. Its something that has started since I used the limit bandwidth function on the klutchin streamer about a week ago. Im not sure if its the cause of the problem. I have today reinstalled the firmware but this seems to make no difference.

    Every time I feel like I can relax something new comes up! :-)

    Phil

     
    • Hi Phil,

      How are you limiting the frame rate - the best way is to put it in the "frame rate" field of the main window and press "update" button. Then you may verify the result with the "?" link. If you put "0" or empty, than the sensor will run at maximal it and the compressor can do. That way you control the sensor rate so all the streamers will work (you do not need to change anything in their settings - let them run at the maximal rate (determined by the sensor).

      Did you try other streamers - is there any difference?

      Did you have such problem before?

      Andrey

       
      • Phil
        Phil
        2005-04-02

        Ive tried this but the dialogs box that pops up when recording always has its own (always changing & lower then expected) fps . Before the camera would record at flat 22fps (full screen) always unless I set a lower frame rate via the index page.

        Ive messed something up somehow in the last week. It started when I limited the bandwidth to something like1000kbs & the frame rate became 6fps now I can not seem to turn it off. Even with all the updates Ive done.

        Im going to try a older fpga as its been a week or so since I upgraded.

        Thanks again Phil

         
    • Phil,

      The true sensor frame rate is the one that shows in the window that opens on the "?" link. There is no way that the stream can have different than this one - only by dropping some frames.

      If you put in that main window some frame rate and "?" shows lower - than it just can not run faster. Look again at the "?" window:
      Is the exposure time lower than 1/frame rate?
      Is the sensor clock 48 MHz?
      Is the FPGA clock 90 MHz?

      Maybe you did not restore /etc/init.d/fpga to the 48/90 after you reflashed the camera? When you do that everything is set to the defaults, including the configuration files you edited. I would recommend you to use ftp and have a local (on your HD) copy of te files you edited in the camera (make similar directory structure so it will be easier to find were to put the files)

       
    • Phil
      Phil
      2005-04-02

      Fixed I think!  I was just reading the 333 article you made & in there you say it pumps out a bandwidth of 70mb/s I opened the khlutchin streamer & changed the limit bandwidth to 70,000 kb/s this raised fps to 20-21fps I then did 80,000kb/s & I was back at 22fps!

      I have a feeling that this streamer somehow can save a setting in the camera which can only be reset with the streamer.

      Ive just made a 3rd file & the fps is going awol again! I guess I will try a even older fpga.

      I always set everything up the same way & the ? has 22.1fps 90/48mhz 90%quality  Exposure at default 20ms. I have many files at 22fps that were made when I had the skipping problem before.

      Thanks Phil

       
      • Phil,

        I don't think there is any sense to go to the earlier versions of the FPGA - it can mess up things even more. Can you send me the copy of your status page that opens at "?" link.

        As for frame rate dropping lower than "?" page shows - it can happen if the CPU/network is near the limit. That can be if the compression quality is high _and_ the scene is complex (a lot of high spatial frequency details). If that is the case (the bitrate is high) I would try the following:

        1. Find the static test pattern/view so you can easily reproduce the problem.

        2. Try at lower compression quality - see if the problem qoes away.

        3. Try several alternative streamers (i.e. by Spectr - it uses very different implementation) and see which one does better for you (no skipping at higher quality).

        If even the fastest streamer can not do that - well, CPU can not push it faster over the network - it is already twice faster than original software by Axis was sending the data.

        In that case you have just 2 choices - reduce compression quality or lower the frame rate (on the main page).

        As for the FPGA - there is no difference in compression quality - it can compress even with 100% setting at the full speed (but it will be too much data to push through the 100 Mbps network).

        Andrey

         
    • Phil
      Phil
      2005-04-03

      I filmed this morning & finally got some usable film I think (its rendering to a lossless avi format). The only way I could get 20fps was to shrink the image a bit to 1280x900 (so there will be some short black bands top & bottom) & use 80% quality. The ? page had 25fps but the max I could actualy get was 20fps. I can not understand why the camera was always stable at 90% 22.1fps up until last week. I film until 2gbs & let the file close by its self, this way virtual dub makes its own header & the file becomes much faster to navigate in windows. Some of the files were a steady 19fps-20fps then all of a  sudden I see 15fps - 10fps? Mplayer was running the whole time so I was just making new files so its as if the camera speed is dictated by what it sees now. A few weeks ago it was fixed. If I set 15fps it will now record at 10fps.  I have the ? file & will post it as soon as I finished rendering.

       
      • Phil,

        If you were getting 20 fps while sensor was running at 25 fps ("?") you obviously have frame drops, that could be in one of 2 places - streamer (software, not FPGA) in the cameras and PC.

        Some of the streamers allow you to see the "outgoing" frame rate (or frames per 10 seconds in khlut) and also the actual bit rate. What do they show? Any difference between the streamers?

        If there is no difference betrween streamers and/or the reported (by the streamer) frame rate approximately matches the sensor one - the problem is on the PC side again.

        Andrey

         
    • SENSOR_STATE    7
      FPS    22.120000
      P_SENSOR_WIDTH    1280
      P_SENSOR_HEIGHT    1024
      P_ACTUAL_WIDTH    1280
      P_ACTUAL_HEIGHT    1024
      P_VIRT_WIDTH    1546
      P_VIRT_HEIGHT    1403
      P_WOI_LEFT    0
      P_WOI_TOP    0
      P_WOI_WIDTH    1280
      P_WOI_HEIGHT    1024
      P_FLIPH    1
      P_FLIPV    1
      P_DCM_HOR    1
      P_DCM_VERT    1
      P_CLK_FPGA    90
      P_CLK_SENSOR    48
      P_FRAME    1
      P_SENSOR    49
      P_LPR    320
      P_IMAGE_SIZE    1310720
      P_BAYER    2
      P_COLOR_SATURATION_BLUE    200
      P_COLOR_SATURATION_RED    200
      P_GAMMA    47
      P_PIXEL_LOW    2
      P_PIXEL_HIGH    254
      P_TRIGGERED    0
      P_TRIG    2
      P_EXPOS    200
      P_PAGE_ACQ    0
      P_PAGE_READ    0
      P_BGFRAME    0
      P_OVERLAP    0
      P_VIDEO    1
      P_AUXCM    0
      P_COLOR    1
      P_TEST    0
      P_MCLK    4
      P_MCLK_DIS    0
      P_BITS    8
      P_SHIFTL    0
      P_FPNS    0
      P_FPNM    0
      P_VEXPOS    620
      P_GAINR    22
      P_GAING    16
      P_GAINB    17
      P_GAINGB    16
      P_FATZERO    0
      P_VIRTTRIG    0
      P_SPEC_KAC_GGA    63
      P_SPEC_KAC_GGB    0
      P_SPEC_KAC_GGM    0
      P_QUALITY    70
      P_PERIOD    2169038
      P_FPGA_XTRA    1000
      P_JPEG_WP    15632

      here is the ? data

      Its something that appeared recently about the time that the skipping was fixed. It happens mostly when making a second file. It could be something with the anti skip buffer echo 30 5 00 5 etc ? I shall try some other numbers but sometimes I do see that the slow recording frame rate will be transfered onto the ? data page.

       
    • Phil
      Phil
      2005-04-06

      http://www.tacx-video.com/Downloads/CityTrip-Demo/CityTrip-Demo.avi

      Its still uploading but I'm about to go to bed so I will post the link now. Its a little demo video tour of my town in Belgium that I quickly made last Sunday morning on a rather gray day. There is a little text I added just for interest (press pause if you want to read it). It uses a fixed mount with no tilting into the corners so it gets a bit 'jerky'  on the bends.

       
    • Phil
      Phil
      2005-04-06

      Sorry forgot to say its 250mb !

       
      • Phil,

        Thank you - I've got that file. Nice views!

         
    • Phil
      Phil
      2005-04-11

      I thought I had everything working today, I made a new mount thingy for the car with a pan & tilt camera mount, two suction cups & a load of Alloy tubes! I plugged everything (laptop ;313L & mount)into a 12v - 230v converter to power the lot off the car battery. Started up the camera & at 85% quality it was chugging along at 18fps?  If I plug into the mains I get an instant 20-22.1fps?  Could the car battery (with a 150watt inverter) or a generally unreliable power supply effect the camera fps?

       
      • Phil,

        Did you solve the last problem with "squares" by reducing the FPGA clock down from 90MHz - the images clearly indicated this type of the problem. I would recommend doing that even if the problem seems to go away by itself - when the clock speed is marginal, performance may depend even on the camera temperature variations.

        As for the dependence on the power source - I can not think of any reasons for that. There are several stages of power supplies and DC-DC converters, so internal power should be stable in any case. And internal circuitry resets the camera if internal power goes lower then required.

        Most likely reason for skipping frames (on any side - camera or computer) is the "complexity" of the scene (amount of high frequency components - details in the images). So if it did work at say 22 fps and certain compression quality, but then the scene changed (i.e. bush branches got into frame) the image size increased and the required bandwidth increased. I would recommend testing the maximum qulity settings at such frames with a lot of small detailes (i.e. web of branches) to make sure everything works for the most complex frames.

        Andrey

         
    • Phil
      Phil
      2005-04-13

      Now Im finally understanding (I think) how this camera works. By the computer the scene is not so complex with mostly large objects close to the camera. If I set to 70% quality the camera will be pushing out about  8 Mb/s. Now if I pick the camera up & poke it out of the window I can get it up to 23 Mb/s ! (if I point towards the ground,tress etc).

      I guess if I keep the iris open, stay below 70% quality & Exposure faster then say 30ms (to be safe) I should be ok. Alas Its raining so I may have to do a test drive later. I think its a bandwidth issue

      Regards Phil

       
    • I was curious & did a test drive in the rain (with the camera inside!). I was able to finally film OK with high steady frame rates if I stuck to the rules in the post above. Low 65-70% quality & a fast exposure with the iris open so as much light as possible is hitting the sensor. I used the windows VLC method as its so simple but I had the dreaded skipping frames problem back!.... (plus the grid).

      Tomorrow I will try the Live CD again in hopefully better weather. I feel the mysteries of the 313L are starting to penetrate my thick skull !

      Regards Phil

       
      • Hi Phil,

        If the mesh is as you described earlier (does not appear on the static images and doesn't change with lowering FPGA clock) - it is very little I can help as it is in the client software.

        So what was wrong with the recording using Live CD? I thought at some point you've solved the skipping problems by adjusting performance parameters. It is probably easier to solve the remaining problems in the system that is open source and so much more flexible.

        Andrey

         
        • Phil
          Phil
          2005-04-14

          The last problem with the live cd is the 2gb files. I have to keep an eye on the comandline box & make a new file every 18minutes+ - . If this problem could be solved so it just makes a new file I could just worry about the image & tilting the camera into the corners etc. I will do a new test run in a minute with the live cd. We should be recording a 7hr long classic (Amstel Gold) with the camera this Sunday so its a lot of files to make in a car thats bouncing all over the place!

           
    • Phil
      Phil
      2005-04-15

      I made a skip free 1280X1024 video in the car but used 60%. It was a gray day with wet roads so I suspect that when its sunny say in the mountains I maybe able to use 80%?   It seems much harder to get the camera in focus with Mplayer then with VLC.

      Could you look sometime at the VLC program? Its open source & is available for Linux also. The picture it receives from the camera has a slight grid but also seems sharper with deeper colour depth (the sky is captured in detail rather then being washed out). It maybe an illusion if nothing is done to the image in Mplayer.  It seems interesting though, perhaps the grid just helps find that spot where its in focus which can be hard outside in daylight with a cheap laptop screen!

      regards & thanks for the help Phil

       
    • Phil
      Phil
      2005-04-18

      I filmed the http://www.amstelgoldrace.com ! we had the 313L on the lead car outside on its special mount that tilts into corners but the damp mist kept building up on the lens & we had to film from inside. We ended up with 27gb of 70% quality Mjpeg at 1280x900 25fps. I filmed upside down once inside the car as space was limited with the little suction mount we used (I was not going to mess about with fpga in a bouncy car).  Anyway the set up worked & we got some great video!  I made a new file ready while it was recording so when the file reached 2gb I just needed to press one button to start the next file.  The funny thing is all the TV coverage of the race was canceled due to the poor misty weather!  We had the camera faced forward towards the road & crowds so we have nice clear (smooth liveCD) images of just about everyone of the 1000s of spectators!

      I will get some pictures up soon & upload a little demo video that you can use if you like. Its incredibly cool video but a big shame the weather was so poor (dark gray mist).

      One nice thing with the mist is that the frame rate stayed high !

       
    • Phil
      Phil
      2005-04-19