Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
3rd October 2019, 16:33 | #1 | Link |
Suspended for forum rule violations
Join Date: Mar 2018
Location: Germany
Posts: 216
|
How to encode a movie with mostly still images?
First ... I'm a newbie to these things ... if me question should sound strange ;-)
In youtube you can find many "videos" that actually aren't videos at all. In the sense that it is (for example) the audio from an old LP record, and the video consists of nothing else but a still image of the cover art, maybe with some blending at both ends and blending of the individual tracks. Although there are new codecs used, the video information makes about 2/3. For example https://youtu.be/NJnRHc7tp10 56% (37 MB) only for 7s of blending and 10 track title frames (= less than 1 MB). My question: Why do the video codecs do so bad on that? Is there a more clever way to combine audio and video in that cases? Optimal would be to set times/ frames from where to show a still image or a few frames... Strange idea? |
3rd October 2019, 16:55 | #2 | Link |
Registered User
Join Date: Nov 2013
Location: France
Posts: 61
|
Hi nji,
I have seen Videos like that you mentioned here. The Quality drops with the Time of the Still images because they are static, means no movement between the Key-frames. When I do a Animation with Photos or Images then I use a Plugin like the "Ken Burns Effect". I also make sure that the Length of the GoP is short. For PAL I use 1 Key-frame every 25 Frames (Short GoP) and for NTSC 1 Key-frame every 30 Frames (Short GoP). In case "Ken Burns" is new to you, the Effect slightly zooms In or out of the Photo or Image. The Effect can also pan over a Photo or Image. This way Photos or Images are no longer static/still. I hope this was helpful for you. Cheers Mick P.S.: GoP = Group of Pictures
__________________
-> May U live 2 C the Dawn <- |
3rd October 2019, 18:19 | #4 | Link |
Registered User
Join Date: Nov 2013
Location: France
Posts: 61
|
Hi Cary,
with a short GoP the resulting Movie of Photos or Images become more consumable and don't suffer from too many P/B Frames between Key-Frames which reduce the Quality and clarity in Medium or Long GoP's. With Movies it's different because there is more movement in the Frames. Cheers Mick
__________________
-> May U live 2 C the Dawn <- |
3rd October 2019, 18:27 | #5 | Link | |
Cary Knoop
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
|
Quote:
|
|
3rd October 2019, 18:42 | #6 | Link |
Registered User
Join Date: Nov 2013
Location: France
Posts: 61
|
Hi Cary,
because P/B Frames only store a part of the Key-Frame. In a Long GoP it simply takes too long between the Key-Frames. Again, I refer to animated Photos or Images, not about Movies which are a total different thing. BTW, "no GoP" would mean Key-Frame only (I-Frame). I think you are familiar how compression works I suggest you do a Test yourself with static Images or Photos in a Long GoP to see for yourself, then you might understand what I mean okay ? Cheers Mick
__________________
-> May U live 2 C the Dawn <- |
3rd October 2019, 19:03 | #7 | Link |
Suspended for forum rule violations
Join Date: Mar 2018
Location: Germany
Posts: 216
|
Thank you for the reply.
Still - I am probably misunderstood. My problem is not the potential degradation of the still image. My question is why codecs/ containers (mp4, avc etc.) do so bad compression ratio on still image. I mean - it actually is no movement, but just still image, and still it needs 37 MB, although the "necessary" info would be less than about 1 MB. And related question: If the codecs/ containers for some reason can't do better... is then there a adequate way to do that? It's like a kind of ... "presentation" (maybe I should take powerpoint ;-) Greetings! |
3rd October 2019, 19:44 | #9 | Link |
Suspended for forum rule violations
Join Date: Mar 2018
Location: Germany
Posts: 216
|
Thank you for the reply.
Still - I am probably misunderstood. My problem is not the potential degradation of the still image. My question is why codecs/ containers (mp4, avc etc.) do so bad compression ratio on still image. I mean - it actually is no movement, but just still image, and still it needs 37 MB, although the "necessary" info would be less than about 1 MB. And related question: If the codecs/ containers for some reason can't do better... is then there a adequate way to do that? It's like a kind of ... "presentation" (maybe I should take powerpoint ;-) Greetings! |
3rd October 2019, 21:04 | #10 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
It has to do with the way youtube re-encodes it.
Sometimes they distribute the encode over multiple encoders so there are more keyframes than you would expect. In theory, you could use 1 frame if it was just a static image (ie. for a video that didn't have fades) . Keyframes "cost" a lot because they encode the entire image complete - there is no temporal compression from adjacent frames But you need at least some keyframes for seeking . eg. If viewer wants to skip to end of song for example. A super long keyframe interval would make seeking difficult and slow if it had a high fps, or the gradation too wide (not able to seek to fine points, but only in big chunks like 5 minutes instead of 1 second) If they used more efficient settings it could be much smaller (more b frames, longer GOP intervals) . But this negatively impacts processing time , and playback experience (seek latency increase), so YT has to make some tradeoffs In theory, you could encode a fractional FPS video, this would mean many fewer images. "b" frames don't "cost" a lot in terms of size for adjacent still frames - but they still cost something. Something is more than nothing. The lowest framerate from YT is 6 (if you upload a 1 fps video, it will be duplicated to 6). (Or at least it used to be when testing a few years ago, it might have changed) The more clever way for you, if it's not for YT (you cannot do much about how YT re-encodes the video, although a lower framerate to 6 will help if it's "still" image) 1) "VFR" . Still sections get lower framerates, even fractional. A still image for 6 minute presentation might be 1 frame. Fast action sequences get higher framerates appropriately 2) And to use efficient encoding settings; larger GOP sizes, slower encoding settings, more b-frames |
3rd October 2019, 21:54 | #11 | Link |
Suspended for forum rule violations
Join Date: Mar 2018
Location: Germany
Posts: 216
|
No, I'm not about YT, that was just an example. VFR - never used that before. Thought it is dead. Is that a property of the container, or of the codec? On VD2/ avc1 codec options ... no VFR anywhere. |
3rd October 2019, 22:04 | #12 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
Just using ideal encoding settings will make a massive difference compared to how YT re-encodes it But to answer the question - There are different types of VFR The one I'm referring to is known as timecode (or timestamp) based VFR . And that is a property of timecodes which get muxed with the container. It basically tells the player when, and how long a certain frame should display. If you look at the mkvmerge documentation, there is a section on "timestamps", and that explains the different types of timestamps (in the past, they were referred to as "timecodes", but it's the same thing) Certain hardware players might have problems playing back timecode VFR, but all common software players should support it Common containers that support VFR are MP4, MKV . mkvmerge can be used for mkv , mp4fpsmod for mp4 If your content is "easy", it's probably simple enough to make the timecodes/timestamps manually . But there are avisynth functions that can decimate duplicates and generate the timescodes as well |
|
3rd October 2019, 22:22 | #13 | Link |
Suspended for forum rule violations
Join Date: Mar 2018
Location: Germany
Posts: 216
|
I'm baffled once more.
An ocean of detail knowledge in these media things. You didn't mention VirtualDub/2 ... so VFR mode(s) won't be available there? (I ask, because that's my tool, and - if possible - would like to avoid to open new tins ;-) Last edited by nji; 3rd October 2019 at 23:34. |
3rd October 2019, 22:25 | #14 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
But encoding it just properly, good settings will make a massive difference compare to how YT processes it Also there is more to learn about - the preprocessing and filtering side. For example , depending on what your source is, just denosing can significantly improve compression |
|
3rd October 2019, 23:33 | #15 | Link |
Suspended for forum rule violations
Join Date: Mar 2018
Location: Germany
Posts: 216
|
Thanks again.
So, first I will have a look at mkvmerge documentation. BTW: How could you know about my de Bergerac nose? :-)) Last edited by nji; 4th October 2019 at 09:30. Reason: BTW added |
5th October 2019, 12:08 | #16 | Link |
Suspended for forum rule violations
Join Date: Mar 2018
Location: Germany
Posts: 216
|
Seeking in VFR
... ok then, if I encode a "movie" with say 10 frames, every lasts several mins (fps = 0,000x), while "background audio" does.
Will sw-players (MPC for example) be able to seek by time (s), or only by frame? |
|
|