How to make a Stop Motion or Time-lapse video with webcam?











up vote
27
down vote

favorite
20












I have a webcam that works as a v4l2 device.



What is the most convenient way to capture either a stop-motion or time-lapse video?



N.B.



stop-motion and time-lapse are related but conceptually different.



Time-lapse is where you take a photo of a scene at a set interval and then combine it into a video (that looks like it's going really fast).



Stop-motion is where you control the scene and take an image for every change you make, to form an animation (eg Wallace and Grommit).



An application for time-lapse needs to be able to take a photo at a set interval.










share|improve this question
























  • Similar question in Photos has interesting answers that partly overlap.
    – anarcat
    Jul 30 at 23:47















up vote
27
down vote

favorite
20












I have a webcam that works as a v4l2 device.



What is the most convenient way to capture either a stop-motion or time-lapse video?



N.B.



stop-motion and time-lapse are related but conceptually different.



Time-lapse is where you take a photo of a scene at a set interval and then combine it into a video (that looks like it's going really fast).



Stop-motion is where you control the scene and take an image for every change you make, to form an animation (eg Wallace and Grommit).



An application for time-lapse needs to be able to take a photo at a set interval.










share|improve this question
























  • Similar question in Photos has interesting answers that partly overlap.
    – anarcat
    Jul 30 at 23:47













up vote
27
down vote

favorite
20









up vote
27
down vote

favorite
20






20





I have a webcam that works as a v4l2 device.



What is the most convenient way to capture either a stop-motion or time-lapse video?



N.B.



stop-motion and time-lapse are related but conceptually different.



Time-lapse is where you take a photo of a scene at a set interval and then combine it into a video (that looks like it's going really fast).



Stop-motion is where you control the scene and take an image for every change you make, to form an animation (eg Wallace and Grommit).



An application for time-lapse needs to be able to take a photo at a set interval.










share|improve this question















I have a webcam that works as a v4l2 device.



What is the most convenient way to capture either a stop-motion or time-lapse video?



N.B.



stop-motion and time-lapse are related but conceptually different.



Time-lapse is where you take a photo of a scene at a set interval and then combine it into a video (that looks like it's going really fast).



Stop-motion is where you control the scene and take an image for every change you make, to form an animation (eg Wallace and Grommit).



An application for time-lapse needs to be able to take a photo at a set interval.







software-recommendation video webcam






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 1 '12 at 10:20









fossfreedom

147k36326371




147k36326371










asked Jun 24 '11 at 11:32









Seppo Erviälä

2,69442337




2,69442337












  • Similar question in Photos has interesting answers that partly overlap.
    – anarcat
    Jul 30 at 23:47


















  • Similar question in Photos has interesting answers that partly overlap.
    – anarcat
    Jul 30 at 23:47
















Similar question in Photos has interesting answers that partly overlap.
– anarcat
Jul 30 at 23:47




Similar question in Photos has interesting answers that partly overlap.
– anarcat
Jul 30 at 23:47










8 Answers
8






active

oldest

votes

















up vote
39
down vote



accepted










Capturing a zillion images.



The first step is capturing images. Let's imagine you want to take a photo once every 10 seconds and save that into a directory sitting on your desktop



mkdir ~/Desktop/cap
cd ~/Desktop/cap


We use streamer to do the capture so let's install it:



sudo apt-get install streamer


And now we want to capture



streamer -o 0000.jpeg -s 300x200 -j 100 -t 2000 -r 1


-t is the number of frames we want to capture. -r is frames per second. So this should grab one frame every second. If you compress that down into a 30fps video, one minute of capture becomes 2 seconds of video. You'll want to tune this appropriately depending on how much output video you want.



That line will give you 2000 images, it'll take half an hour to record and, at 30fps, will generate just over 1 minute of video.



Putting it all together



I'm going to use ffmpeg. There are many different ways of putting it together including mencoder but I just prefer ffmpeg's outlook on life. After installing it (sudo apt-get install ffmpeg) just wang out this:



ffmpeg -r 30 -i %04d.jpeg -s hd480 -vcodec libx264 -vpre hq time-lapse.mp4


The quality settings there aren't anything like that of my webcam so you might want to play around with the options a lot more to get a better encode, but that should generate you a nice 30fps video, compressed up in x264.



You might want to play around with the framerate (-r) but I wouldn't go below 15fps.






share|improve this answer



















  • 1




    Every ten seconds would need -r 0.1.
    – Seppo Erviälä
    Jun 25 '11 at 10:34










  • This is what I was looking for. Thanks!
    – Seppo Erviälä
    Jun 25 '11 at 10:34










  • man streamer doesn't describe ehat each parameter does. Where can I get information about j parameter? How could I make it capture until I press CTRL+C, with given FPS?
    – Tomáš Zato
    Mar 30 '15 at 17:13






  • 1




    @ChrisH It's technically fine, I just mean that's the basic cut off for smooth video. That does largely depend on how quickly you're taking them though.
    – Oli
    Aug 14 '15 at 8:47






  • 1




    @TomášZato streamer -h is much more comprehensive. I hate when developers put in plenty of effort to --help but nothing for the man page.
    – WasabiFlux
    Aug 31 '17 at 19:03




















up vote
8
down vote













To capture every X amount of seconds from a webcam use motion.



Install motion



sudo apt-get install motion or sudo aptitude install motion



Configure motion for every X amount of seconds



sudo nano /etc/motion/motion.conf



Change the variables minimum_frame_time and snapshot_interval to the same amount of seconds you wish to take the picture with the webcam.



10 Minutes = 600 Seconds

20 Minutes = 1200 Seconds

30 Minutes = 1800 Seconds

1 Hour = 3600 Seconds

2 Hours = 7200 Seconds and so on...



run motion with sudo motion stop it with CTRL+C



NOTE - Configure motion.conf to save the files in another directory than the default /tmp. For example your home folder. Since going to /tmp needs more privileges. You will also find many useful options in the motion.conf for many other things you might like.






share|improve this answer























  • That's far better than streamer. Not sure I like a must-have-root solution, and it seems like I lose the ability to use it like a rear-view mirror, but it is far better than streamer, and might solve another problem I've been wanting to look at, which is only taking a picture if I'm there. Will mark this solved if I can fix the other problems.
    – Dave Jacoby
    Apr 6 '11 at 16:57












  • Actually you do not need root access to use it. You only need root access to edit the config file.
    – Luis Alvarado
    Apr 7 '11 at 11:55










  • I suppose if you want to write to the default path, it might be necessary, too, but that's the first thing I changed. Thanks.
    – Dave Jacoby
    Apr 7 '11 at 15:27










  • No problem buddy. Glad to help.
    – Luis Alvarado
    Apr 7 '11 at 16:27










  • I tried it. It worked OK. I might try it again at some point. But it did not give me the rear-view aspect, which I value more than the automated picture taking. So, I'm running Cheese right now.
    – Dave Jacoby
    Apr 12 '11 at 14:48


















up vote
7
down vote














gTimelapse (Download Link)



enter image description here




An application for capturing images to generate timelapse videos, built on gPhoto2 and wxWidgets libraries.




Compile instructions



Download the source from the sourceforge website



in a terminal type the following:



cd Downloads 
gunzip gtimelapse-0.1.tar.gz
tar -xvf gtimelapse-0.1.tar
cd gtimelapse
sudo apt-get install build-essential libgphoto2-2-dev libwxbase2.8-dev libwxgtk2.8-dev gphoto2
./configure
make
sudo make install


To run the application type



gtimelapse &


n.b. 1



gphoto2 --list-cameras | more


n.b. 2



see this blog for further useful info



lists all compatible devices that the application supports



n.b. 3



I've read the gphoto2 does not support webcams - I'll leave this answer visible anyway just in-case anyone wants to try this answer with a decent digital camera instead of a webcam.






share|improve this answer























  • It took quite some time to fetch and compile wxWidgets with all the prerequisites. I also compiled gTimelapse but it just crashes with: [Debug] 13:21:12: ./src/common/menucmn.cpp(859): assert "item" failed in Check(): wxMenu::Check: no such item [Debug] Generating a stack trace... please waitTrace/breakpoint trap
    – Seppo Erviälä
    Jun 25 '11 at 10:23












  • ok - I'll have a go sometime today to build myself - I'll add some instructions to my answer (assuming I can myself get this to build).
    – fossfreedom
    Jun 25 '11 at 10:27










  • This is actually quite helpful since I have a digital camera supported by gphoto2. I didn't know a library like this existed.
    – Seppo Erviälä
    Jun 25 '11 at 16:56


















up vote
1
down vote













I've used Stopmotion to do this, it's in the software center. You can also capture with Cheese, but you have to alter Cheese's configuration to boost the max number of images. I found it easiest to just use Stopmotion for the entire process.






share|improve this answer




























    up vote
    1
    down vote













    The best and easy way to do this is by installing Motion. It's full-scale surveillance software for Linux-based operating systems.



    Install via the software center






    share|improve this answer






























      up vote
      0
      down vote













      You should be able to set up motion (in motion.conf) to stream - by default it streams on port 8081. All you then have to do to get your 'rear view' mirror is to open VLC, "Open Network Stream" and point it at http://localhost:8081.






      share|improve this answer




























        up vote
        0
        down vote













        Camorama is a webcam viewer/recorder which I've used to take pictures, at 1 minute intervals and upload them to a webserver, from my webcam; it's a straightforward setup. Also it's available in the Ubuntu Software Center or you can install it using:



        sudo apt-get install camorama


        Hope this helps.






        share|improve this answer





















        • Sorry, just saw that you had written the your webcam doesn't work with Camorama.
          – kicsyromy
          May 30 '11 at 16:54










        • Could you please explain in more details? Man does not cover timelapse option :(
          – Michal Stefanow
          Oct 7 '12 at 17:40




















        up vote
        0
        down vote














        A quick, dirty, but somewhat more flexible option is as follows:



        ffmpeg -pattern_type glob -framerate 25 -i 'image-*.jpg' -c:v libx264 
        -profile:v high -crf 20 -pix_fmt yuv420p output.mp4


        Here I am adding -pattern_type glob, using the wildcard *, and putting my file name in single quotations: 'image-*.jpg'.



        The benefit: This syntax allows you to start at any number and have any pattern in your numbering (I often create a count by 20, starting around 20000 for example).



        The drawbacks: This syntax does not allow you to skip repeating figures like the '%##d' syntax allows. Also, you cannot have a numbering scheme without preceding 0s. That is, the file naming scheme must be something like 00001, 00002,...00033... (Numbering cannot be 1,2,3,...33,..., else the number '3' will sort between '39' and '40' for example).



        Separately, also note that I had to put my input file name in single quotation marks, otherwise ffmpeg tried to overwrite all of my picture files with a copy of the first picture (It is always a good idea to copy for a backup before manipulating files).




        From this edit by an anonymous user.






        share|improve this answer























          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f50339%2fhow-to-make-a-stop-motion-or-time-lapse-video-with-webcam%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          8 Answers
          8






          active

          oldest

          votes








          8 Answers
          8






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          39
          down vote



          accepted










          Capturing a zillion images.



          The first step is capturing images. Let's imagine you want to take a photo once every 10 seconds and save that into a directory sitting on your desktop



          mkdir ~/Desktop/cap
          cd ~/Desktop/cap


          We use streamer to do the capture so let's install it:



          sudo apt-get install streamer


          And now we want to capture



          streamer -o 0000.jpeg -s 300x200 -j 100 -t 2000 -r 1


          -t is the number of frames we want to capture. -r is frames per second. So this should grab one frame every second. If you compress that down into a 30fps video, one minute of capture becomes 2 seconds of video. You'll want to tune this appropriately depending on how much output video you want.



          That line will give you 2000 images, it'll take half an hour to record and, at 30fps, will generate just over 1 minute of video.



          Putting it all together



          I'm going to use ffmpeg. There are many different ways of putting it together including mencoder but I just prefer ffmpeg's outlook on life. After installing it (sudo apt-get install ffmpeg) just wang out this:



          ffmpeg -r 30 -i %04d.jpeg -s hd480 -vcodec libx264 -vpre hq time-lapse.mp4


          The quality settings there aren't anything like that of my webcam so you might want to play around with the options a lot more to get a better encode, but that should generate you a nice 30fps video, compressed up in x264.



          You might want to play around with the framerate (-r) but I wouldn't go below 15fps.






          share|improve this answer



















          • 1




            Every ten seconds would need -r 0.1.
            – Seppo Erviälä
            Jun 25 '11 at 10:34










          • This is what I was looking for. Thanks!
            – Seppo Erviälä
            Jun 25 '11 at 10:34










          • man streamer doesn't describe ehat each parameter does. Where can I get information about j parameter? How could I make it capture until I press CTRL+C, with given FPS?
            – Tomáš Zato
            Mar 30 '15 at 17:13






          • 1




            @ChrisH It's technically fine, I just mean that's the basic cut off for smooth video. That does largely depend on how quickly you're taking them though.
            – Oli
            Aug 14 '15 at 8:47






          • 1




            @TomášZato streamer -h is much more comprehensive. I hate when developers put in plenty of effort to --help but nothing for the man page.
            – WasabiFlux
            Aug 31 '17 at 19:03

















          up vote
          39
          down vote



          accepted










          Capturing a zillion images.



          The first step is capturing images. Let's imagine you want to take a photo once every 10 seconds and save that into a directory sitting on your desktop



          mkdir ~/Desktop/cap
          cd ~/Desktop/cap


          We use streamer to do the capture so let's install it:



          sudo apt-get install streamer


          And now we want to capture



          streamer -o 0000.jpeg -s 300x200 -j 100 -t 2000 -r 1


          -t is the number of frames we want to capture. -r is frames per second. So this should grab one frame every second. If you compress that down into a 30fps video, one minute of capture becomes 2 seconds of video. You'll want to tune this appropriately depending on how much output video you want.



          That line will give you 2000 images, it'll take half an hour to record and, at 30fps, will generate just over 1 minute of video.



          Putting it all together



          I'm going to use ffmpeg. There are many different ways of putting it together including mencoder but I just prefer ffmpeg's outlook on life. After installing it (sudo apt-get install ffmpeg) just wang out this:



          ffmpeg -r 30 -i %04d.jpeg -s hd480 -vcodec libx264 -vpre hq time-lapse.mp4


          The quality settings there aren't anything like that of my webcam so you might want to play around with the options a lot more to get a better encode, but that should generate you a nice 30fps video, compressed up in x264.



          You might want to play around with the framerate (-r) but I wouldn't go below 15fps.






          share|improve this answer



















          • 1




            Every ten seconds would need -r 0.1.
            – Seppo Erviälä
            Jun 25 '11 at 10:34










          • This is what I was looking for. Thanks!
            – Seppo Erviälä
            Jun 25 '11 at 10:34










          • man streamer doesn't describe ehat each parameter does. Where can I get information about j parameter? How could I make it capture until I press CTRL+C, with given FPS?
            – Tomáš Zato
            Mar 30 '15 at 17:13






          • 1




            @ChrisH It's technically fine, I just mean that's the basic cut off for smooth video. That does largely depend on how quickly you're taking them though.
            – Oli
            Aug 14 '15 at 8:47






          • 1




            @TomášZato streamer -h is much more comprehensive. I hate when developers put in plenty of effort to --help but nothing for the man page.
            – WasabiFlux
            Aug 31 '17 at 19:03















          up vote
          39
          down vote



          accepted







          up vote
          39
          down vote



          accepted






          Capturing a zillion images.



          The first step is capturing images. Let's imagine you want to take a photo once every 10 seconds and save that into a directory sitting on your desktop



          mkdir ~/Desktop/cap
          cd ~/Desktop/cap


          We use streamer to do the capture so let's install it:



          sudo apt-get install streamer


          And now we want to capture



          streamer -o 0000.jpeg -s 300x200 -j 100 -t 2000 -r 1


          -t is the number of frames we want to capture. -r is frames per second. So this should grab one frame every second. If you compress that down into a 30fps video, one minute of capture becomes 2 seconds of video. You'll want to tune this appropriately depending on how much output video you want.



          That line will give you 2000 images, it'll take half an hour to record and, at 30fps, will generate just over 1 minute of video.



          Putting it all together



          I'm going to use ffmpeg. There are many different ways of putting it together including mencoder but I just prefer ffmpeg's outlook on life. After installing it (sudo apt-get install ffmpeg) just wang out this:



          ffmpeg -r 30 -i %04d.jpeg -s hd480 -vcodec libx264 -vpre hq time-lapse.mp4


          The quality settings there aren't anything like that of my webcam so you might want to play around with the options a lot more to get a better encode, but that should generate you a nice 30fps video, compressed up in x264.



          You might want to play around with the framerate (-r) but I wouldn't go below 15fps.






          share|improve this answer














          Capturing a zillion images.



          The first step is capturing images. Let's imagine you want to take a photo once every 10 seconds and save that into a directory sitting on your desktop



          mkdir ~/Desktop/cap
          cd ~/Desktop/cap


          We use streamer to do the capture so let's install it:



          sudo apt-get install streamer


          And now we want to capture



          streamer -o 0000.jpeg -s 300x200 -j 100 -t 2000 -r 1


          -t is the number of frames we want to capture. -r is frames per second. So this should grab one frame every second. If you compress that down into a 30fps video, one minute of capture becomes 2 seconds of video. You'll want to tune this appropriately depending on how much output video you want.



          That line will give you 2000 images, it'll take half an hour to record and, at 30fps, will generate just over 1 minute of video.



          Putting it all together



          I'm going to use ffmpeg. There are many different ways of putting it together including mencoder but I just prefer ffmpeg's outlook on life. After installing it (sudo apt-get install ffmpeg) just wang out this:



          ffmpeg -r 30 -i %04d.jpeg -s hd480 -vcodec libx264 -vpre hq time-lapse.mp4


          The quality settings there aren't anything like that of my webcam so you might want to play around with the options a lot more to get a better encode, but that should generate you a nice 30fps video, compressed up in x264.



          You might want to play around with the framerate (-r) but I wouldn't go below 15fps.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 4 '12 at 11:47









          Pedro Côrte-Real

          486




          486










          answered Jun 24 '11 at 13:01









          Oli

          218k85548758




          218k85548758








          • 1




            Every ten seconds would need -r 0.1.
            – Seppo Erviälä
            Jun 25 '11 at 10:34










          • This is what I was looking for. Thanks!
            – Seppo Erviälä
            Jun 25 '11 at 10:34










          • man streamer doesn't describe ehat each parameter does. Where can I get information about j parameter? How could I make it capture until I press CTRL+C, with given FPS?
            – Tomáš Zato
            Mar 30 '15 at 17:13






          • 1




            @ChrisH It's technically fine, I just mean that's the basic cut off for smooth video. That does largely depend on how quickly you're taking them though.
            – Oli
            Aug 14 '15 at 8:47






          • 1




            @TomášZato streamer -h is much more comprehensive. I hate when developers put in plenty of effort to --help but nothing for the man page.
            – WasabiFlux
            Aug 31 '17 at 19:03
















          • 1




            Every ten seconds would need -r 0.1.
            – Seppo Erviälä
            Jun 25 '11 at 10:34










          • This is what I was looking for. Thanks!
            – Seppo Erviälä
            Jun 25 '11 at 10:34










          • man streamer doesn't describe ehat each parameter does. Where can I get information about j parameter? How could I make it capture until I press CTRL+C, with given FPS?
            – Tomáš Zato
            Mar 30 '15 at 17:13






          • 1




            @ChrisH It's technically fine, I just mean that's the basic cut off for smooth video. That does largely depend on how quickly you're taking them though.
            – Oli
            Aug 14 '15 at 8:47






          • 1




            @TomášZato streamer -h is much more comprehensive. I hate when developers put in plenty of effort to --help but nothing for the man page.
            – WasabiFlux
            Aug 31 '17 at 19:03










          1




          1




          Every ten seconds would need -r 0.1.
          – Seppo Erviälä
          Jun 25 '11 at 10:34




          Every ten seconds would need -r 0.1.
          – Seppo Erviälä
          Jun 25 '11 at 10:34












          This is what I was looking for. Thanks!
          – Seppo Erviälä
          Jun 25 '11 at 10:34




          This is what I was looking for. Thanks!
          – Seppo Erviälä
          Jun 25 '11 at 10:34












          man streamer doesn't describe ehat each parameter does. Where can I get information about j parameter? How could I make it capture until I press CTRL+C, with given FPS?
          – Tomáš Zato
          Mar 30 '15 at 17:13




          man streamer doesn't describe ehat each parameter does. Where can I get information about j parameter? How could I make it capture until I press CTRL+C, with given FPS?
          – Tomáš Zato
          Mar 30 '15 at 17:13




          1




          1




          @ChrisH It's technically fine, I just mean that's the basic cut off for smooth video. That does largely depend on how quickly you're taking them though.
          – Oli
          Aug 14 '15 at 8:47




          @ChrisH It's technically fine, I just mean that's the basic cut off for smooth video. That does largely depend on how quickly you're taking them though.
          – Oli
          Aug 14 '15 at 8:47




          1




          1




          @TomášZato streamer -h is much more comprehensive. I hate when developers put in plenty of effort to --help but nothing for the man page.
          – WasabiFlux
          Aug 31 '17 at 19:03






          @TomášZato streamer -h is much more comprehensive. I hate when developers put in plenty of effort to --help but nothing for the man page.
          – WasabiFlux
          Aug 31 '17 at 19:03














          up vote
          8
          down vote













          To capture every X amount of seconds from a webcam use motion.



          Install motion



          sudo apt-get install motion or sudo aptitude install motion



          Configure motion for every X amount of seconds



          sudo nano /etc/motion/motion.conf



          Change the variables minimum_frame_time and snapshot_interval to the same amount of seconds you wish to take the picture with the webcam.



          10 Minutes = 600 Seconds

          20 Minutes = 1200 Seconds

          30 Minutes = 1800 Seconds

          1 Hour = 3600 Seconds

          2 Hours = 7200 Seconds and so on...



          run motion with sudo motion stop it with CTRL+C



          NOTE - Configure motion.conf to save the files in another directory than the default /tmp. For example your home folder. Since going to /tmp needs more privileges. You will also find many useful options in the motion.conf for many other things you might like.






          share|improve this answer























          • That's far better than streamer. Not sure I like a must-have-root solution, and it seems like I lose the ability to use it like a rear-view mirror, but it is far better than streamer, and might solve another problem I've been wanting to look at, which is only taking a picture if I'm there. Will mark this solved if I can fix the other problems.
            – Dave Jacoby
            Apr 6 '11 at 16:57












          • Actually you do not need root access to use it. You only need root access to edit the config file.
            – Luis Alvarado
            Apr 7 '11 at 11:55










          • I suppose if you want to write to the default path, it might be necessary, too, but that's the first thing I changed. Thanks.
            – Dave Jacoby
            Apr 7 '11 at 15:27










          • No problem buddy. Glad to help.
            – Luis Alvarado
            Apr 7 '11 at 16:27










          • I tried it. It worked OK. I might try it again at some point. But it did not give me the rear-view aspect, which I value more than the automated picture taking. So, I'm running Cheese right now.
            – Dave Jacoby
            Apr 12 '11 at 14:48















          up vote
          8
          down vote













          To capture every X amount of seconds from a webcam use motion.



          Install motion



          sudo apt-get install motion or sudo aptitude install motion



          Configure motion for every X amount of seconds



          sudo nano /etc/motion/motion.conf



          Change the variables minimum_frame_time and snapshot_interval to the same amount of seconds you wish to take the picture with the webcam.



          10 Minutes = 600 Seconds

          20 Minutes = 1200 Seconds

          30 Minutes = 1800 Seconds

          1 Hour = 3600 Seconds

          2 Hours = 7200 Seconds and so on...



          run motion with sudo motion stop it with CTRL+C



          NOTE - Configure motion.conf to save the files in another directory than the default /tmp. For example your home folder. Since going to /tmp needs more privileges. You will also find many useful options in the motion.conf for many other things you might like.






          share|improve this answer























          • That's far better than streamer. Not sure I like a must-have-root solution, and it seems like I lose the ability to use it like a rear-view mirror, but it is far better than streamer, and might solve another problem I've been wanting to look at, which is only taking a picture if I'm there. Will mark this solved if I can fix the other problems.
            – Dave Jacoby
            Apr 6 '11 at 16:57












          • Actually you do not need root access to use it. You only need root access to edit the config file.
            – Luis Alvarado
            Apr 7 '11 at 11:55










          • I suppose if you want to write to the default path, it might be necessary, too, but that's the first thing I changed. Thanks.
            – Dave Jacoby
            Apr 7 '11 at 15:27










          • No problem buddy. Glad to help.
            – Luis Alvarado
            Apr 7 '11 at 16:27










          • I tried it. It worked OK. I might try it again at some point. But it did not give me the rear-view aspect, which I value more than the automated picture taking. So, I'm running Cheese right now.
            – Dave Jacoby
            Apr 12 '11 at 14:48













          up vote
          8
          down vote










          up vote
          8
          down vote









          To capture every X amount of seconds from a webcam use motion.



          Install motion



          sudo apt-get install motion or sudo aptitude install motion



          Configure motion for every X amount of seconds



          sudo nano /etc/motion/motion.conf



          Change the variables minimum_frame_time and snapshot_interval to the same amount of seconds you wish to take the picture with the webcam.



          10 Minutes = 600 Seconds

          20 Minutes = 1200 Seconds

          30 Minutes = 1800 Seconds

          1 Hour = 3600 Seconds

          2 Hours = 7200 Seconds and so on...



          run motion with sudo motion stop it with CTRL+C



          NOTE - Configure motion.conf to save the files in another directory than the default /tmp. For example your home folder. Since going to /tmp needs more privileges. You will also find many useful options in the motion.conf for many other things you might like.






          share|improve this answer














          To capture every X amount of seconds from a webcam use motion.



          Install motion



          sudo apt-get install motion or sudo aptitude install motion



          Configure motion for every X amount of seconds



          sudo nano /etc/motion/motion.conf



          Change the variables minimum_frame_time and snapshot_interval to the same amount of seconds you wish to take the picture with the webcam.



          10 Minutes = 600 Seconds

          20 Minutes = 1200 Seconds

          30 Minutes = 1800 Seconds

          1 Hour = 3600 Seconds

          2 Hours = 7200 Seconds and so on...



          run motion with sudo motion stop it with CTRL+C



          NOTE - Configure motion.conf to save the files in another directory than the default /tmp. For example your home folder. Since going to /tmp needs more privileges. You will also find many useful options in the motion.conf for many other things you might like.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 27 '12 at 13:27

























          answered Apr 6 '11 at 14:34









          Luis Alvarado

          143k135482649




          143k135482649












          • That's far better than streamer. Not sure I like a must-have-root solution, and it seems like I lose the ability to use it like a rear-view mirror, but it is far better than streamer, and might solve another problem I've been wanting to look at, which is only taking a picture if I'm there. Will mark this solved if I can fix the other problems.
            – Dave Jacoby
            Apr 6 '11 at 16:57












          • Actually you do not need root access to use it. You only need root access to edit the config file.
            – Luis Alvarado
            Apr 7 '11 at 11:55










          • I suppose if you want to write to the default path, it might be necessary, too, but that's the first thing I changed. Thanks.
            – Dave Jacoby
            Apr 7 '11 at 15:27










          • No problem buddy. Glad to help.
            – Luis Alvarado
            Apr 7 '11 at 16:27










          • I tried it. It worked OK. I might try it again at some point. But it did not give me the rear-view aspect, which I value more than the automated picture taking. So, I'm running Cheese right now.
            – Dave Jacoby
            Apr 12 '11 at 14:48


















          • That's far better than streamer. Not sure I like a must-have-root solution, and it seems like I lose the ability to use it like a rear-view mirror, but it is far better than streamer, and might solve another problem I've been wanting to look at, which is only taking a picture if I'm there. Will mark this solved if I can fix the other problems.
            – Dave Jacoby
            Apr 6 '11 at 16:57












          • Actually you do not need root access to use it. You only need root access to edit the config file.
            – Luis Alvarado
            Apr 7 '11 at 11:55










          • I suppose if you want to write to the default path, it might be necessary, too, but that's the first thing I changed. Thanks.
            – Dave Jacoby
            Apr 7 '11 at 15:27










          • No problem buddy. Glad to help.
            – Luis Alvarado
            Apr 7 '11 at 16:27










          • I tried it. It worked OK. I might try it again at some point. But it did not give me the rear-view aspect, which I value more than the automated picture taking. So, I'm running Cheese right now.
            – Dave Jacoby
            Apr 12 '11 at 14:48
















          That's far better than streamer. Not sure I like a must-have-root solution, and it seems like I lose the ability to use it like a rear-view mirror, but it is far better than streamer, and might solve another problem I've been wanting to look at, which is only taking a picture if I'm there. Will mark this solved if I can fix the other problems.
          – Dave Jacoby
          Apr 6 '11 at 16:57






          That's far better than streamer. Not sure I like a must-have-root solution, and it seems like I lose the ability to use it like a rear-view mirror, but it is far better than streamer, and might solve another problem I've been wanting to look at, which is only taking a picture if I'm there. Will mark this solved if I can fix the other problems.
          – Dave Jacoby
          Apr 6 '11 at 16:57














          Actually you do not need root access to use it. You only need root access to edit the config file.
          – Luis Alvarado
          Apr 7 '11 at 11:55




          Actually you do not need root access to use it. You only need root access to edit the config file.
          – Luis Alvarado
          Apr 7 '11 at 11:55












          I suppose if you want to write to the default path, it might be necessary, too, but that's the first thing I changed. Thanks.
          – Dave Jacoby
          Apr 7 '11 at 15:27




          I suppose if you want to write to the default path, it might be necessary, too, but that's the first thing I changed. Thanks.
          – Dave Jacoby
          Apr 7 '11 at 15:27












          No problem buddy. Glad to help.
          – Luis Alvarado
          Apr 7 '11 at 16:27




          No problem buddy. Glad to help.
          – Luis Alvarado
          Apr 7 '11 at 16:27












          I tried it. It worked OK. I might try it again at some point. But it did not give me the rear-view aspect, which I value more than the automated picture taking. So, I'm running Cheese right now.
          – Dave Jacoby
          Apr 12 '11 at 14:48




          I tried it. It worked OK. I might try it again at some point. But it did not give me the rear-view aspect, which I value more than the automated picture taking. So, I'm running Cheese right now.
          – Dave Jacoby
          Apr 12 '11 at 14:48










          up vote
          7
          down vote














          gTimelapse (Download Link)



          enter image description here




          An application for capturing images to generate timelapse videos, built on gPhoto2 and wxWidgets libraries.




          Compile instructions



          Download the source from the sourceforge website



          in a terminal type the following:



          cd Downloads 
          gunzip gtimelapse-0.1.tar.gz
          tar -xvf gtimelapse-0.1.tar
          cd gtimelapse
          sudo apt-get install build-essential libgphoto2-2-dev libwxbase2.8-dev libwxgtk2.8-dev gphoto2
          ./configure
          make
          sudo make install


          To run the application type



          gtimelapse &


          n.b. 1



          gphoto2 --list-cameras | more


          n.b. 2



          see this blog for further useful info



          lists all compatible devices that the application supports



          n.b. 3



          I've read the gphoto2 does not support webcams - I'll leave this answer visible anyway just in-case anyone wants to try this answer with a decent digital camera instead of a webcam.






          share|improve this answer























          • It took quite some time to fetch and compile wxWidgets with all the prerequisites. I also compiled gTimelapse but it just crashes with: [Debug] 13:21:12: ./src/common/menucmn.cpp(859): assert "item" failed in Check(): wxMenu::Check: no such item [Debug] Generating a stack trace... please waitTrace/breakpoint trap
            – Seppo Erviälä
            Jun 25 '11 at 10:23












          • ok - I'll have a go sometime today to build myself - I'll add some instructions to my answer (assuming I can myself get this to build).
            – fossfreedom
            Jun 25 '11 at 10:27










          • This is actually quite helpful since I have a digital camera supported by gphoto2. I didn't know a library like this existed.
            – Seppo Erviälä
            Jun 25 '11 at 16:56















          up vote
          7
          down vote














          gTimelapse (Download Link)



          enter image description here




          An application for capturing images to generate timelapse videos, built on gPhoto2 and wxWidgets libraries.




          Compile instructions



          Download the source from the sourceforge website



          in a terminal type the following:



          cd Downloads 
          gunzip gtimelapse-0.1.tar.gz
          tar -xvf gtimelapse-0.1.tar
          cd gtimelapse
          sudo apt-get install build-essential libgphoto2-2-dev libwxbase2.8-dev libwxgtk2.8-dev gphoto2
          ./configure
          make
          sudo make install


          To run the application type



          gtimelapse &


          n.b. 1



          gphoto2 --list-cameras | more


          n.b. 2



          see this blog for further useful info



          lists all compatible devices that the application supports



          n.b. 3



          I've read the gphoto2 does not support webcams - I'll leave this answer visible anyway just in-case anyone wants to try this answer with a decent digital camera instead of a webcam.






          share|improve this answer























          • It took quite some time to fetch and compile wxWidgets with all the prerequisites. I also compiled gTimelapse but it just crashes with: [Debug] 13:21:12: ./src/common/menucmn.cpp(859): assert "item" failed in Check(): wxMenu::Check: no such item [Debug] Generating a stack trace... please waitTrace/breakpoint trap
            – Seppo Erviälä
            Jun 25 '11 at 10:23












          • ok - I'll have a go sometime today to build myself - I'll add some instructions to my answer (assuming I can myself get this to build).
            – fossfreedom
            Jun 25 '11 at 10:27










          • This is actually quite helpful since I have a digital camera supported by gphoto2. I didn't know a library like this existed.
            – Seppo Erviälä
            Jun 25 '11 at 16:56













          up vote
          7
          down vote










          up vote
          7
          down vote










          gTimelapse (Download Link)



          enter image description here




          An application for capturing images to generate timelapse videos, built on gPhoto2 and wxWidgets libraries.




          Compile instructions



          Download the source from the sourceforge website



          in a terminal type the following:



          cd Downloads 
          gunzip gtimelapse-0.1.tar.gz
          tar -xvf gtimelapse-0.1.tar
          cd gtimelapse
          sudo apt-get install build-essential libgphoto2-2-dev libwxbase2.8-dev libwxgtk2.8-dev gphoto2
          ./configure
          make
          sudo make install


          To run the application type



          gtimelapse &


          n.b. 1



          gphoto2 --list-cameras | more


          n.b. 2



          see this blog for further useful info



          lists all compatible devices that the application supports



          n.b. 3



          I've read the gphoto2 does not support webcams - I'll leave this answer visible anyway just in-case anyone wants to try this answer with a decent digital camera instead of a webcam.






          share|improve this answer















          gTimelapse (Download Link)



          enter image description here




          An application for capturing images to generate timelapse videos, built on gPhoto2 and wxWidgets libraries.




          Compile instructions



          Download the source from the sourceforge website



          in a terminal type the following:



          cd Downloads 
          gunzip gtimelapse-0.1.tar.gz
          tar -xvf gtimelapse-0.1.tar
          cd gtimelapse
          sudo apt-get install build-essential libgphoto2-2-dev libwxbase2.8-dev libwxgtk2.8-dev gphoto2
          ./configure
          make
          sudo make install


          To run the application type



          gtimelapse &


          n.b. 1



          gphoto2 --list-cameras | more


          n.b. 2



          see this blog for further useful info



          lists all compatible devices that the application supports



          n.b. 3



          I've read the gphoto2 does not support webcams - I'll leave this answer visible anyway just in-case anyone wants to try this answer with a decent digital camera instead of a webcam.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jun 25 '11 at 16:03

























          answered Jun 24 '11 at 13:14









          fossfreedom

          147k36326371




          147k36326371












          • It took quite some time to fetch and compile wxWidgets with all the prerequisites. I also compiled gTimelapse but it just crashes with: [Debug] 13:21:12: ./src/common/menucmn.cpp(859): assert "item" failed in Check(): wxMenu::Check: no such item [Debug] Generating a stack trace... please waitTrace/breakpoint trap
            – Seppo Erviälä
            Jun 25 '11 at 10:23












          • ok - I'll have a go sometime today to build myself - I'll add some instructions to my answer (assuming I can myself get this to build).
            – fossfreedom
            Jun 25 '11 at 10:27










          • This is actually quite helpful since I have a digital camera supported by gphoto2. I didn't know a library like this existed.
            – Seppo Erviälä
            Jun 25 '11 at 16:56


















          • It took quite some time to fetch and compile wxWidgets with all the prerequisites. I also compiled gTimelapse but it just crashes with: [Debug] 13:21:12: ./src/common/menucmn.cpp(859): assert "item" failed in Check(): wxMenu::Check: no such item [Debug] Generating a stack trace... please waitTrace/breakpoint trap
            – Seppo Erviälä
            Jun 25 '11 at 10:23












          • ok - I'll have a go sometime today to build myself - I'll add some instructions to my answer (assuming I can myself get this to build).
            – fossfreedom
            Jun 25 '11 at 10:27










          • This is actually quite helpful since I have a digital camera supported by gphoto2. I didn't know a library like this existed.
            – Seppo Erviälä
            Jun 25 '11 at 16:56
















          It took quite some time to fetch and compile wxWidgets with all the prerequisites. I also compiled gTimelapse but it just crashes with: [Debug] 13:21:12: ./src/common/menucmn.cpp(859): assert "item" failed in Check(): wxMenu::Check: no such item [Debug] Generating a stack trace... please waitTrace/breakpoint trap
          – Seppo Erviälä
          Jun 25 '11 at 10:23






          It took quite some time to fetch and compile wxWidgets with all the prerequisites. I also compiled gTimelapse but it just crashes with: [Debug] 13:21:12: ./src/common/menucmn.cpp(859): assert "item" failed in Check(): wxMenu::Check: no such item [Debug] Generating a stack trace... please waitTrace/breakpoint trap
          – Seppo Erviälä
          Jun 25 '11 at 10:23














          ok - I'll have a go sometime today to build myself - I'll add some instructions to my answer (assuming I can myself get this to build).
          – fossfreedom
          Jun 25 '11 at 10:27




          ok - I'll have a go sometime today to build myself - I'll add some instructions to my answer (assuming I can myself get this to build).
          – fossfreedom
          Jun 25 '11 at 10:27












          This is actually quite helpful since I have a digital camera supported by gphoto2. I didn't know a library like this existed.
          – Seppo Erviälä
          Jun 25 '11 at 16:56




          This is actually quite helpful since I have a digital camera supported by gphoto2. I didn't know a library like this existed.
          – Seppo Erviälä
          Jun 25 '11 at 16:56










          up vote
          1
          down vote













          I've used Stopmotion to do this, it's in the software center. You can also capture with Cheese, but you have to alter Cheese's configuration to boost the max number of images. I found it easiest to just use Stopmotion for the entire process.






          share|improve this answer

























            up vote
            1
            down vote













            I've used Stopmotion to do this, it's in the software center. You can also capture with Cheese, but you have to alter Cheese's configuration to boost the max number of images. I found it easiest to just use Stopmotion for the entire process.






            share|improve this answer























              up vote
              1
              down vote










              up vote
              1
              down vote









              I've used Stopmotion to do this, it's in the software center. You can also capture with Cheese, but you have to alter Cheese's configuration to boost the max number of images. I found it easiest to just use Stopmotion for the entire process.






              share|improve this answer












              I've used Stopmotion to do this, it's in the software center. You can also capture with Cheese, but you have to alter Cheese's configuration to boost the max number of images. I found it easiest to just use Stopmotion for the entire process.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jun 24 '11 at 11:51









              Tom Brossman

              8,6981148112




              8,6981148112






















                  up vote
                  1
                  down vote













                  The best and easy way to do this is by installing Motion. It's full-scale surveillance software for Linux-based operating systems.



                  Install via the software center






                  share|improve this answer



























                    up vote
                    1
                    down vote













                    The best and easy way to do this is by installing Motion. It's full-scale surveillance software for Linux-based operating systems.



                    Install via the software center






                    share|improve this answer

























                      up vote
                      1
                      down vote










                      up vote
                      1
                      down vote









                      The best and easy way to do this is by installing Motion. It's full-scale surveillance software for Linux-based operating systems.



                      Install via the software center






                      share|improve this answer














                      The best and easy way to do this is by installing Motion. It's full-scale surveillance software for Linux-based operating systems.



                      Install via the software center







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Mar 11 '17 at 19:03









                      Community

                      1




                      1










                      answered Sep 17 '12 at 10:31









                      Vesa

                      111




                      111






















                          up vote
                          0
                          down vote













                          You should be able to set up motion (in motion.conf) to stream - by default it streams on port 8081. All you then have to do to get your 'rear view' mirror is to open VLC, "Open Network Stream" and point it at http://localhost:8081.






                          share|improve this answer

























                            up vote
                            0
                            down vote













                            You should be able to set up motion (in motion.conf) to stream - by default it streams on port 8081. All you then have to do to get your 'rear view' mirror is to open VLC, "Open Network Stream" and point it at http://localhost:8081.






                            share|improve this answer























                              up vote
                              0
                              down vote










                              up vote
                              0
                              down vote









                              You should be able to set up motion (in motion.conf) to stream - by default it streams on port 8081. All you then have to do to get your 'rear view' mirror is to open VLC, "Open Network Stream" and point it at http://localhost:8081.






                              share|improve this answer












                              You should be able to set up motion (in motion.conf) to stream - by default it streams on port 8081. All you then have to do to get your 'rear view' mirror is to open VLC, "Open Network Stream" and point it at http://localhost:8081.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered May 30 '11 at 15:41









                              Derek

                              1




                              1






















                                  up vote
                                  0
                                  down vote













                                  Camorama is a webcam viewer/recorder which I've used to take pictures, at 1 minute intervals and upload them to a webserver, from my webcam; it's a straightforward setup. Also it's available in the Ubuntu Software Center or you can install it using:



                                  sudo apt-get install camorama


                                  Hope this helps.






                                  share|improve this answer





















                                  • Sorry, just saw that you had written the your webcam doesn't work with Camorama.
                                    – kicsyromy
                                    May 30 '11 at 16:54










                                  • Could you please explain in more details? Man does not cover timelapse option :(
                                    – Michal Stefanow
                                    Oct 7 '12 at 17:40

















                                  up vote
                                  0
                                  down vote













                                  Camorama is a webcam viewer/recorder which I've used to take pictures, at 1 minute intervals and upload them to a webserver, from my webcam; it's a straightforward setup. Also it's available in the Ubuntu Software Center or you can install it using:



                                  sudo apt-get install camorama


                                  Hope this helps.






                                  share|improve this answer





















                                  • Sorry, just saw that you had written the your webcam doesn't work with Camorama.
                                    – kicsyromy
                                    May 30 '11 at 16:54










                                  • Could you please explain in more details? Man does not cover timelapse option :(
                                    – Michal Stefanow
                                    Oct 7 '12 at 17:40















                                  up vote
                                  0
                                  down vote










                                  up vote
                                  0
                                  down vote









                                  Camorama is a webcam viewer/recorder which I've used to take pictures, at 1 minute intervals and upload them to a webserver, from my webcam; it's a straightforward setup. Also it's available in the Ubuntu Software Center or you can install it using:



                                  sudo apt-get install camorama


                                  Hope this helps.






                                  share|improve this answer












                                  Camorama is a webcam viewer/recorder which I've used to take pictures, at 1 minute intervals and upload them to a webserver, from my webcam; it's a straightforward setup. Also it's available in the Ubuntu Software Center or you can install it using:



                                  sudo apt-get install camorama


                                  Hope this helps.







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered May 30 '11 at 16:50









                                  kicsyromy

                                  475417




                                  475417












                                  • Sorry, just saw that you had written the your webcam doesn't work with Camorama.
                                    – kicsyromy
                                    May 30 '11 at 16:54










                                  • Could you please explain in more details? Man does not cover timelapse option :(
                                    – Michal Stefanow
                                    Oct 7 '12 at 17:40




















                                  • Sorry, just saw that you had written the your webcam doesn't work with Camorama.
                                    – kicsyromy
                                    May 30 '11 at 16:54










                                  • Could you please explain in more details? Man does not cover timelapse option :(
                                    – Michal Stefanow
                                    Oct 7 '12 at 17:40


















                                  Sorry, just saw that you had written the your webcam doesn't work with Camorama.
                                  – kicsyromy
                                  May 30 '11 at 16:54




                                  Sorry, just saw that you had written the your webcam doesn't work with Camorama.
                                  – kicsyromy
                                  May 30 '11 at 16:54












                                  Could you please explain in more details? Man does not cover timelapse option :(
                                  – Michal Stefanow
                                  Oct 7 '12 at 17:40






                                  Could you please explain in more details? Man does not cover timelapse option :(
                                  – Michal Stefanow
                                  Oct 7 '12 at 17:40












                                  up vote
                                  0
                                  down vote














                                  A quick, dirty, but somewhat more flexible option is as follows:



                                  ffmpeg -pattern_type glob -framerate 25 -i 'image-*.jpg' -c:v libx264 
                                  -profile:v high -crf 20 -pix_fmt yuv420p output.mp4


                                  Here I am adding -pattern_type glob, using the wildcard *, and putting my file name in single quotations: 'image-*.jpg'.



                                  The benefit: This syntax allows you to start at any number and have any pattern in your numbering (I often create a count by 20, starting around 20000 for example).



                                  The drawbacks: This syntax does not allow you to skip repeating figures like the '%##d' syntax allows. Also, you cannot have a numbering scheme without preceding 0s. That is, the file naming scheme must be something like 00001, 00002,...00033... (Numbering cannot be 1,2,3,...33,..., else the number '3' will sort between '39' and '40' for example).



                                  Separately, also note that I had to put my input file name in single quotation marks, otherwise ffmpeg tried to overwrite all of my picture files with a copy of the first picture (It is always a good idea to copy for a backup before manipulating files).




                                  From this edit by an anonymous user.






                                  share|improve this answer



























                                    up vote
                                    0
                                    down vote














                                    A quick, dirty, but somewhat more flexible option is as follows:



                                    ffmpeg -pattern_type glob -framerate 25 -i 'image-*.jpg' -c:v libx264 
                                    -profile:v high -crf 20 -pix_fmt yuv420p output.mp4


                                    Here I am adding -pattern_type glob, using the wildcard *, and putting my file name in single quotations: 'image-*.jpg'.



                                    The benefit: This syntax allows you to start at any number and have any pattern in your numbering (I often create a count by 20, starting around 20000 for example).



                                    The drawbacks: This syntax does not allow you to skip repeating figures like the '%##d' syntax allows. Also, you cannot have a numbering scheme without preceding 0s. That is, the file naming scheme must be something like 00001, 00002,...00033... (Numbering cannot be 1,2,3,...33,..., else the number '3' will sort between '39' and '40' for example).



                                    Separately, also note that I had to put my input file name in single quotation marks, otherwise ffmpeg tried to overwrite all of my picture files with a copy of the first picture (It is always a good idea to copy for a backup before manipulating files).




                                    From this edit by an anonymous user.






                                    share|improve this answer

























                                      up vote
                                      0
                                      down vote










                                      up vote
                                      0
                                      down vote










                                      A quick, dirty, but somewhat more flexible option is as follows:



                                      ffmpeg -pattern_type glob -framerate 25 -i 'image-*.jpg' -c:v libx264 
                                      -profile:v high -crf 20 -pix_fmt yuv420p output.mp4


                                      Here I am adding -pattern_type glob, using the wildcard *, and putting my file name in single quotations: 'image-*.jpg'.



                                      The benefit: This syntax allows you to start at any number and have any pattern in your numbering (I often create a count by 20, starting around 20000 for example).



                                      The drawbacks: This syntax does not allow you to skip repeating figures like the '%##d' syntax allows. Also, you cannot have a numbering scheme without preceding 0s. That is, the file naming scheme must be something like 00001, 00002,...00033... (Numbering cannot be 1,2,3,...33,..., else the number '3' will sort between '39' and '40' for example).



                                      Separately, also note that I had to put my input file name in single quotation marks, otherwise ffmpeg tried to overwrite all of my picture files with a copy of the first picture (It is always a good idea to copy for a backup before manipulating files).




                                      From this edit by an anonymous user.






                                      share|improve this answer















                                      A quick, dirty, but somewhat more flexible option is as follows:



                                      ffmpeg -pattern_type glob -framerate 25 -i 'image-*.jpg' -c:v libx264 
                                      -profile:v high -crf 20 -pix_fmt yuv420p output.mp4


                                      Here I am adding -pattern_type glob, using the wildcard *, and putting my file name in single quotations: 'image-*.jpg'.



                                      The benefit: This syntax allows you to start at any number and have any pattern in your numbering (I often create a count by 20, starting around 20000 for example).



                                      The drawbacks: This syntax does not allow you to skip repeating figures like the '%##d' syntax allows. Also, you cannot have a numbering scheme without preceding 0s. That is, the file naming scheme must be something like 00001, 00002,...00033... (Numbering cannot be 1,2,3,...33,..., else the number '3' will sort between '39' and '40' for example).



                                      Separately, also note that I had to put my input file name in single quotation marks, otherwise ffmpeg tried to overwrite all of my picture files with a copy of the first picture (It is always a good idea to copy for a backup before manipulating files).




                                      From this edit by an anonymous user.







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      answered Nov 12 at 20:55


























                                      community wiki





                                      Tim































                                           

                                          draft saved


                                          draft discarded



















































                                           


                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f50339%2fhow-to-make-a-stop-motion-or-time-lapse-video-with-webcam%23new-answer', 'question_page');
                                          }
                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

                                          ComboBox Display Member on multiple fields

                                          Is it possible to collect Nectar points via Trainline?