If you have large number of pictures to rename, you can use the following command to ease the burden. The command, using the bourne shell syntax, symbolically links all files in the current directory that match *jpg to the /tmp directory in the sequence of img001.jpg, img002.jpg and so on.

x=1; for i in *jpg; do counter=$(printf %03d $x); ln -s "$i" /tmp/img"$counter".jpg; x=$(($x+1)); done
First, rename your pictures to follow a numerical sequence. For example, img1.jpg, img2.jpg, img3.jpg,... Then you may run:

ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg
You can also use cat to pipe images to ffmpeg:

cat *.jpg | ffmpeg -f image2pipe -c:v mjpeg -i - output.mpg
Use the -start_number option to declare a starting number for the sequence. This is useful if your sequence does not start with img001.jpg but is still in a numerical order. The following example will start with img100.jpg:

ffmpeg -f image2 -start_number 100 -i img%d.jpg /tmp/a.mpg
Then run:

ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg

Recommend

FFMPEG FFmpeg FAQ 3 Usage 3.2 How do I encode single pictures into movies?

FFMPEG FFmpeg FAQ 2 Compilation 2.4 How do I use pkg-config when cross-compiling?

FFMPEG FFmpeg FAQ 2 Compilation 2.3 How do I make pkg-config find my libraries?

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.43 zmq

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.42 unix

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.41 udp 3.41.1 Examples

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.41 udp

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.40 tls

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.39 tcp

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.38 tee

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.37 subfile

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.35 srt

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.34 sctp

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.33 sap 3.33.2 Demuxer

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.33 sap 3.33.1 Muxer

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.32 rtsp 3.32.1 Examples

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.32 rtsp

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.30 librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.29 libssh

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.22 rtmp

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.20 prompeg

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.19 pipe

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.18 md5

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.17 mmsh

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.15 Icecast

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.14 http 3.14.1 HTTP Cookies

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.14 http

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.13 hls

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.10 ftp

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.9 file

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.8 data

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.7 crypto

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.6 concatf

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.5 concat

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.4 cache

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.3 bluray

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.2 async

FFMPEG FFmpeg Protocols Documentation 3 Protocols 3.1 amqp

FFMPEG FFmpeg Formats Documentation 5 Metadata

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.35 webm_dash_manifest 4.35.2 Example

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.34 webm_chunk 4.34.2 Example

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.33 tee 4.33.2 Examples

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.30 segment, stream_segment, ssegment 4.30.2 Examples

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.30 segment, stream_segment, ssegment 4.30.1 Options

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.27 nut

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.26 null

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.24 mpegts 4.24.1 Options

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.23 mp3

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.22 mov, mp4, ismv 4.22.2 Example

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.21 md5 4.21.1 Examples

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.20 matroska 4.20.1 Metadata

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.19 image2 4.19.2 Examples

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.18 ico

FFMPEG FFmpeg Formats Documentation 4 Muxers 4.17 hls 4.17.1 Options