How animate dated filename like "history20070611s202635195.jpg"

Discussion in 'Javascript' started by Fabrizio, Jun 12, 2007.

  1. Fabrizio

    Fabrizio Guest

    My web cam save a file each minute with a name like this
    "history20070611s202635195.jpg"
    Do you know a script that can animate the last 60 jpg ? What I like
    is something like this:

    http://lacombe.dyndns.org/meteo/cam.html

    The problem is that this script work only with sequential file name
    like "picture001", "picture002", etc and not with dated filename like
    "history20070611s202635195.jpg"

    Thank you in advance for your help.

    Fabrizio
     
    Fabrizio, Jun 12, 2007
    #1
    1. Advertisements

  2. Fabrizio

    reflex Guest

    "history20070611s202635195.jpg"

    Do you know what this part mean "s202635195"? And how often camera
    save picture? Every minute? Or its random?
     
    reflex, Jun 12, 2007
    #2
    1. Advertisements

  3. Fabrizio

    Fabrizio Guest

    The camera save 1 image every 1 minute.
    "history20050101093020500.jpg" = "9h30min20s500ms on January 1, 2005".
    The letter "s" is inserted after
    the day when referring to a summer time zone.
    Thanks for your help.

    Fabrizio
     
    Fabrizio, Jun 12, 2007
    #3
  4. Fabrizio

    reflex Guest

    The camera save 1 image every 1 minute.
    I think there will be problem to get oldest "shoted" picture. Try to
    change image format a little bit (remove milliseconds and seconds)

    Then get current time like: 10h 30min (date is easy too) - last
    picture

    Then you have to get oldest: last - 60min = 9h 30min

    Now you can use some loops to pseudo animate pictures and setInterval
    to reset time to get every minute last picture and oldest.

    I started to write script, but i have too much work so dont know when
    i will finish it.

    Cya
    reflex
     
    reflex, Jun 13, 2007
    #4
  5. Fabrizio

    Fabrizio Guest


    The name is generated by the webcam. I can't change nothing :( I can
    only change the text before the date ("history"). Like I tell i know
    nothing in programming but is possible to use the creation date of the
    file to select the last hour / last day photos ? Someone on php groups
    write this:

    "The number following the 's' represents the time, I assume?
    (HHMMSSmmm) ?
    You could put them in an array and sort that using string comparison
    or by extracting the time string and casting it to integers and sort
    those. Or just sort them based on their maketime perhaps? Then feed
    the
    sorted pics to your image rotation function"

    I not say if it can help you ? Actually the webcam every 10 minutes
    make and upload by ftp one image on a directory on my Apache server.
    It will be nice to have one animation with the last 6 images (1 hour)
    and one with the last 144 images (1 day).
    Is absolutely not urgent :) Next 24 June I leave for one month. For me
    is so fantastic if i can have this animation that the time of the
    realization is absolutely not important :)

    Thank you again.

    Fabrizio
     
    Fabrizio, Jun 13, 2007
    #5
  6. Fabrizio

    Fabrizio Guest

    Fabrizio, Jun 17, 2007
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.