Page 5 of 6 FirstFirst ... 3456 LastLast
Results 41 to 50 of 57

Thread: HOWTO: Make Time Lapse Videos from Photographs

  1. #41
    Join Date
    May 2008
    Beans
    9

    Re: HOWTO: Make Time Lapse Videos from Photographs

    Thanks CyberAngel!

    Had a bit of trouble installing ffmpeg, but managed to get that working.

    With the codecs/settings you recommend I get a bizarre diagonal on the timelapses when the images move fast and furiously. It's like the two parts of the movie don't sync up on either side of this diagonal.

    But the following doesn't present this issue. Dunno if the issue is on the encoding side or the viewing one...

    Code:
    ffmpeg -framerate 30 -pattern_type glob -i '*.JPG' -s:v 1280x720 -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p  output.avi

  2. #42
    Join Date
    Sep 2014
    Beans
    1

    Re: HOWTO: Make Time Lapse Videos from Photographs

    Hi,
    thanks for sharing this...
    When i try using ffmpeg I get this message:
    *** THIS PROGRAM IS DEPRECATED ***
    This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
    and also I get this error:
    Unrecognized option 'pattern_type'Failed to set value 'glob' for option 'pattern_type'
    and also something changed how ffmpeg/avconv wants the input source: it wants
    ./*.jpg

  3. #43
    Join Date
    Sep 2006
    Beans
    3,713

    Re: HOWTO: Make Time Lapse Videos from Photographs

    You're using the counterfeit "ffmpeg" from a fork of FFmpeg called Libav. As far as I know the fake "ffmpeg" and avconv do not have support for the glob pattern type.

    You can download, extract, and run a static build of real ffmpeg available via links on the FFmpeg Download page. Or you can compile ffmpeg.

  4. #44
    Join Date
    Nov 2005
    Location
    Athens,Greece-Oslo,Norway
    Beans
    366
    Distro
    Kubuntu

    Re: HOWTO: Make Time Lapse Videos from Photographs

    @macburgerjunior, FakeOutdoorsman gave you the answer.

    However, I think you could use avconv just by changing the following line in the first step from:

    Code:
    ls -1tr *.jpg | while read filename; do cp $filename renamed/$(printf %05d $counter)_$filename; ((counter++)); done
    to:

    Code:
    ls -1tr *.jpg | while read filename; do cp $filename renamed/$(printf %05d $counter).jpg; ((counter++)); done
    Then you know that all of your renamed picture will have a name composed of 5 digits and a ".jpg" extension and something like the following "should" work.

    Code:
    avconv -r 15 -i '%05d.jpg' -c:v copy output.avi
    I haven't tried it though, so you might need to experiment a little bit.

  5. #45
    Join Date
    Sep 2014
    Beans
    1

    Re: HOWTO: Make Time Lapse Videos from Photographs

    Hey, I just wanted to thank you CyberAngel for the deflickering script. I just made a timelapse with my tripod on a walkway by the sea at twilight, and many people passed with flashlights, changing the exposure. Your script made a HUGE difference in the quality of the timelapse.

  6. #46
    Join Date
    Nov 2005
    Location
    Athens,Greece-Oslo,Norway
    Beans
    366
    Distro
    Kubuntu

    Re: HOWTO: Make Time Lapse Videos from Photographs

    Glad to know it is useful not only for me

  7. #47
    Join Date
    Nov 2005
    Location
    Athens,Greece-Oslo,Norway
    Beans
    366
    Distro
    Kubuntu

    Re: HOWTO: Make Time Lapse Videos from Photographs

    My first 4k time lapse video that is based on this technique

    https://www.youtube.com/watch?v=nEBFQj8oid0

    Edited the video with kdenlive. Added Fade from black and Fade to black effects plus music.

    Rendered with a custom project 4k profile (3840x2160 @ 25fps) and the following custom rendering profile (Lossless 4k MKV):

    Code:
    acodec=ac3 ab=448k ar=44100 ac=2 vcodec=libx264 crf=15 rc-lookahead=60 coder=1 flags=+loop cmp=+chroma partitions=+parti8x8+parti4x4+partp8x8+partp4x4+partb8x8 me_method=umh subq=10 me_range=24 g=250 keyint_min=25 sc_threshold=40 i_qfactor=0.71 b_strategy=2 qcomp=0.6 qmin=0 qmax=51 qdiff=4 bf=8 refs=9 directpred=1 flags2=+mixed_refs+dct8x8+fastpskip+mbtree cqp=0 wpredp=2 trellis=2 weightp=2 deblock=1:0:0 direct=auto muxer=auto aspect=%dar
    Converted to 1080p:

    Code:
    avconv -i 4k.avi -scale 1920x1080 -c:v libx264 -preset slow -crf 15 1080p.mkv
    In youtube, I uploaded only the 4k video and youtube provides the rest of the available resolutions.

  8. #48
    Join Date
    Nov 2005
    Location
    Athens,Greece-Oslo,Norway
    Beans
    366
    Distro
    Kubuntu

    Re: HOWTO: Make Time Lapse Videos from Photographs

    Just updated the main thread to include some more info about the options used on kdenlive in order to get a 4k output.

    I also added an alternative "mogrify" option for multi core resizing using the command "parallel".

  9. #49
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    26,047
    Distro
    Ubuntu Development Release

    Re: HOWTO: Make Time Lapse Videos from Photographs

    Simply awesome! Thank you for giving us your processing details. Very impressive.
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, B.Sc., M.Sc., M.A., Ph.D., Sc.D.

  10. #50
    Join Date
    Sep 2006
    Beans
    3,713

    Re: HOWTO: Make Time Lapse Videos from Photographs

    Nice post. Here is some info that you may be able to use:

    ffmpeg

    • Use -framerate instead of -r as an input option for the image file demuxer. It is more forgiving than -r in case the images somehow vary in frame size or pixel format.
    • In your last ffmpeg example you can use the scale filter instead of -ss: -vf scale=1920:-2. It will keep the aspect ratio.
    • Since FFmpeg development is so active, and because Ubuntu lacks this package until 15.04, I recommend users get a recent build before each major timelapse session (download, PPA, or compile).


    jpegtran

    JPEG images can be losslessly rotated using jpegtran (part of the libjpeg-progs package, I believe). This is useful if the camera was mounted upside-down.
    Code:
    jpegtran -rotate 180 -optimize -copy none -perfect -v input.jpg > output.jpg
    Some extra options are in this example:
    • -optimize will "perform optimization of entropy encoding parameters", which can be slow but can also significantly reduce the size of the image. Probably a waste of time here though since you're likely to re-encode anyway.
    • -copy none will remove all excess baggage such as comments, Exif info, thumbnails etc. This can save file size too, but sometimes that info is useful. Use -copy all if you want to keep everything.
    • -perfect will halt with an error message if the transformation is not considered perfect. The man page doesn't say much else, but I've never had an imperfect one yet.


    Alternatively use exifautotran, also in libjpeg-progs, to rotate according to the Exif Orientation Tag:
    Code:
    exifautotran *.jpg
    Kdenlive

    In Kdenlive you should use the x264 presets instead of attempting to declare a legion of options. So your profile can go from:
    Code:
    acodec=ac3 ab=448k ar=44100 ac=2 vcodec=libx264 crf=15 rc-lookahead=60 coder=1 flags=+loop cmp=+chroma partitions=+parti8x8+parti4x4+partp8x8+partp4x4+partb8x8 me_method=umh subq=10 me_range=24 g=250 keyint_min=25 sc_threshold=40 i_qfactor=0.71 b_strategy=2 qcomp=0.6 qmin=0 qmax=51 qdiff=4 bf=8 refs=9 directpred=1 flags2=+mixed_refs+dct8x8+fastpskip+mbtree cqp=0 wpredp=2 trellis=2 weightp=2 deblock=1:0:0 direct=auto muxer=auto aspect=%dar
    to (untested example):
    Code:
    acodec=libopus ab=128k vcodec=libx264 crf=18 preset=slower muxer=auto aspect=%dar
    • It will probably be hard to notice a difference between crf 15 vs 18, but the file size will likely be roughly 25% smaller (a bad guess). See FFmpeg Wiki: H.264 Video Encoding Guide.
    • libopus, libfdk_aac, libvorbis, and libmp3lame will usually provide better quality per bitrate than ac3, but then it may not be compatible with your desired output container format or playback device/player, or your ffmpeg build may not support these encoders. See FFmpeg Wiki: Guidelines for high quality lossy audio encoding.
    Last edited by FakeOutdoorsman; December 21st, 2014 at 10:04 PM.

Page 5 of 6 FirstFirst ... 3456 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •