How to create a high quality video file from JPGs using FFMPEG?

Questions involving a Windows version of FFmpeg.
texdrone
Posts: 14
Joined: Sun Sep 15, 2019 10:39 pm

How to create a high quality video file from JPGs using FFMPEG?

Post by texdrone » Sun Sep 15, 2019 10:40 pm

I would like to make some short videos from jpeg files. The jpeg files are scans of Super 8mm film, taken frame-by-frame. Each jpeg is 1204x885 pixels. The super 8mm was shot at 18fps. I do not care how large the output video files are, quality is what I am aiming for. Thanks

pandy
Posts: 255
Joined: Mon Feb 24, 2014 1:46 pm

Re: How to create a high quality video file from JPGs using FFMPEG?

Post by pandy » Tue Sep 17, 2019 8:45 pm

try -q:v 2

texdrone
Posts: 14
Joined: Sun Sep 15, 2019 10:39 pm

Re: How to create a high quality video file from JPGs using FFMPEG?

Post by texdrone » Tue Sep 17, 2019 11:15 pm

pandy wrote:
Tue Sep 17, 2019 8:45 pm
try -q:v 2
So something like this?
ffmpeg -framerate 18 -i noname%8d.jpg -q:v 2 output.avi

pandy
Posts: 255
Joined: Mon Feb 24, 2014 1:46 pm

Re: How to create a high quality video file from JPGs using FFMPEG?

Post by pandy » Mon Oct 14, 2019 5:17 pm

more or less yes but perhaps it is better to use some lossless codec so avoid jpeg re-compression

texdrone
Posts: 14
Joined: Sun Sep 15, 2019 10:39 pm

Re: How to create a high quality video file from JPGs using FFMPEG?

Post by texdrone » Tue Oct 15, 2019 12:34 pm

pandy wrote:
Mon Oct 14, 2019 5:17 pm
more or less yes but perhaps it is better to use some lossless codec so avoid jpeg re-compression
What codec would you suggest? thx

pandy
Posts: 255
Joined: Mon Feb 24, 2014 1:46 pm

Re: How to create a high quality video file from JPGs using FFMPEG?

Post by pandy » Tue Oct 15, 2019 6:36 pm

Depends on your goal - this is not clear to me - or your intention is to process further such video - or your intention is just to watch produced video with high quality but at the same time using widely supported lossy codec (as using lossy codec doesn't mean your perceived quality is significantly worse).

texdrone
Posts: 14
Joined: Sun Sep 15, 2019 10:39 pm

Re: How to create a high quality video file from JPGs using FFMPEG?

Post by texdrone » Tue Oct 15, 2019 7:18 pm

pandy wrote:
Tue Oct 15, 2019 6:36 pm
Depends on your goal - this is not clear to me - or your intention is to process further such video - or your intention is just to watch produced video with high quality but at the same time using widely supported lossy codec (as using lossy codec doesn't mean your perceived quality is significantly worse).
These jpg files are frame-by-frame scans of some home movies of my family. I would like to have a very good quality for viewing. I do not plan to process these further. I just want to put them to play as a video, at the correct frame rate (18fps), in a high quality output. thx

pandy
Posts: 255
Joined: Mon Feb 24, 2014 1:46 pm

Re: How to create a high quality video file from JPGs using FFMPEG?

Post by pandy » Wed Oct 16, 2019 5:11 pm

Ok, now it is more clear to me - however be aware of the most important factor - framerate - 18fps is uncommon in video world and as such you may be forced to convert your 18fps video to something more common for video world - you can provide one important thing - how many fps is used by your country - in case of most (if not all) European countries this is usually 25/50 fps, for US things can be slightly more complex as there is more framerates supported in players.
HQ encoding in H.264 is not a problem nowadays - x264 deliver very high quality and provide worldwide compatibility - any sane modern player support H.264.

texdrone
Posts: 14
Joined: Sun Sep 15, 2019 10:39 pm

Re: How to create a high quality video file from JPGs using FFMPEG?

Post by texdrone » Wed Oct 16, 2019 7:15 pm

pandy wrote:
Wed Oct 16, 2019 5:11 pm
Ok, now it is more clear to me - however be aware of the most important factor - framerate - 18fps is uncommon in video world and as such you may be forced to convert your 18fps video to something more common for video world - you can provide one important thing - how many fps is used by your country - in case of most (if not all) European countries this is usually 25/50 fps, for US things can be slightly more complex as there is more framerates supported in players.
HQ encoding in H.264 is not a problem nowadays - x264 deliver very high quality and provide worldwide compatibility - any sane modern player support H.264.
I am in the US. If I use a different frame rate than the video was captured with, will it look odd? This was shot at 18fps on super 8mm.

pandy
Posts: 255
Joined: Mon Feb 24, 2014 1:46 pm

Re: How to create a high quality video file from JPGs using FFMPEG?

Post by pandy » Thu Oct 17, 2019 6:53 pm

This can be interesting for you:
https://forum.doom9.org/showthread.php?t=144271
https://forum.doom9.org/showthread.php?t=165975

I think H.264 can support 18fps - not sure how your player will deal with such video.
I can try to dig my scripts during weekend and perhaps something can be easily adapted to your needs.

Post Reply
'