VideoHelp Forum




+ Reply to Thread
Results 1 to 13 of 13
  1. Member
    Join Date
    Sep 2011
    Location
    East Central Florida
    Search PM
    I would like to compile a series of webcam .jpg images into a video and serve it from my website host. The complication is that I want to do this, on-demand, so that the video is always current (i.e., the previous 3-hours).

    Any assistance wil be appreciated.
    Quote Quote  
  2. Pretty sure that Sony Movie Studio can take a series of images and make a video. There are scripts that can do the video broadcasting from your website and update it at a time specified. The hard part is that you must upload a video every three hours or at least upload a series of videos that can be displayed at a time you pick. Lots of work involved here. Easier to just link to a embedded YouTube video and have the link change every 3 hours with a script (to another video)
    Extraordinary claims require extraordinary evidence -Carl Sagan
    Quote Quote  
  3. You could build the video from the images using ffmpeg but you'll need to figure out the names of the images that constitute the last three hours. They'll need to be sequentially numbered or you can put their names in an ordered list (text file). For example, this ffmpeg command line:

    Code:
    ffmpeg -f image2 -r 24.00 -i %%08d.jpg -vcodec libx264 -pix_fmt yuv420p -preset slow -crf 18 -sar 1:1 "output.mp4"
    will build output.mp4 from:

    Code:
    00000000.jpg
    00000001.jpg
    00000002.jpg
    until it reaches the last jpg file of the sequence.
    Last edited by jagabo; 12th Jun 2016 at 16:59.
    Quote Quote  
  4. You need some script capable to display sequence images... alternatively some video that can be reedited on the fly (similar to FIFO concept - new frame added, first frame removed)...
    Quote Quote  
  5. Member
    Join Date
    Sep 2011
    Location
    East Central Florida
    Search PM
    Originally Posted by jagabo View Post
    You could build the video from the images using ffmpeg but you'll need to figure out the names of the images that constitute the last three hours. They'll need to be sequentially numbered or you can put their names in an ordered list (text file). For example, this ffmpeg command line:

    Code:
    ffmpeg -f image2 -r 24.00 -i %%08d.jpg -vcodec libx264 -pix_fmt yuv420p -preset slow -crf 18 -sar 1:1 "output.mp4"
    will build output.mp4 from:

    Code:
    00000000.jpg
    00000001.jpg
    00000002.jpg
    until it reaches the last jpg file of the sequence.
    This may work as the filenames will be fixed (a nice feature of Blue Iris). Any idea how ffmpeg would handle nonexistent or missing files (if any)?

    Also, I would have to see if I can run FFmpeg on my host's server.
    Quote Quote  
  6. ffmpeg will stop at a discontinuity in the sequence. Ie, the video will only include the images up to the discontinuity. I don't know if there's a switch to make it ignore discontinuities. Or you could build a list of filenames. The list would have the format:

    Code:
    file '00000000.jpg'
    file '00000002.jpg'
    file '00000003.jpg'
    and it wouldn't matter if the list didn't include a particular number. Obviously, the missing file would not be in the resulting video. Replace the input specification on the command line from "-i %%08d.jpg" to "-i list.txt ..."

    ffmpeg is cross platform so there should be a version for your OS.
    Quote Quote  
  7. Member
    Join Date
    Sep 2011
    Location
    East Central Florida
    Search PM
    Originally Posted by jagabo View Post
    ffmpeg will stop at a discontinuity in the sequence. Ie, the video will only include the images up to the discontinuity. I don't know if there's a switch to make it ignore discontinuities. Or you could build a list of filenames. The list would have the format:

    Code:
    file '00000000.jpg'
    file '00000002.jpg'
    file '00000003.jpg'
    and it wouldn't matter if the list didn't include a particular number. Obviously, the missing file would not be in the resulting video. Replace the input specification on the command line from "-i %%08d.jpg" to "-i list.txt ..."

    ffmpeg is cross platform so there should be a version for your OS.
    Good info - sounds like it will take some time to sort out, but I'll work on it when I have some time. Thanks!
    Quote Quote  
  8. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    The problem I see with this is that "time lapse" refers to a sequence of still images that when combined will play at faster than real-time. IOW, a sequence of 3000 pictures with one picture shot every second (equalling 3000 seconds, but played at 30 frames per second = 100 seconds' worth of video. But it is using TIME COMPRESSION. And at some point you are going to be running out of past events and will be in the present, and you cannot speed that up any further. From that point on, you cannot be doing a "time-lapse" in the same sense that you were.

    Scott
    Quote Quote  
  9. Member
    Join Date
    Sep 2011
    Location
    East Central Florida
    Search PM
    Originally Posted by Cornucopia View Post
    The problem I see with this is that "time lapse" refers to a sequence of still images that when combined will play at faster than real-time. IOW, a sequence of 3000 pictures with one picture shot every second (equalling 3000 seconds, but played at 30 frames per second = 100 seconds' worth of video. But it is using TIME COMPRESSION. And at some point you are going to be running out of past events and will be in the present, and you cannot speed that up any further. From that point on, you cannot be doing a "time-lapse" in the same sense that you were.

    Scott
    Scott -

    I understand your logic, however, for my purpose, "timelapse" means a series of images taken at fixed intervals, e.g., 1/minute. The capture device will always store the most recent 180 images (for 3-hours of data).

    og
    Quote Quote  
  10. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    But does each capture-by-the-minute shot play for 1 minute?

    Scott
    Quote Quote  
  11. Member
    Join Date
    Sep 2011
    Location
    East Central Florida
    Search PM
    Originally Posted by Cornucopia View Post
    But does each capture-by-the-minute shot play for 1 minute?

    Scott
    No, each image only constitutes one frame.
    Quote Quote  
  12. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Originally Posted by OldGeek View Post
    Originally Posted by Cornucopia View Post
    But does each capture-by-the-minute shot play for 1 minute?

    Scott
    No, each image only constitutes one frame.
    Therein lies the rub.
    Quote Quote  
  13. Member
    Join Date
    Sep 2011
    Location
    East Central Florida
    Search PM
    @jagabo:

    Thanks for pointing me in the right direction. I was able to create a video, locally, using this:

    Code:
    ffmpeg -y -f image2 -i f:\timelapse\cam6_%03d.jpg -filter:v "setpts=2.0*PTS"  -vcodec libx264 -an -pix_fmt yuv420p -preset fast -crf 23 -sar 1:1 "c:\temp\timelapse.mp4"
    Now I have to see if I can install FFmpeg on the hosting server and create/deliver the video, on-demand.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!