Create video from bunch of JPEGs
up vote
2
down vote
favorite
I have a CCTV camera that uploads JPEG images (.jpg) to an FTP server when it detects movement. We seem to get quite a few images, so I would like to make them into a video to ease viewing.
I've done several Google searches, but nothing quite produces what I expect to see. The folder I am using has over 2000 images which are named AyyMMddhhmmssff.jpg. If I need to rename, I can do that since I already find I need to for FFMPEG to work.
I'd like an image per second, or maybe 2 per second so the images are easy to view when playing the video back. Yes, I know that will result in a 20/40min+ video!
I'm happy with a Windows, macOS or Ubuntu solution! My preference would be Windows (since that is where the FTP server is).
ImageMagick
convert *.jpg video.mpg
This sounded great, nice and simple. However, I have tried on my Mac (installed via brew) and Ubuntu and both grind performance of the relative system to a halt and after 20 minutes, still not finished. I had to reboot the Mac as I couldn't do anything!
FFMPEG
ffmpeg -y -r 6 -f image2 -s 1920x1080 -i <path>%06d.jpg -vcodec libx264 -pix_fmt yuv420p <path>/video.mp4
I'm no expert when it comes to using FFMPEG, but I have used it for several tasks and found it to be a great utility to have around. The above command does produce a video, but the images display too quickly removing the point of the video. I tried tweaking the values and can get it better, but not exactly what I am after. One attempt (setting -r 1
IIRC) resulted in a single image for the entire video! Its clear I don't understand the various arguments in the FFMPEG command even though I have looked at the manual!
ffmpeg jpeg
add a comment |
up vote
2
down vote
favorite
I have a CCTV camera that uploads JPEG images (.jpg) to an FTP server when it detects movement. We seem to get quite a few images, so I would like to make them into a video to ease viewing.
I've done several Google searches, but nothing quite produces what I expect to see. The folder I am using has over 2000 images which are named AyyMMddhhmmssff.jpg. If I need to rename, I can do that since I already find I need to for FFMPEG to work.
I'd like an image per second, or maybe 2 per second so the images are easy to view when playing the video back. Yes, I know that will result in a 20/40min+ video!
I'm happy with a Windows, macOS or Ubuntu solution! My preference would be Windows (since that is where the FTP server is).
ImageMagick
convert *.jpg video.mpg
This sounded great, nice and simple. However, I have tried on my Mac (installed via brew) and Ubuntu and both grind performance of the relative system to a halt and after 20 minutes, still not finished. I had to reboot the Mac as I couldn't do anything!
FFMPEG
ffmpeg -y -r 6 -f image2 -s 1920x1080 -i <path>%06d.jpg -vcodec libx264 -pix_fmt yuv420p <path>/video.mp4
I'm no expert when it comes to using FFMPEG, but I have used it for several tasks and found it to be a great utility to have around. The above command does produce a video, but the images display too quickly removing the point of the video. I tried tweaking the values and can get it better, but not exactly what I am after. One attempt (setting -r 1
IIRC) resulted in a single image for the entire video! Its clear I don't understand the various arguments in the FFMPEG command even though I have looked at the manual!
ffmpeg jpeg
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I have a CCTV camera that uploads JPEG images (.jpg) to an FTP server when it detects movement. We seem to get quite a few images, so I would like to make them into a video to ease viewing.
I've done several Google searches, but nothing quite produces what I expect to see. The folder I am using has over 2000 images which are named AyyMMddhhmmssff.jpg. If I need to rename, I can do that since I already find I need to for FFMPEG to work.
I'd like an image per second, or maybe 2 per second so the images are easy to view when playing the video back. Yes, I know that will result in a 20/40min+ video!
I'm happy with a Windows, macOS or Ubuntu solution! My preference would be Windows (since that is where the FTP server is).
ImageMagick
convert *.jpg video.mpg
This sounded great, nice and simple. However, I have tried on my Mac (installed via brew) and Ubuntu and both grind performance of the relative system to a halt and after 20 minutes, still not finished. I had to reboot the Mac as I couldn't do anything!
FFMPEG
ffmpeg -y -r 6 -f image2 -s 1920x1080 -i <path>%06d.jpg -vcodec libx264 -pix_fmt yuv420p <path>/video.mp4
I'm no expert when it comes to using FFMPEG, but I have used it for several tasks and found it to be a great utility to have around. The above command does produce a video, but the images display too quickly removing the point of the video. I tried tweaking the values and can get it better, but not exactly what I am after. One attempt (setting -r 1
IIRC) resulted in a single image for the entire video! Its clear I don't understand the various arguments in the FFMPEG command even though I have looked at the manual!
ffmpeg jpeg
I have a CCTV camera that uploads JPEG images (.jpg) to an FTP server when it detects movement. We seem to get quite a few images, so I would like to make them into a video to ease viewing.
I've done several Google searches, but nothing quite produces what I expect to see. The folder I am using has over 2000 images which are named AyyMMddhhmmssff.jpg. If I need to rename, I can do that since I already find I need to for FFMPEG to work.
I'd like an image per second, or maybe 2 per second so the images are easy to view when playing the video back. Yes, I know that will result in a 20/40min+ video!
I'm happy with a Windows, macOS or Ubuntu solution! My preference would be Windows (since that is where the FTP server is).
ImageMagick
convert *.jpg video.mpg
This sounded great, nice and simple. However, I have tried on my Mac (installed via brew) and Ubuntu and both grind performance of the relative system to a halt and after 20 minutes, still not finished. I had to reboot the Mac as I couldn't do anything!
FFMPEG
ffmpeg -y -r 6 -f image2 -s 1920x1080 -i <path>%06d.jpg -vcodec libx264 -pix_fmt yuv420p <path>/video.mp4
I'm no expert when it comes to using FFMPEG, but I have used it for several tasks and found it to be a great utility to have around. The above command does produce a video, but the images display too quickly removing the point of the video. I tried tweaking the values and can get it better, but not exactly what I am after. One attempt (setting -r 1
IIRC) resulted in a single image for the entire video! Its clear I don't understand the various arguments in the FFMPEG command even though I have looked at the manual!
ffmpeg jpeg
ffmpeg jpeg
asked Nov 28 at 12:31
neildeadman
2471321
2471321
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
If you rename the images to be consecutively numbered, then you can use
ffmpeg -y -framerate 1 -i <path>%06d.jpg -r 5 -c:v libx264 -pix_fmt yuv420p <path>/video.mp4
Consecutively numbered, as in 000001.jpg
,000002.jpg
,000003.jpg
... Note that there are exactly 6 characters in each name, which satisfies the %06d
passed on to ffmpeg.
If you don't want to rename, then create a text file of the form,
file first.jpg
file second.jpg
file third.jpg
...
file last.jpg
and then
ffmpeg -f concat -r 1 -i list.txt -r 5 -c:v libx264 -pix_fmt yuv420p <path>/video.mp4
I have already been renaming the images in the format "yyyyMMdd_000001.jpg" etc. but when I run your command, I get the same result I have seen previously with FFMPEG of a single image throughout the video (41mins). Would the name be causing this or something else?!
– neildeadman
Nov 28 at 15:50
Add-report
to your execution and paste or link to he report in your Q.
– Gyan
Nov 28 at 15:52
With that number of images the log was too long to post to pastebin, so I reduced the number of images processed, same result: pastebin.com/03CTErCu
– neildeadman
Nov 29 at 9:34
The log shows no errors; it is as expected. Can you share the output?
– Gyan
Nov 29 at 10:34
You mean the actual video?
– neildeadman
Nov 29 at 11:00
|
show 4 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
If you rename the images to be consecutively numbered, then you can use
ffmpeg -y -framerate 1 -i <path>%06d.jpg -r 5 -c:v libx264 -pix_fmt yuv420p <path>/video.mp4
Consecutively numbered, as in 000001.jpg
,000002.jpg
,000003.jpg
... Note that there are exactly 6 characters in each name, which satisfies the %06d
passed on to ffmpeg.
If you don't want to rename, then create a text file of the form,
file first.jpg
file second.jpg
file third.jpg
...
file last.jpg
and then
ffmpeg -f concat -r 1 -i list.txt -r 5 -c:v libx264 -pix_fmt yuv420p <path>/video.mp4
I have already been renaming the images in the format "yyyyMMdd_000001.jpg" etc. but when I run your command, I get the same result I have seen previously with FFMPEG of a single image throughout the video (41mins). Would the name be causing this or something else?!
– neildeadman
Nov 28 at 15:50
Add-report
to your execution and paste or link to he report in your Q.
– Gyan
Nov 28 at 15:52
With that number of images the log was too long to post to pastebin, so I reduced the number of images processed, same result: pastebin.com/03CTErCu
– neildeadman
Nov 29 at 9:34
The log shows no errors; it is as expected. Can you share the output?
– Gyan
Nov 29 at 10:34
You mean the actual video?
– neildeadman
Nov 29 at 11:00
|
show 4 more comments
up vote
2
down vote
accepted
If you rename the images to be consecutively numbered, then you can use
ffmpeg -y -framerate 1 -i <path>%06d.jpg -r 5 -c:v libx264 -pix_fmt yuv420p <path>/video.mp4
Consecutively numbered, as in 000001.jpg
,000002.jpg
,000003.jpg
... Note that there are exactly 6 characters in each name, which satisfies the %06d
passed on to ffmpeg.
If you don't want to rename, then create a text file of the form,
file first.jpg
file second.jpg
file third.jpg
...
file last.jpg
and then
ffmpeg -f concat -r 1 -i list.txt -r 5 -c:v libx264 -pix_fmt yuv420p <path>/video.mp4
I have already been renaming the images in the format "yyyyMMdd_000001.jpg" etc. but when I run your command, I get the same result I have seen previously with FFMPEG of a single image throughout the video (41mins). Would the name be causing this or something else?!
– neildeadman
Nov 28 at 15:50
Add-report
to your execution and paste or link to he report in your Q.
– Gyan
Nov 28 at 15:52
With that number of images the log was too long to post to pastebin, so I reduced the number of images processed, same result: pastebin.com/03CTErCu
– neildeadman
Nov 29 at 9:34
The log shows no errors; it is as expected. Can you share the output?
– Gyan
Nov 29 at 10:34
You mean the actual video?
– neildeadman
Nov 29 at 11:00
|
show 4 more comments
up vote
2
down vote
accepted
up vote
2
down vote
accepted
If you rename the images to be consecutively numbered, then you can use
ffmpeg -y -framerate 1 -i <path>%06d.jpg -r 5 -c:v libx264 -pix_fmt yuv420p <path>/video.mp4
Consecutively numbered, as in 000001.jpg
,000002.jpg
,000003.jpg
... Note that there are exactly 6 characters in each name, which satisfies the %06d
passed on to ffmpeg.
If you don't want to rename, then create a text file of the form,
file first.jpg
file second.jpg
file third.jpg
...
file last.jpg
and then
ffmpeg -f concat -r 1 -i list.txt -r 5 -c:v libx264 -pix_fmt yuv420p <path>/video.mp4
If you rename the images to be consecutively numbered, then you can use
ffmpeg -y -framerate 1 -i <path>%06d.jpg -r 5 -c:v libx264 -pix_fmt yuv420p <path>/video.mp4
Consecutively numbered, as in 000001.jpg
,000002.jpg
,000003.jpg
... Note that there are exactly 6 characters in each name, which satisfies the %06d
passed on to ffmpeg.
If you don't want to rename, then create a text file of the form,
file first.jpg
file second.jpg
file third.jpg
...
file last.jpg
and then
ffmpeg -f concat -r 1 -i list.txt -r 5 -c:v libx264 -pix_fmt yuv420p <path>/video.mp4
answered Nov 28 at 13:09
Gyan
14.2k21643
14.2k21643
I have already been renaming the images in the format "yyyyMMdd_000001.jpg" etc. but when I run your command, I get the same result I have seen previously with FFMPEG of a single image throughout the video (41mins). Would the name be causing this or something else?!
– neildeadman
Nov 28 at 15:50
Add-report
to your execution and paste or link to he report in your Q.
– Gyan
Nov 28 at 15:52
With that number of images the log was too long to post to pastebin, so I reduced the number of images processed, same result: pastebin.com/03CTErCu
– neildeadman
Nov 29 at 9:34
The log shows no errors; it is as expected. Can you share the output?
– Gyan
Nov 29 at 10:34
You mean the actual video?
– neildeadman
Nov 29 at 11:00
|
show 4 more comments
I have already been renaming the images in the format "yyyyMMdd_000001.jpg" etc. but when I run your command, I get the same result I have seen previously with FFMPEG of a single image throughout the video (41mins). Would the name be causing this or something else?!
– neildeadman
Nov 28 at 15:50
Add-report
to your execution and paste or link to he report in your Q.
– Gyan
Nov 28 at 15:52
With that number of images the log was too long to post to pastebin, so I reduced the number of images processed, same result: pastebin.com/03CTErCu
– neildeadman
Nov 29 at 9:34
The log shows no errors; it is as expected. Can you share the output?
– Gyan
Nov 29 at 10:34
You mean the actual video?
– neildeadman
Nov 29 at 11:00
I have already been renaming the images in the format "yyyyMMdd_000001.jpg" etc. but when I run your command, I get the same result I have seen previously with FFMPEG of a single image throughout the video (41mins). Would the name be causing this or something else?!
– neildeadman
Nov 28 at 15:50
I have already been renaming the images in the format "yyyyMMdd_000001.jpg" etc. but when I run your command, I get the same result I have seen previously with FFMPEG of a single image throughout the video (41mins). Would the name be causing this or something else?!
– neildeadman
Nov 28 at 15:50
Add
-report
to your execution and paste or link to he report in your Q.– Gyan
Nov 28 at 15:52
Add
-report
to your execution and paste or link to he report in your Q.– Gyan
Nov 28 at 15:52
With that number of images the log was too long to post to pastebin, so I reduced the number of images processed, same result: pastebin.com/03CTErCu
– neildeadman
Nov 29 at 9:34
With that number of images the log was too long to post to pastebin, so I reduced the number of images processed, same result: pastebin.com/03CTErCu
– neildeadman
Nov 29 at 9:34
The log shows no errors; it is as expected. Can you share the output?
– Gyan
Nov 29 at 10:34
The log shows no errors; it is as expected. Can you share the output?
– Gyan
Nov 29 at 10:34
You mean the actual video?
– neildeadman
Nov 29 at 11:00
You mean the actual video?
– neildeadman
Nov 29 at 11:00
|
show 4 more comments
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1379071%2fcreate-video-from-bunch-of-jpegs%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown