Hacker News new | past | comments | ask | show | jobs | submit login
Making Slide Shows with Ffmpeg (dragonquest64.blogspot.com)
55 points by lipeltgm 8 days ago | hide | past | web | favorite | 7 comments





This is a great use of a Makefile- notice how the audio file will only be downloaded if it does not already exist.

That said, if you're just looking for a simple one-liner you can paste into the terminal, my go-to is this one:

    cat *.jpg *.JPG *.jpeg | ffmpeg -r .5 -i - -vf "scale=w=1280:h=720:force_original_aspect_ratio=2,crop=1280:720" -y slideshow.mp4

There are many approaches described in [1], but none of them handle varying aspect ratios, which I find to be the most common problem when creating slideshows.

[1] https://trac.ffmpeg.org/wiki/Slideshow


I've started appreciating Makefiles a lot after using them more. It's honestly the simplest way to batch together tasks that might depend on each other (you can even use them to deploy applications).

> This is a great use of a Makefile- notice how the audio file will only be downloaded if it does not already exist.

Is there a sane way to extend this out to check if a directory exists, and if not then download and unzip a file to create that directory?

The problem I always have with make and bash is that, for example, I only ever want two possible states-- the successfully unzipped directory or no state at all. And the more steps I add the more little state boogers my build system acquires (e.g., partial download, dangling zip file, etc.)


Assuming directory “dir” and that “data.zip” archive will create that directory, this target will create the directory

  dir:
      wget http://.../data.zip
      unzip data.zip

Nice to come across an appreciation of makefiles, often intimidating and frustrating to many but I feel it's a great use wrt video processing.

If you turn the framerate all the way down to 1 FPS that would probably result in a smaller file, but not be as compatible with different player software/hardware. After all, a video is a very fast slide show...

One would hope that compression would make the difference negligible.



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: