@@ -8,9 +8,10 @@ Godot supports video playback with the :ref:`class_VideoStreamPlayer` node.
88Supported playback formats
99--------------------------
1010
11- The only supported format in core is **Ogg Theora ** (not to be confused with Ogg
12- Vorbis audio). It's possible for extensions to bring support for additional
13- formats, but no such extensions exist yet as of July 2022.
11+ The only supported format in core is **Ogg Theora ** (not to be confused with
12+ Ogg Vorbis audio) with optional Ogg Vorbis audio tracks. It's possible for
13+ extensions to bring support for additional formats, but no such extensions
14+ exist yet as of July 2022.
1415
1516H.264 and H.265 cannot be supported in core Godot, as they are both encumbered
1617by software patents. AV1 is royalty-free, but it remains slow to decode on the
@@ -152,7 +153,6 @@ Playback limitations
152153
153154There are several limitations with the current implementation of video playback in Godot:
154155
155- - Seeking a video to a certain point is not supported.
156156- Changing playback speed is not supported. VideoStreamPlayer also won't follow
157157 :ref: `Engine.time_scale<class_Engine_property_time_scale> `.
158158- Streaming a video from a URL is not supported.
@@ -195,6 +195,12 @@ below with almost any input video format (AVI, MOV, WebM, …).
195195 You can check this by running ``ffmpeg `` without any arguments, then looking
196196 at the ``configuration: `` line in the command output.
197197
198+ .. warning ::
199+
200+ FFmpeg will erroneuosly drop identical frames when performing a copy of a
201+ Theora stream producing an incorrect video file. Avoid it by always
202+ transcoding video.
203+
198204Balancing quality and file size
199205~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
200206
@@ -217,6 +223,19 @@ dropouts in case of high system load. See
217223for a table listing Ogg Vorbis audio quality presets and their respective
218224variable bitrates.
219225
226+ The **GOP size ** (``-g:v ``) can provide further compression by increasing the
227+ interval between keyframes. The defaul value is pretty low (12). Higher values
228+ can provide better compression at the expense of some quality and slightly
229+ slower seeks. Increasing GOP size usually produces better results than reducing
230+ video quality and it's thus recommended.
231+
232+ .. note ::
233+
234+ GOP sizes above 64 will cause seeks to be slower, more noticeably beyond
235+ every power of two. Also, due to some supposed bug in FFmpeg, using a GOP
236+ size greater than 64 can slow down seeking even more and might create bigger
237+ files.
238+
220239FFmpeg: Convert while preserving original video resolution
221240~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
222241
@@ -227,7 +246,7 @@ static scenes).
227246
228247::
229248
230- ffmpeg -i input.mp4 -q:v 6 -q:a 6 output.ogv
249+ ffmpeg -i input.mp4 -q:v 6 -g:v 30 - q:a 6 output.ogv
231250
232251FFmpeg: Resize the video then convert it
233252~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -238,7 +257,7 @@ significantly if the source is recorded at a higher resolution than 720p:
238257
239258::
240259
241- ffmpeg -i input.mp4 -vf "scale=-1:720" -q:v 6 -q:a 6 output.ogv
260+ ffmpeg -i input.mp4 -vf "scale=-1:720" -q:v 6 -g:v 30 - q:a 6 output.ogv
242261
243262
244263.. Chroma Key Functionality Documentation
0 commit comments