javafxvideo

JavaFX - Do video files contain pictures as metadata?


My question is simple, but not as simple as I thought. Did not find any answers in WWW, so I'm asking you guys, are there pictures in video files (for example a thumbnail or preview picture) saved in the metadata?

Thanks in advance :-)


Solution

  • Tricky to answer as the term 'video file' can mean different things.

    Often when people say video file, they mean what is referred to as a Video Container - AVI and MP4 are two common container formats. To complicate it further the container may be itself contained within a streaming protocol.

    Within a video container you will generally have:

    You may also have additionally:

    The Thumbnail stream is used by players to show thumbnails when you move to a certain point in the timeline.

    So to answer your question, the video stream itself does not contain thumbnails but the video container or streaming format might.

    Of course a video is just lots of images shown very quickly one after another, so your client can also just create a thumbnail from any frame in the video also. In practice for timelines this is not very useful as it would mean you would have to fetch that part of the video and decode it, which is not practical to do as fast as people like to scan timelines.