[FFmpeg-user] Create slideshow with ffmpeg from still images

thljcl jiachielee at live.com
Tue Jul 30 19:21:21 CEST 2013


Oh yes, with regards to why I specify “yuv444p”, do you happen to know that
the chroma subsampling done by different encoders is not necessarily using
the same algorithms? In other words, while the main idea behind chroma
subsampling is same, each encoder may drop different bits from image during
the encoding the process. To be more specific, when we open the image file
for viewing or editing, generally the picture viewer or media player would
decode the image to bitmap and then present it to us on screen. It’s similar
to word document, which is actually a zip file. Each time we open it,
Microsoft word would extract it. In fact, you can even change the filename
extension of docx to zip if you want. The same applies to Excel, PowerPoint,
etc.
Do you realize that it’s generally a bad idea to save the edits directly to
jpg even when the source is the picture you take using your camera? The best
practice would be to convert it to lossless format such as bmp or PNG. Do
your editing there. You can then save it back to jpg when you have done with
editing. You make many edits and save them directly to jpg, you will suffer
what we call “generation loss”. Lossless editing in jpg file is still
possible but only for limited instances, such as “gray scaling”, “rotating
and flipping”, “cropping”, and “rescaling”. Generally, if you draw directly
from jpg in an image editor and save it to jpg, what you will get is “lossy
editing”.
Granted, if the source is encoded to a “color space”, you then use the same
encoder to encode the source in the same color space; it’s really not
necessarily to choose “yuv444p” in this case. But jpeg and H.264 are two
different codecs. Ffmpeg still needs to decode the image before it can
re-encode it. Likewise, you can do frame rate conversion using a different
set of tools, you cannot expect ffmpeg to recover the original lower frame
rate with all the original frames; the algorithms being used might not be
the same.
If the source is PNG image, I don’t even want to specify “YUV444p”; it will
be chosen automatically if no pixel format is specified.




--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Create-slideshow-with-ffmpeg-from-still-images-tp4660277p4660326.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list