Changeset View
Standalone View
source/blender/makesrna/intern/rna_scene.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 276 Lines • ▼ Show 20 Lines | EnumPropertyItem rna_enum_image_type_items[] = { | ||||
| {0, "", 0, N_("Movie"), NULL}, | {0, "", 0, N_("Movie"), NULL}, | ||||
| {R_IMF_IMTYPE_AVIJPEG, "AVI_JPEG", ICON_FILE_MOVIE, "AVI JPEG", "Output video in AVI JPEG format"}, | {R_IMF_IMTYPE_AVIJPEG, "AVI_JPEG", ICON_FILE_MOVIE, "AVI JPEG", "Output video in AVI JPEG format"}, | ||||
| {R_IMF_IMTYPE_AVIRAW, "AVI_RAW", ICON_FILE_MOVIE, "AVI Raw", "Output video in AVI Raw format"}, | {R_IMF_IMTYPE_AVIRAW, "AVI_RAW", ICON_FILE_MOVIE, "AVI Raw", "Output video in AVI Raw format"}, | ||||
| #ifdef WITH_FRAMESERVER | #ifdef WITH_FRAMESERVER | ||||
| {R_IMF_IMTYPE_FRAMESERVER, "FRAMESERVER", ICON_FILE_SCRIPT, "Frame Server", "Output image to a frameserver"}, | {R_IMF_IMTYPE_FRAMESERVER, "FRAMESERVER", ICON_FILE_SCRIPT, "Frame Server", "Output image to a frameserver"}, | ||||
| #endif | #endif | ||||
| #ifdef WITH_FFMPEG | #ifdef WITH_FFMPEG | ||||
| {R_IMF_IMTYPE_H264, "H264", ICON_FILE_MOVIE, "H.264", "Output video in H.264 format"}, | {R_IMF_IMTYPE_FFMPEG, "FFMPEG", ICON_FILE_MOVIE, "FFmpeg video", "The most versatile way to output video files"}, | ||||
| {R_IMF_IMTYPE_FFMPEG, "FFMPEG", ICON_FILE_MOVIE, "MPEG", "Output video in MPEG format"}, | |||||
| {R_IMF_IMTYPE_THEORA, "THEORA", ICON_FILE_MOVIE, "Ogg Theora", "Output video in Ogg format"}, | |||||
| #endif | #endif | ||||
| #ifdef WITH_QUICKTIME | #ifdef WITH_QUICKTIME | ||||
| {R_IMF_IMTYPE_QUICKTIME, "QUICKTIME", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"}, | {R_IMF_IMTYPE_QUICKTIME, "QUICKTIME", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"}, | ||||
| #endif | #endif | ||||
| #ifdef WITH_FFMPEG | |||||
| {R_IMF_IMTYPE_XVID, "XVID", ICON_FILE_MOVIE, "Xvid", "Output video in Xvid format"}, | |||||
| #endif | |||||
brecht: Originally the way I wanted these presets to work is that you'd have a couple simple ones like… | |||||
Not Done Inline Actions
I think that would be a good approach, if we had it ;-)
In my personal opinion, we could just remove all non-FFmpeg options and always use FFmpeg. That way we simplify things greatly. With the wide range of possible codecs/containers FFmpeg supports, I don't think we really lose any actual functionality.
Not quite. Instead of having these options that I also don't know how to tweak properly
I'm giving the user just this one option:
To me this seems to be a step forward towards the single quality slider. As far as I'm concerned I'd be happy to remove all options in the previous list, and just keep the CRF option. The "keyframe interval" (already existed, but I renamed "GOP size" to "keyframe interval") and "max B-frames" (new) options are needed to create an output file that can be scrubbed through.
Thanks for that. sybren: > Originally the way I wanted these presets to work is that you'd have a couple simple ones… | |||||
Not Done Inline Actions
I agree, as far as I'm concerned we can remove builtin AVI and Quicktime.
That's great! I missed that aspect. I'd almost be inclined to rename that to Quality and map it 0..100%.
Might be good to mention in the property description that these options affect how well scrubbing works. brecht: > In my personal opinion, we could just remove all non-FFmpeg options and always use FFmpeg. | |||||
Not Done Inline Actions
That seems a good idea at first, especially since the CRF numbers would be different when we output 10-bit (per colour per pixel) video. Using an intermediate value would allow Blender to recompute the appropriate CRF given the output format. However, it has some issues. The CRF number is exponential; +6 is roughly half the bitrate while -6 is roughly twice the bitrate [ref]. We can map the 0..100% range to 51..0, but as a naieve user I would expect a percentage to work linear, not exponential. Having a "quality increase" of 11% would correspond to -6 on the CRF number, doubling the bitrate. Furthermore, CRF=23 is a fine default value, which would correspond to 45%; it doesn't seem that good any more. I have to conclude that turning it into a quality percentage doesn't make it easier to understand to novice users, while it makes things harder to understand to those people that actually know about CRF and video encoding. sybren: > That's great! I missed that aspect. I'd almost be inclined to rename that to Quality and map… | |||||
Done Inline ActionsIf we stick to the CRF value, we might want to soft clamp it to a reasonable range (18-28?). We don't need to use a linear mapping, and the fact that values are not particularly intuitive seems to me like an argument in favor of remapping them. But representing it as a 0..100% is also a bit deceptive if 18 is already perceptually lossless, there is no percentage value that intuitively corresponds to that. Perhaps there could be some quality presets, or the UI could show one of multiple labels like this depending on the chosen CRF value: Very Low Quality / Low Quality / Medium Quality / Good Quality / High Quality / Perceptually Lossless / Lossless. brecht: If we stick to the CRF value, we might want to soft clamp it to a reasonable range ([[ http… | |||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| EnumPropertyItem rna_enum_image_color_mode_items[] = { | EnumPropertyItem rna_enum_image_color_mode_items[] = { | ||||
| {R_IMF_PLANES_BW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"}, | {R_IMF_PLANES_BW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"}, | ||||
| {R_IMF_PLANES_RGB, "RGB", 0, "RGB", "Images are saved with RGB (color) data"}, | {R_IMF_PLANES_RGB, "RGB", 0, "RGB", "Images are saved with RGB (color) data"}, | ||||
| {R_IMF_PLANES_RGBA, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"}, | {R_IMF_PLANES_RGBA, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| ▲ Show 20 Lines • Show All 5,012 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) | static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| #ifdef WITH_FFMPEG | #ifdef WITH_FFMPEG | ||||
| /* Container types */ | |||||
| static EnumPropertyItem ffmpeg_format_items[] = { | static EnumPropertyItem ffmpeg_format_items[] = { | ||||
| {FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""}, | {FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""}, | ||||
| {FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""}, | {FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""}, | ||||
| {FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""}, | {FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""}, | ||||
| {FFMPEG_AVI, "AVI", 0, "AVI", ""}, | {FFMPEG_AVI, "AVI", 0, "AVI", ""}, | ||||
| {FFMPEG_MOV, "QUICKTIME", 0, "Quicktime", ""}, | {FFMPEG_MOV, "QUICKTIME", 0, "Quicktime", ""}, | ||||
| {FFMPEG_DV, "DV", 0, "DV", ""}, | {FFMPEG_DV, "DV", 0, "DV", ""}, | ||||
| {FFMPEG_H264, "H264", 0, "H.264", ""}, | // {FFMPEG_H264, "H264", 0, "H.264", ""}, not a container | ||||
| {FFMPEG_XVID, "XVID", 0, "Xvid", ""}, | // {FFMPEG_XVID, "XVID", 0, "Xvid", ""}, not a container | ||||
| {FFMPEG_OGG, "OGG", 0, "Ogg", ""}, | {FFMPEG_OGG, "OGG", 0, "Ogg", ""}, | ||||
| {FFMPEG_MKV, "MKV", 0, "Matroska", ""}, | {FFMPEG_MKV, "MKV", 0, "Matroska", ""}, | ||||
| {FFMPEG_FLV, "FLASH", 0, "Flash", ""}, | {FFMPEG_FLV, "FLASH", 0, "Flash", ""}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| static EnumPropertyItem ffmpeg_codec_items[] = { | static EnumPropertyItem ffmpeg_codec_items[] = { | ||||
| {AV_CODEC_ID_NONE, "NONE", 0, "None", ""}, | {AV_CODEC_ID_NONE, "NONE", 0, "None", ""}, | ||||
| {AV_CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""}, | {AV_CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""}, | ||||
| {AV_CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""}, | {AV_CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""}, | ||||
| {AV_CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4(divx)", ""}, | {AV_CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4(divx)", ""}, | ||||
| {AV_CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""}, | {AV_CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""}, | ||||
| {AV_CODEC_ID_DVVIDEO, "DV", 0, "DV", ""}, | {AV_CODEC_ID_DVVIDEO, "DV", 0, "DV", ""}, | ||||
| {AV_CODEC_ID_H264, "H264", 0, "H.264", ""}, | {AV_CODEC_ID_H264, "H264", 0, "H.264", ""}, | ||||
| {AV_CODEC_ID_THEORA, "THEORA", 0, "Theora", ""}, | {AV_CODEC_ID_THEORA, "THEORA", 0, "Theora", ""}, | ||||
| {AV_CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""}, | {AV_CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""}, | ||||
| {AV_CODEC_ID_FFV1, "FFV1", 0, "FFmpeg video codec #1", ""}, | {AV_CODEC_ID_FFV1, "FFV1", 0, "FFmpeg video codec #1", ""}, | ||||
| {AV_CODEC_ID_QTRLE, "QTRLE", 0, "QT rle / QT Animation", ""}, | {AV_CODEC_ID_QTRLE, "QTRLE", 0, "QT rle / QT Animation", ""}, | ||||
| {AV_CODEC_ID_DNXHD, "DNXHD", 0, "DNxHD", ""}, | {AV_CODEC_ID_DNXHD, "DNXHD", 0, "DNxHD", ""}, | ||||
| {AV_CODEC_ID_PNG, "PNG", 0, "PNG", ""}, | {AV_CODEC_ID_PNG, "PNG", 0, "PNG", ""}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| static EnumPropertyItem ffmpeg_preset_items[] = { | |||||
| {FFM_PRESET_ULTRAFAST, "ULTRAFAST", 0, "Ultra fast; biggest file", ""}, | |||||
| {FFM_PRESET_SUPERFAST, "SUPERFAST", 0, "Super fast", ""}, | |||||
| {FFM_PRESET_VERYFAST, "VERYFAST", 0, "Very fast", ""}, | |||||
| {FFM_PRESET_FASTER, "FASTER", 0, "Faster", ""}, | |||||
| {FFM_PRESET_FAST, "FAST", 0, "Fast", ""}, | |||||
| {FFM_PRESET_MEDIUM, "MEDIUM", 0, "Medium speed", ""}, | |||||
Done Inline ActionsDon't add "; default", we don't do that for other options either. Users can reset to default if they want to know the default. brecht: Don't add "; default", we don't do that for other options either. Users can reset to default if… | |||||
| {FFM_PRESET_SLOW, "SLOW", 0, "Slow", ""}, | |||||
| {FFM_PRESET_SLOWER, "SLOWER", 0, "Slower", ""}, | |||||
| {FFM_PRESET_VERYSLOW, "VERYSLOW", 0, "Very slow; smallest file", ""}, | |||||
| {0, NULL, 0, NULL, NULL} | |||||
| }; | |||||
| static EnumPropertyItem ffmpeg_crf_items[] = { | |||||
| {FFM_CRF_NONE, "NONE", 0, "None; use constant bit-rate", | |||||
| "Use constant bit rate, rather than constant output quality"}, | |||||
| {FFM_CRF_LOSSLESS, "LOSSLESS", 0, "Lossless", ""}, | |||||
| {FFM_CRF_PERC_LOSSLESS, "PERC_LOSSLESS", 0, "Perceptually lossless", ""}, | |||||
| {FFM_CRF_HIGH, "HIGH", 0, "High quality", ""}, | |||||
| {FFM_CRF_MEDIUM, "MEDIUM", 0, "Medium quality", ""}, | |||||
| {FFM_CRF_LOW, "LOW", 0, "Low quality", ""}, | |||||
| {FFM_CRF_VERYLOW, "VERYLOW", 0, "Very low quality", ""}, | |||||
| {FFM_CRF_LOWEST, "LOWEST", 0, "Lowest quality", ""}, | |||||
| {0, NULL, 0, NULL, NULL} | |||||
| }; | |||||
| static EnumPropertyItem ffmpeg_audio_codec_items[] = { | static EnumPropertyItem ffmpeg_audio_codec_items[] = { | ||||
| {AV_CODEC_ID_NONE, "NONE", 0, "None", ""}, | {AV_CODEC_ID_NONE, "NONE", 0, "None", ""}, | ||||
| {AV_CODEC_ID_MP2, "MP2", 0, "MP2", ""}, | {AV_CODEC_ID_MP2, "MP2", 0, "MP2", ""}, | ||||
| {AV_CODEC_ID_MP3, "MP3", 0, "MP3", ""}, | {AV_CODEC_ID_MP3, "MP3", 0, "MP3", ""}, | ||||
| {AV_CODEC_ID_AC3, "AC3", 0, "AC3", ""}, | {AV_CODEC_ID_AC3, "AC3", 0, "AC3", ""}, | ||||
| {AV_CODEC_ID_AAC, "AAC", 0, "AAC", ""}, | {AV_CODEC_ID_AAC, "AAC", 0, "AAC", ""}, | ||||
| {AV_CODEC_ID_VORBIS, "VORBIS", 0, "Vorbis", ""}, | {AV_CODEC_ID_VORBIS, "VORBIS", 0, "Vorbis", ""}, | ||||
| {AV_CODEC_ID_FLAC, "FLAC", 0, "FLAC", ""}, | {AV_CODEC_ID_FLAC, "FLAC", 0, "FLAC", ""}, | ||||
| Show All 15 Lines | #endif | ||||
| RNA_def_struct_sdna(srna, "FFMpegCodecData"); | RNA_def_struct_sdna(srna, "FFMpegCodecData"); | ||||
| RNA_def_struct_ui_text(srna, "FFmpeg Settings", "FFmpeg related settings for the scene"); | RNA_def_struct_ui_text(srna, "FFmpeg Settings", "FFmpeg related settings for the scene"); | ||||
| #ifdef WITH_FFMPEG | #ifdef WITH_FFMPEG | ||||
| prop = RNA_def_property(srna, "format", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "format", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "type"); | RNA_def_property_enum_bitflag_sdna(prop, NULL, "type"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_enum_items(prop, ffmpeg_format_items); | RNA_def_property_enum_items(prop, ffmpeg_format_items); | ||||
| RNA_def_property_ui_text(prop, "Format", "Output file format"); | RNA_def_property_enum_default(prop, FFMPEG_MKV); | ||||
| RNA_def_property_ui_text(prop, "Container", "Output file container"); | |||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update"); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update"); | ||||
| prop = RNA_def_property(srna, "codec", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "codec", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "codec"); | RNA_def_property_enum_bitflag_sdna(prop, NULL, "codec"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_enum_items(prop, ffmpeg_codec_items); | RNA_def_property_enum_items(prop, ffmpeg_codec_items); | ||||
| RNA_def_property_enum_default(prop, AV_CODEC_ID_H264); | |||||
| RNA_def_property_ui_text(prop, "Codec", "FFmpeg codec to use"); | RNA_def_property_ui_text(prop, "Codec", "FFmpeg codec to use"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update"); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update"); | ||||
| prop = RNA_def_property(srna, "video_bitrate", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "video_bitrate", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_int_sdna(prop, NULL, "video_bitrate"); | RNA_def_property_int_sdna(prop, NULL, "video_bitrate"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_ui_text(prop, "Bitrate", "Video bitrate (kb/s)"); | RNA_def_property_ui_text(prop, "Bitrate", "Video bitrate (kb/s)"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| Show All 15 Lines | #ifdef WITH_FFMPEG | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_range(prop, 0, 100000000); | RNA_def_property_range(prop, 0, 100000000); | ||||
| RNA_def_property_ui_text(prop, "Mux Rate", "Mux rate (bits/s(!))"); | RNA_def_property_ui_text(prop, "Mux Rate", "Mux rate (bits/s(!))"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| prop = RNA_def_property(srna, "gopsize", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "gopsize", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_int_sdna(prop, NULL, "gop_size"); | RNA_def_property_int_sdna(prop, NULL, "gop_size"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_range(prop, 0, 100); | RNA_def_property_range(prop, 0, 500); | ||||
| RNA_def_property_ui_text(prop, "GOP Size", "Distance between key frames"); | RNA_def_property_int_default(prop, 25); | ||||
| RNA_def_property_ui_text(prop, "Keyframe interval", | |||||
| "Distance between key frames, also known as GOP size; " | |||||
| "influences file size and seekability"); | |||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |||||
| prop = RNA_def_property(srna, "max_b_frames", PROP_INT, PROP_NONE); | |||||
| RNA_def_property_int_sdna(prop, NULL, "max_b_frames"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_range(prop, 0, 16); | |||||
| RNA_def_property_ui_text(prop, "Max B-frames", | |||||
| "Maximum number of B-frames between non-B-frames; influences file size and seekability"); | |||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |||||
| prop = RNA_def_property(srna, "use_max_b_frames", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flags", FFMPEG_USE_MAX_B_FRAMES); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_ui_text(prop, "Use max B-frames", "Set a maximum number of B-frames"); | |||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| prop = RNA_def_property(srna, "buffersize", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "buffersize", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_int_sdna(prop, NULL, "rc_buffer_size"); | RNA_def_property_int_sdna(prop, NULL, "rc_buffer_size"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_range(prop, 0, 2000); | RNA_def_property_range(prop, 0, 2000); | ||||
| RNA_def_property_ui_text(prop, "Buffersize", "Rate control: buffer size (kb)"); | RNA_def_property_ui_text(prop, "Buffersize", "Rate control: buffer size (kb)"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| prop = RNA_def_property(srna, "packetsize", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "packetsize", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_int_sdna(prop, NULL, "mux_packet_size"); | RNA_def_property_int_sdna(prop, NULL, "mux_packet_size"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_range(prop, 0, 16384); | RNA_def_property_range(prop, 0, 16384); | ||||
| RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte)"); | RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte)"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| prop = RNA_def_property(srna, "constant_rate_factor", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_sdna(prop, NULL, "constant_rate_factor"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_enum_items(prop, ffmpeg_crf_items); | |||||
| RNA_def_property_enum_default(prop, FFM_CRF_MEDIUM); | |||||
| RNA_def_property_ui_text(prop, "Output quality", | |||||
| "Constant Rate Factor (CRF); tradeoff between video quality and file size"); | |||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |||||
| prop = RNA_def_property(srna, "ffmpeg_preset", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffmpeg_preset"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_enum_items(prop, ffmpeg_preset_items); | |||||
| RNA_def_property_enum_default(prop, FFM_PRESET_MEDIUM); | |||||
| RNA_def_property_ui_text(prop, "Encoding speed", | |||||
Not Done Inline ActionsThe name is confusing in my opinion since we already have another type of preset and this is not like that. I would use something like "Performance". brecht: The name is confusing in my opinion since we already have another type of preset and this is… | |||||
Not Done Inline ActionsI agree, but "performance" might not be the best label -- after all, it's a balance between performance (quick compression = done faster = high performance) and performance (good compression = smaller file = high performance). Maybe "encoding speed" is better, as it matches the choices given to the user. sybren: I agree, but "performance" might not be the best label -- after all, it's a balance between… | |||||
Done Inline ActionsI like Encoding Speed as a name. brecht: I like Encoding Speed as a name. | |||||
| "Tradeoff between encoding speed and compression ratio"); | |||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |||||
| prop = RNA_def_property(srna, "use_autosplit", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_autosplit", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flags", FFMPEG_AUTOSPLIT_OUTPUT); | RNA_def_property_boolean_sdna(prop, NULL, "flags", FFMPEG_AUTOSPLIT_OUTPUT); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary"); | RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| prop = RNA_def_property(srna, "use_lossless_output", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_lossless_output", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flags", FFMPEG_LOSSLESS_OUTPUT); | RNA_def_property_boolean_sdna(prop, NULL, "flags", FFMPEG_LOSSLESS_OUTPUT); | ||||
| ▲ Show 20 Lines • Show All 1,782 Lines • Show Last 20 Lines | |||||
Originally the way I wanted these presets to work is that you'd have a couple simple ones like H.264, Ogg Theora, Xvid, with good defaults and a single quality slider, and leave FFmpeg as an advanced choice. We didn't quite get there though.
I don't think the average user even knows what FFmpeg, and shouldn't have to know. So from that point of view it would be nice if the python presets could still be in this menu, perhaps even with a quality slider that drivers the other settings interactively, but that would require custom code.
This is going back in the direction of the previous system where the user is exposed to all these options that I don't even have any idea how to tweak properly. Which might still be better than the unfinished thing we have now, but I wanted to explain the original rationale.