Results 1 to 7 of 7

Thread: Video from single images

  1. #1
    Join Date
    Jun 2010
    Beans
    57

    Video from single images

    I took a set of photos which I want to combine to a timelapse video. So far I have tried three approaches.

    ffmpeg:
    Code:
    ffmpeg -i DSC_%04d.JPG -vcodec mpeg4 timelapse.mp4
    The command only returns "DSC_%04d.JPG: No such file or directory" where all files in the directory look like DSC_6467.JPG .
    I use ffmpeg 0.10.6-6:0.10.6 from the Jon Severinsson PPA on Ubuntu 12.04

    mencoder:
    Code:
    mencoder -nosound -ovc x264 -x264encopts preset=slow:tune=film:crf=20  mf://*.JPG type=jpeg:fps=25:w=2896:h=1944 -o timelapse.avi
    The result misses the last multiple tens of images.

    avidemux:
    I can attach files manually and create a working video but this is just too much work for some thousand images still waiting.

    I would be thankful if you could solve any of the issues or even propose a new way which will just do the job. Note that I need a non-standard resolutions like 2896x1944.
    Last edited by xxlray; May 25th, 2013 at 08:08 PM. Reason: solved

  2. #2
    Join Date
    Oct 2010
    Location
    London
    Beans
    481
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Video from single images

    The FFmpeg Image2 demuxer looks for files starting at number 0001, so if the lowest image number is something other than 1 you should try something like (to start from the 55th image):

    Code:
    ffmpeg -start_number 55 -i DSC_%04d.JPG -vcodec mpeg4 timelapse.mp4
    ##  or
    ffmpeg -f image2 -start_number 55 -i DSC_%04d.JPG -vcodec mpeg4 timelapse.mp4
    If there are gaps in the numbering, this may not work, so you should try:

    Code:
    ffmpeg -f image2 -pattern_type glob -i 'DSC_*.JPG' -vcodec mpeg4 timelapse.mp4
    Please mark your thread as solved if you get a satisfactory solution to your problem.

  3. #3
    Join Date
    Jun 2010
    Beans
    57

    Re: Video from single images

    The first option unfortunately gives me "Unrecognized option 'start_number'" and the last one "Unrecognized option 'pattern_type'".

  4. #4
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: Video from single images

    It is also possible to use the Openshot video editor.

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

    Re: Video from single images

    Quote Originally Posted by xxlray View Post
    The first option unfortunately gives me "Unrecognized option 'start_number'" and the last one "Unrecognized option 'pattern_type'".
    Your version of ffmpeg is too old. Try a recent static build (just download, extract, and run) or you can compile it fairly easily with these non-intrusive instructions: Compile FFmpeg on Ubuntu.

  6. #6
    Join Date
    Jun 2010
    Beans
    57

    Re: Video from single images

    Quote Originally Posted by sudodus View Post
    It is also possible to use the Openshot video editor.
    I use it a lot and I think you are talking about the "import as image sequence" feature but whenever I try to preview the imported sequence it only shows "INVALID". I think I read that only lower resolutions are so far supported.

    Quote Originally Posted by FakeOutdoorsman View Post
    Your version of ffmpeg is too old. Try a recent static build (just download, extract, and run) or you can compile it fairly easily with these non-intrusive instructions: Compile FFmpeg on Ubuntu.
    I will have to give this a try. Hopefully this will not blow up my system.

  7. #7
    Join Date
    Jun 2010
    Beans
    57

    Re: Video from single images

    The new installation of ffmpeg worked like charm. For anybody interested this is what I did:
    Code:
    mkdir ~/ffmpeg.static
    cd ~/ffmpeg.static
    wget http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.2013-05-25.tar.gz
    tar -xvzf ffmpeg.static.64bit.2013-05-25.tar.gz
    rm ffmpeg.static.64bit.2013-05-25.tar.gz
    cd /path/to/my/photos
    ~/ffmpeg.static/ffmpeg -f image2 -pattern_type glob -i 'DSC_*.JPG' -vcodec mpeg4 timelapse.mp4

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
  •