For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
StatusSupportDiscussionsLog inSign Up
Docs HomeAPI ReferenceVideo on DemandAI FeaturesLive StreamingVideo PlayerVideo DataCloud PlayoutRecipes
Docs HomeAPI ReferenceVideo on DemandAI FeaturesLive StreamingVideo PlayerVideo DataCloud PlayoutRecipes
  • Get started
    • Overview
    • Quickstart
  • Upload videos
    • Upload videos from device
    • Upload videos from a URL
    • Upload 4K videos
    • Speed up video processing
  • Playback and delivery
    • Play your videos
    • Embed a video in your app
    • Configure media quality levels
    • Enable MP4 Support for offline viewing
    • Create and manage playlists
  • Edit and transform videos
    • Add metadata to videos
    • Add a watermark to a video
    • Add an intro and outro to a video
    • Clip and trim videos
    • Merge and stitch videos
    • Remove unwanted video segments
  • Manage audio and subtitle tracks
    • Upload and play audio and subtitle tracks
    • Add subtitles to a video
    • Generate subtitles automatically
    • Add audio to a video
    • Replace a video's audio track
    • Normalize audio loudness
    • Overlay audio on a video timeline
  • Extract images from video
    • Create thumbnails from a video
    • Create GIFs from a video
    • Create timeline hovers from a video
  • Video security
    • Generate JWTs for secure media
    • Secure media access with JWTs
    • Restrict playback access
    • Set up DRM encryption
    • FairPlay DRM integration
  • VOD events
    • Media events
    • Transform media events
LogoLogo
StatusSupportDiscussionsLog inSign Up
On this page
  • Understanding timeline hover in video
  • What is a spritesheet?
  • Spritesheet structure and metadata
  • Generating spritesheets with FastPix
  • Upload your video
  • Requesting the spritesheet
  • Spritesheet metadata and tile structure
  • WebVTT metadata example
  • JSON metadata example
Extract images from video

Create timeline hovers from a video

Enhance FastPix video player interactivity with timeline hover previews using spritesheets and metadata.
Was this page helpful?
Previous

Generate JWTs for secure media

Next
Built with

Adding timeline hovers using spritesheets allows developers to display key video frames on hover, enhancing user interaction by providing a visual preview of the video timeline. FastPix makes this process efficient by enabling developers to easily generate spritesheets with precise metadata that can be leveraged to create interactive video hovers.


Understanding timeline hover in video

This feature is commonly used on streaming platforms, video-sharing sites, and social media to help users quickly identify sections they are interested in watching.

When users hover over different points on the video timeline, thumbnail images from specific frames are displayed, giving them a quick visual cue of the video’s content at that time.


Timeline hover previews can improve your user engagement by:

  • Reducing skip time: Users can quickly preview a section, reducing random skipping and enhancing overall watch time.
  • Improving content discovery: For longer videos, users can discover key sections without playing the entire video, making it easier to access relevant content.
  • Encouraging interactive experiences: Timeline previews make the video interaction feel seamless and user-friendly, often leading to better engagement metrics.

FastPix lets you implement timeline hover previews by providing an API that generates spritesheets—single image files containing multiple frames from a video. These frames are organized in a grid-like format, enabling fast and efficient access to individual video thumbnails.


What is a spritesheet?

A spritesheet is a powerful tool in video playback and gaming applications, designed to store multiple frames or images within a single file. In the context of video hover previews, spritesheets consolidate key frames from a video, making it easy to display any frame from the timeline with minimal server requests.

Using spritesheets for timeline hovers offers several advantages. Rather than loading multiple image files, spritesheets groups frames into a single file, which saves bandwidth and reduces server load. This streamlined approach also enables faster loading times, as an entire set of frames can be accessed with a single HTTP request, which significantly enhances the speed of hover previews. Additionally, spritesheets provide consistent frame quality across previews, since each frame is predefined and encoded within the same file, maintaining uniform visual quality and creating a seamless user experience.



Spritesheet structure and metadata

Spritesheets used for timeline hovers are typically organized into a grid, with rows and columns representing different frames. FastPix provides additional metadata, such as x-axis and y-axis coordinates for each frame, allowing precise positioning and easy access to individual frames within the spritesheet.

In addition, FastPix offers metadata in both WebVTT (Web Video Text Tracks) and JSON formats, which helps to retrieve and display frames according to hover position along the video timeline.


This metadata includes:

  • Timecodes for frames: Each frame is assigned a timecode, so you know exactly which part of the video each frame represents.
  • Coordinates for frame positioning: The x and y coordinates of each frame within the spritesheet help position it accurately on the hover interface.

By combining spritesheets with metadata, FastPix enables developers to create smooth, responsive timeline hovers that enhance the user’s ability to navigate video content.


Generating spritesheets with FastPix


Upload your video

Start by uploading your video to the FastPix platform to prepare it for on-demand viewing and spritesheet generation. Here’s how:

  • Create an on-demand video: Use the FastPix API to upload your video by URL. The API supports uploads from various sources, including direct uploads from client devices or servers.
  • Check media status: After the upload is complete, the video gets processed. Wait for the media status to update to “ready” before proceeding. This ensures that the video is fully processed and prepared for playback and other operations.

Documentation references

For quick start, check out FastPix’s setup guide here.

For uploading media using URL, refer Upload videos from URL guide.

For uploading media directly from device, refer Upload videos directly guide.


Requesting the spritesheet

To get a spritesheet for your video, send an HTTP request to FastPix using your video’s unique playback ID. This request returns a spritesheet image in the specified format, providing visual snapshots of the video at set intervals.

Use the following URL format to request a spritesheet:

URL
https://images.fastpix.com/{PLAYBACK_ID}/spritesheet.{png|jpg|webp}


Output Formats:

  • PNG: Ideal for high-quality images with transparency.
  • JPG: Suitable for images where file size is a concern.
  • WEBP: Offers superior compression and quality, ideal for web applications.

NOTE

FastPix automatically adjusts the number of tiles based on video length:

  • Video under 15 minutes produce a spritesheet with 50 tiles
  • Video over 15 minutes generate a spritesheet with with 100 titles.

Spritesheet metadata and tile structure

Each spritesheet comes with metadata that contains detailed coordinates for each frame, allowing for accurate positioning of images on a timeline. This metadata is essential for creating an interactive hover effect.

Using Google Drive link to upload

A metadata file accompanies each spritesheet and can be used as a text track for video timelines. This file contains each tile’s x and y coordinates and the associated time range within the video. Additionally, the metadata is available in both JSON and WebVTT formats for easy integration.


WebVTT metadata example

Request typeGET
Request URLhttps://images.fastpix.com/{PLAYBACK_ID}/spritesheet.{vtt/json}
OperationGet spritesheet metadata from a video


Path parameters

Parameter nameMandatoryData typeDescription
PLAYBACK_IDYESUUIDPlayback_id of the media

Query parameters

ParametersTypeDescription
FormatstringBy default the image format in json and vtt request is jpg. You can also change it to png or webp by changing the URL to ?format=png

Example request:

GET
https://images.fastpix.com/{PLAYBACK_ID}/spritesheet.vtt?format=jpg

Here’s the output of the request below:

1 00:00:00.000 --> 00:00:00.100
2 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=0,0,256,160
3
4 00:00:00.100 --> 00:00:00.200
5 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=256,0,256,160
6
7 00:00:00.200 --> 00:00:00.300
8 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=512,0,256,160
9
10 00:00:00.300 --> 00:00:00.400
11 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=768,0,256,160
12
13 00:00:00.400 --> 00:00:00.500
14 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=1024,0,256,160
15
16 00:00:00.500 --> 00:00:00.600
17 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=0,160,256,160
18
19 00:00:00.600 --> 00:00:00.700
20 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=256,160,256,160
21
22 00:00:00.700 --> 00:00:00.800
23 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=512,160,256,160
24
25 00:00:00.800 --> 00:00:00.900
26 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=768,160,256,160
27
28 00:00:00.900 --> 00:00:01.000
29 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=1024,160,256,160
30
31 00:00:01.000 --> 00:00:01.100
32 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=0,320,256,160
33
34 00:00:01.100 --> 00:00:01.200
35 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=256,320,256,160
36
37 00:00:01.200 --> 00:00:01.300
38 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=512,320,256,160
39
40 00:00:01.300 --> 00:00:01.400
41 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=768,320,256,160
42
43 00:00:01.400 --> 00:00:01.500
44 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=1024,320,256,160
45
46 00:00:01.500 --> 00:00:01.600
47 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=0,480,256,160
48
49 00:00:01.600 --> 00:00:01.700
50 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=256,480,256,160
51
52 00:00:01.700 --> 00:00:01.800
53 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=512,480,256,160
54
55 00:00:01.800 --> 00:00:01.900
56 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=768,480,256,160
57
58 00:00:01.900 --> 00:00:02.000
59 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=1024,480,256,160
60
61 00:00:02.000 --> 00:00:02.100
62 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=0,640,256,160
63
64 00:00:02.100 --> 00:00:02.200
65 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=256,640,256,160
66
67 00:00:02.200 --> 00:00:02.299
68 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=512,640,256,160
69
70 00:00:02.299 --> 00:00:02.399
71 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=768,640,256,160
72
73 00:00:02.399 --> 00:00:02.499
74 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=1024,640,256,160
75
76 00:00:02.499 --> 00:00:02.599
77 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=0,800,256,160
78
79 00:00:02.599 --> 00:00:02.699
80 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=256,800,256,160
81
82 00:00:02.699 --> 00:00:02.799
83 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=512,800,256,160
84
85 00:00:02.799 --> 00:00:02.899
86 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=768,800,256,160
87
88 00:00:02.899 --> 00:00:02.999
89 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=1024,800,256,160
90
91 00:00:02.999 --> 00:00:03.099
92 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=0,960,256,160
93
94 00:00:03.099 --> 00:00:03.199
95 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=256,960,256,160
96
97 00:00:03.199 --> 00:00:03.299
98 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=512,960,256,160
99
100 00:00:03.299 --> 00:00:03.399
101 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=768,960,256,160
102
103 00:00:03.399 --> 00:00:03.499
104 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=1024,960,256,160
105
106 00:00:03.499 --> 00:00:03.599
107 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=0,1120,256,160
108
109 00:00:03.599 --> 00:00:03.699
110 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=256,1120,256,160
111
112 00:00:03.699 --> 00:00:03.799
113 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=512,1120,256,160
114
115 00:00:03.799 --> 00:00:03.899
116 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=768,1120,256,160
117
118 00:00:03.899 --> 00:00:03.999
119 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=1024,1120,256,160
120
121 00:00:03.999 --> 00:00:04.099
122 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=0,1280,256,160
123
124 00:00:04.099 --> 00:00:04.199
125 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=256,1280,256,160
126
127 00:00:04.199 --> 00:00:04.299
128 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=512,1280,256,160
129
130 00:00:04.299 --> 00:00:04.399
131 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=768,1280,256,160
132
133 00:00:04.399 --> 00:00:04.499
134 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=1024,1280,256,160
135
136 00:00:04.499 --> 00:00:04.599
137 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=0,1440,256,160
138
139 00:00:04.599 --> 00:00:04.699
140 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=256,1440,256,160
141
142 00:00:04.699 --> 00:00:04.799
143 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=512,1440,256,160
144
145 00:00:04.799 --> 00:00:04.899
146 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=768,1440,256,160
147
148 00:00:04.899 --> 00:00:04.999
149 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=1024,1440,256,160
150
151 00:00:04.999 --> 00:00:05.099
152 https://images.fastpix.com/ffc0e878-8fde-49f2-9f63-d1844249a840/spritesheet.jpg#xywh=0,1600,256,160…….

JSON metadata example

Request typeGET
Request URLhttps://image.fastpix.io/{PLAYBACK_ID}/spritesheet.json
OperationGet spritesheet metadata from a video

Path parameters

Parameter nameMandatoryData TypeDescription
PLAYBACK_IDYESUUIDPlayback_id of the media

Query parameters

ParametersTypeDescription
formatstringBy default the image format in json and vtt request will be jpg. You can also change it to png or webp by changing the URL to ?format=png

Example request:

GET
https://images.fastpix.com/{PLAYBACK_ID}/spritesheet.json?format=png

Here’s the output of the request below:

1 {
2 "url": "https://images.fastpix.com/c2d30996-8de6-441a-b6d9-5ad1761ac1f4/spritesheet.png",
3 "tile_width": 256,
4 "tile_height": 160,
5 "duration": 10,
6 "tiles": [
7 {
8 "start": 0,
9 "x": 0,
10 "y": 0
11 },
12 {
13 "start": 0.200000002980232,
14 "x": 256,
15 "y": 0
16 },
17 {
18 "start": 0.400000005960465,
19 "x": 512,
20 "y": 0
21 },
22 {
23 "start": 0.600000023841858,
24 "x": 768,
25 "y": 0
26 },
27 {
28 "start": 0.800000011920929,
29 "x": 1024,
30 "y": 0
31 },
32 {
33 "start": 1,
34 "x": 0,
35 "y": 160
36 },
37 {
38 "start": 1.20000004768372,
39 "x": 256,
40 "y": 160
41 },
42 {
43 "start": 1.40000009536743,
44 "x": 512,
45 "y": 160
46 },
47 {
48 "start": 1.60000014305115,
49 "x": 768,
50 "y": 160
51 },
52 {
53 "start": 1.80000019073486,
54 "x": 1024,
55 "y": 160
56 },
57 {
58 "start": 2.00000023841858,
59 "x": 0,
60 "y": 320
61 },
62 {
63 "start": 2.2000002861023,
64 "x": 256,
65 "y": 320
66 },
67 {
68 "start": 2.40000033378601,
69 "x": 512,
70 "y": 320
71 },
72 {
73 "start": 2.60000038146973,
74 "x": 768,
75 "y": 320
76 },
77 {
78 "start": 2.80000042915344,
79 "x": 1024,
80 "y": 320
81 },
82 {
83 "start": 3.00000047683716,
84 "x": 0,
85 "y": 480
86 },
87 {
88 "start": 3.20000052452087,
89 "x": 256,
90 "y": 480
91 },
92 {
93 "start": 3.40000057220459,
94 "x": 512,
95 "y": 480
96 },
97 {
98 "start": 3.60000061988831,
99 "x": 768,
100 "y": 480
101 },
102 {
103 "start": 3.80000066757202,
104 "x": 1024,
105 "y": 480
106 },
107 {
108 "start": 4.00000047683716,
109 "x": 0,
110 "y": 640
111 },
112 {
113 "start": 4.2000002861023,
114 "x": 256,
115 "y": 640
116 },
117 {
118 "start": 4.40000009536743,
119 "x": 512,
120 "y": 640
121 },
122 {
123 "start": 4.59999990463257,
124 "x": 768,
125 "y": 640
126 },
127 {
128 "start": 4.79999971389771,
129 "x": 1024,
130 "y": 640
131 },
132 {
133 "start": 4.99999952316284,
134 "x": 0,
135 "y": 800
136 },
137 {
138 "start": 5.19999933242798,
139 "x": 256,
140 "y": 800
141 },
142 {
143 "start": 5.39999914169312,
144 "x": 512,
145 "y": 800
146 },
147 {
148 "start": 5.59999895095825,
149 "x": 768,
150 "y": 800
151 },
152 {
153 "start": 5.79999876022339,
154 "x": 1024,
155 "y": 800
156 },
157 {
158 "start": 5.99999856948853,
159 "x": 0,
160 "y": 960
161 },
162 {
163 "start": 6.19999837875366,
164 "x": 256,
165 "y": 960
166 },
167 {
168 "start": 6.3999981880188,
169 "x": 512,
170 "y": 960
171 },
172 {
173 "start": 6.59999799728394,
174 "x": 768,
175 "y": 960
176 },
177 {
178 "start": 6.79999780654907,
179 "x": 1024,
180 "y": 960
181 },
182 {
183 "start": 6.99999761581421,
184 "x": 0,
185 "y": 1120
186 },
187 {
188 "start": 7.19999742507935,
189 "x": 256,
190 "y": 1120
191 },
192 {
193 "start": 7.39999723434448,
194 "x": 512,
195 "y": 1120
196 },
197 {
198 "start": 7.59999704360962,
199 "x": 768,
200 "y": 1120
201 },
202 {
203 "start": 7.79999685287476,
204 "x": 1024,
205 "y": 1120
206 },
207 {
208 "start": 7.99999666213989,
209 "x": 0,
210 "y": 1280
211 },
212 {
213 "start": 8.19999694824219,
214 "x": 256,
215 "y": 1280
216 },
217 {
218 "start": 8.39999675750732,
219 "x": 512,
220 "y": 1280
221 },
222 {
223 "start": 8.59999656677246,
224 "x": 768,
225 "y": 1280
226 },
227 {
228 "start": 8.7999963760376,
229 "x": 1024,
230 "y": 1280
231 },
232 {
233 "start": 8.99999618530273,
234 "x": 0,
235 "y": 1440
236 },
237 {
238 "start": 9.19999599456787,
239 "x": 256,
240 "y": 1440
241 },
242 {
243 "start": 9.39999580383301,
244 "x": 512,
245 "y": 1440
246 },
247 {
248 "start": 9.59999561309815,
249 "x": 768,
250 "y": 1440
251 },
252 {
253 "start": 9.79999542236328,
254 "x": 1024,
255 "y": 1440
256 },
257 {
258 "start": 9.99999523162842,
259 "x": 0,
260 "y": 1600
261 }
262 ]
263 }

Each tile object specifies the frame’s start time in the video and its x/y coordinates within the spritesheet. This format makes it easy to retrieve frames for timeline hovers by referencing the time intervals and coordinates.