Add Ogg Theora support to MovieWriter
Movie Maker mode can now record files in `.ogv` format, which can be directly viewed in Godot's VideoStreamPlayer node along with most video players. This is a lossy format with inter-frame compression, unlike AVI + MJPEG which only performs intra-frame compression. Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro> Co-authored-by: Leo de Penning <leo.depenning@illuminoo.com>
This commit is contained in:
@ -1105,21 +1105,31 @@
|
||||
<member name="editor/movie_writer/mix_rate" type="int" setter="" getter="" default="48000">
|
||||
The audio mix rate to use in the recorded audio when writing a movie (in Hz). This can be different from [member audio/driver/mix_rate], but this value must be divisible by [member editor/movie_writer/fps] to prevent audio from desynchronizing over time.
|
||||
</member>
|
||||
<member name="editor/movie_writer/mjpeg_quality" type="float" setter="" getter="" default="0.75">
|
||||
The JPEG quality to use when writing a video to an AVI file, between [code]0.01[/code] and [code]1.0[/code] (inclusive). Higher [code]quality[/code] values result in better-looking output at the cost of larger file sizes. Recommended [code]quality[/code] values are between [code]0.75[/code] and [code]0.9[/code]. Even at quality [code]1.0[/code], JPEG compression remains lossy.
|
||||
[b]Note:[/b] This does not affect the audio quality or writing PNG image sequences.
|
||||
</member>
|
||||
<member name="editor/movie_writer/movie_file" type="String" setter="" getter="" default="""">
|
||||
The output path for the movie. The file extension determines the [MovieWriter] that will be used.
|
||||
Godot has 2 built-in [MovieWriter]s:
|
||||
- AVI container with MJPEG for video and uncompressed audio ([code].avi[/code] file extension). Lossy compression, medium file sizes, fast encoding. The lossy compression quality can be adjusted by changing [member ProjectSettings.editor/movie_writer/mjpeg_quality]. The resulting file can be viewed in most video players, but it must be converted to another format for viewing on the web or by Godot with [VideoStreamPlayer]. MJPEG does not support transparency. AVI output is currently limited to a file of 4 GB in size at most.
|
||||
Godot has 3 built-in [MovieWriter]s:
|
||||
- OGV container with Theora for video and Vorbis for audio ([code].ogv[/code] file extension). Lossy compression, medium file sizes, fast encoding. The lossy compression quality can be adjusted by changing [member ProjectSettings.editor/movie_writer/video_quality] and [member ProjectSettings.editor/movie_writer/ogv/audio_quality]. The resulting file can be viewed in Godot with [VideoStreamPlayer] and most video players, but not web browsers as they don't support Theora.
|
||||
- AVI container with MJPEG for video and uncompressed audio ([code].avi[/code] file extension). Lossy compression, medium file sizes, fast encoding. The lossy compression quality can be adjusted by changing [member ProjectSettings.editor/movie_writer/video_quality]. The resulting file can be viewed in most video players, but it must be converted to another format for viewing on the web or by Godot with [VideoStreamPlayer]. MJPEG does not support transparency. AVI output is currently limited to a file of 4 GB in size at most.
|
||||
- PNG image sequence for video and WAV for audio ([code].png[/code] file extension). Lossless compression, large file sizes, slow encoding. Designed to be encoded to a video file with another tool such as [url=https://ffmpeg.org/]FFmpeg[/url] after recording. Transparency is currently not supported, even if the root viewport is set to be transparent.
|
||||
If you need to encode to a different format or pipe a stream through third-party software, you can extend this [MovieWriter] class to create your own movie writers.
|
||||
When using PNG output, the frame number will be appended at the end of the file name. It starts from 0 and is padded with 8 digits to ensure correct sorting and easier processing. For example, if the output path is [code]/tmp/hello.png[/code], the first two frames will be [code]/tmp/hello00000000.png[/code] and [code]/tmp/hello00000001.png[/code]. The audio will be saved at [code]/tmp/hello.wav[/code].
|
||||
</member>
|
||||
<member name="editor/movie_writer/ogv/audio_quality" type="float" setter="" getter="" default="0.5">
|
||||
The audio encoding quality to use when writing Vorbis audio to a file, between [code]-0.1[/code] and [code]1.0[/code] (inclusive). Higher [code]quality[/code] values result in better-sounding output at the cost of larger file sizes. Even at quality [code]1.0[/code], compression remains lossy.
|
||||
[b]Note:[/b] This does not affect video quality, which is controlled by [member editor/movie_writer/video_quality] instead.
|
||||
</member>
|
||||
<member name="editor/movie_writer/ogv/encoding_speed" type="int" setter="" getter="" default="4">
|
||||
The tradeoff between encoding speed and compression efficiency. Speed [code]1[/code] is the slowest but provides the best compression. Speed [code]4[/code] is the fastest but provides the worst compression. Video quality is generally not affected significantly by this setting.
|
||||
</member>
|
||||
<member name="editor/movie_writer/ogv/keyframe_interval" type="int" setter="" getter="" default="64">
|
||||
Forces keyframes at the specified interval (in frame count). Higher values can improve compression up to a certain level at the expense of higher latency when seeking.
|
||||
</member>
|
||||
<member name="editor/movie_writer/speaker_mode" type="int" setter="" getter="" default="0">
|
||||
The speaker mode to use in the recorded audio when writing a movie. See [enum AudioServer.SpeakerMode] for possible values.
|
||||
</member>
|
||||
<member name="editor/movie_writer/video_quality" type="float" setter="" getter="" default="0.75">
|
||||
The video encoding quality to use when writing a Theora or AVI (MJPEG) video to a file, between [code]0.0[/code] and [code]1.0[/code] (inclusive). Higher [code]quality[/code] values result in better-looking output at the cost of larger file sizes. Recommended [code]quality[/code] values are between [code]0.75[/code] and [code]0.9[/code]. Even at quality [code]1.0[/code], compression remains lossy.
|
||||
</member>
|
||||
<member name="editor/naming/default_signal_callback_name" type="String" setter="" getter="" default=""_on_{node_name}_{signal_name}"">
|
||||
The format of the default signal callback name (in the Signal Connection Dialog). The following substitutions are available: [code]{NodeName}[/code], [code]{nodeName}[/code], [code]{node_name}[/code], [code]{SignalName}[/code], [code]{signalName}[/code], and [code]{signal_name}[/code].
|
||||
</member>
|
||||
|
||||
Reference in New Issue
Block a user