As you'll see, the code isn't that complicated. Honestly, creating the images was probably 90% of the work for this project. If you want to use pictures you create yourself, you simply have to replace what's in the images folder, though you'll probably want to use your own image names, so you'll need to update "lib/key-frame-map.js" too. If you can't use that, Time-Lapse Assembler ( ) is another good option - though it doesn't reduce flikering, so the output may not look that great. The free version also supports the size of the images this app uses. It will smooth out the flickering between images. The script just generates a bunch of images, you have to create the time-lapse with a separate app. If "-l" is omitted, QWERTY will be the layout (probably what you want). Mostly likely you don't want to include the "-e". If you don't want this, just don't include the "-e" parameter. 5 frames will be used for each keystroke (-e means equal frames).Output directory for time-lapse images will be "./output". The input file will be "inputs/75_most_common_words.txt".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).Node index -i inputs/75_most_common_words.txt -o. (Numbering cannot be 1,2,3.33., else the number '3' will sort between '39' and '40' for example). That is, the file naming scheme must be something like 00001, 00002.00033. Also, you cannot have a numbering scheme without preceding 0s. The drawbacks: This syntax does not allow you to skip repeating figures like the '%#d' syntax allows. 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). Here I am adding -pattern_type glob, using the wildcard *, and putting my file name in single quotations: 'image-*.jpg'. profile:v high -crf 20 -pix_fmt yuv420p output.mp4 You might want to play around with the framerate ( -r) but I wouldn't go below 15fps.Ī quick, dirty, but somewhat more flexible option is as follows: ffmpeg -pattern_type glob -framerate 25 -i 'image-*.jpg' -c:v libx264 \ 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. After installing it ( sudo apt-get install ffmpeg) just wang out this: ffmpeg -r 30 -i d.jpeg -s hd480 -vcodec libx264 -vpre hq time-lapse.mp4 There are many different ways of putting it together including mencoder but I just prefer ffmpeg's outlook on life. 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. You'll want to tune this appropriately depending on how much output video you want. If you compress that down into a 30fps video, one minute of capture becomes 2 seconds of video. So this should grab one frame every second. t is the number of frames we want to capture. We use streamer to do the capture so let's install it: sudo apt-get install streamerĪnd now we want to capture streamer -o 0000.jpeg -s 300x200 -j 100 -t 2000 -r 1 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
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |