mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
classref: Sync with current master branch (96cdbbe)
This commit is contained in:
@@ -19,7 +19,7 @@ Abstract class for non-real-time video recording encoders.
|
||||
Description
|
||||
-----------
|
||||
|
||||
Godot can record videos with non-real-time simulation. Like the ``--fixed-fps`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`, this forces the reported ``delta`` in :ref:`Node._process<class_Node_private_method__process>` functions to be identical across frames, regardless of how long it actually took to render the frame. This can be used to record high-quality videos with perfect frame pacing regardless of your hardware's capabilities.
|
||||
Godot can record videos with non-real-time simulation. Like the ``--fixed-fps`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`, this forces the reported ``delta`` in :ref:`Node._process()<class_Node_private_method__process>` functions to be identical across frames, regardless of how long it actually took to render the frame. This can be used to record high-quality videos with perfect frame pacing regardless of your hardware's capabilities.
|
||||
|
||||
Godot has 2 built-in **MovieWriter**\ s:
|
||||
|
||||
@@ -72,7 +72,7 @@ Method Descriptions
|
||||
|
||||
:ref:`int<class_int>` **_get_audio_mix_rate**\ (\ ) |virtual| |const| :ref:`🔗<class_MovieWriter_private_method__get_audio_mix_rate>`
|
||||
|
||||
Called when the audio sample rate used for recording the audio is requested by the engine. The value returned must be specified in Hz. Defaults to 48000 Hz if :ref:`_get_audio_mix_rate<class_MovieWriter_private_method__get_audio_mix_rate>` is not overridden.
|
||||
Called when the audio sample rate used for recording the audio is requested by the engine. The value returned must be specified in Hz. Defaults to 48000 Hz if :ref:`_get_audio_mix_rate()<class_MovieWriter_private_method__get_audio_mix_rate>` is not overridden.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -84,7 +84,7 @@ Called when the audio sample rate used for recording the audio is requested by t
|
||||
|
||||
:ref:`SpeakerMode<enum_AudioServer_SpeakerMode>` **_get_audio_speaker_mode**\ (\ ) |virtual| |const| :ref:`🔗<class_MovieWriter_private_method__get_audio_speaker_mode>`
|
||||
|
||||
Called when the audio speaker mode used for recording the audio is requested by the engine. This can affect the number of output channels in the resulting audio file/stream. Defaults to :ref:`AudioServer.SPEAKER_MODE_STEREO<class_AudioServer_constant_SPEAKER_MODE_STEREO>` if :ref:`_get_audio_speaker_mode<class_MovieWriter_private_method__get_audio_speaker_mode>` is not overridden.
|
||||
Called when the audio speaker mode used for recording the audio is requested by the engine. This can affect the number of output channels in the resulting audio file/stream. Defaults to :ref:`AudioServer.SPEAKER_MODE_STEREO<class_AudioServer_constant_SPEAKER_MODE_STEREO>` if :ref:`_get_audio_speaker_mode()<class_MovieWriter_private_method__get_audio_speaker_mode>` is not overridden.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -96,7 +96,7 @@ Called when the audio speaker mode used for recording the audio is requested by
|
||||
|
||||
:ref:`bool<class_bool>` **_handles_file**\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_MovieWriter_private_method__handles_file>`
|
||||
|
||||
Called when the engine determines whether this **MovieWriter** is able to handle the file at ``path``. Must return ``true`` if this **MovieWriter** is able to handle the given file path, ``false`` otherwise. Typically, :ref:`_handles_file<class_MovieWriter_private_method__handles_file>` is overridden as follows to allow the user to record a file at any path with a given file extension:
|
||||
Called when the engine determines whether this **MovieWriter** is able to handle the file at ``path``. Must return ``true`` if this **MovieWriter** is able to handle the given file path, ``false`` otherwise. Typically, :ref:`_handles_file()<class_MovieWriter_private_method__handles_file>` is overridden as follows to allow the user to record a file at any path with a given file extension:
|
||||
|
||||
::
|
||||
|
||||
@@ -127,9 +127,9 @@ Called once before the engine starts writing video and audio data. ``movie_size`
|
||||
|
||||
|void| **_write_end**\ (\ ) |virtual| :ref:`🔗<class_MovieWriter_private_method__write_end>`
|
||||
|
||||
Called when the engine finishes writing. This occurs when the engine quits by pressing the window manager's close button, or when :ref:`SceneTree.quit<class_SceneTree_method_quit>` is called.
|
||||
Called when the engine finishes writing. This occurs when the engine quits by pressing the window manager's close button, or when :ref:`SceneTree.quit()<class_SceneTree_method_quit>` is called.
|
||||
|
||||
\ **Note:** Pressing :kbd:`Ctrl + C` on the terminal running the editor/project does *not* result in :ref:`_write_end<class_MovieWriter_private_method__write_end>` being called.
|
||||
\ **Note:** Pressing :kbd:`Ctrl + C` on the terminal running the editor/project does *not* result in :ref:`_write_end()<class_MovieWriter_private_method__write_end>` being called.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -153,9 +153,9 @@ Called at the end of every rendered frame. The ``frame_image`` and ``audio_frame
|
||||
|
||||
|void| **add_writer**\ (\ writer\: :ref:`MovieWriter<class_MovieWriter>`\ ) |static| :ref:`🔗<class_MovieWriter_method_add_writer>`
|
||||
|
||||
Adds a writer to be usable by the engine. The supported file extensions can be set by overriding :ref:`_handles_file<class_MovieWriter_private_method__handles_file>`.
|
||||
Adds a writer to be usable by the engine. The supported file extensions can be set by overriding :ref:`_handles_file()<class_MovieWriter_private_method__handles_file>`.
|
||||
|
||||
\ **Note:** :ref:`add_writer<class_MovieWriter_method_add_writer>` must be called early enough in the engine initialization to work, as movie writing is designed to start at the same time as the rest of the engine.
|
||||
\ **Note:** :ref:`add_writer()<class_MovieWriter_method_add_writer>` must be called early enough in the engine initialization to work, as movie writing is designed to start at the same time as the rest of the engine.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
|
||||
Reference in New Issue
Block a user