summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-06-12 22:32:30 +0200
committerCarl Hetherington <cth@carlh.net>2022-06-12 22:32:34 +0200
commit1c57df596882f15403ee97d01862f8b76cfb797b (patch)
tree2ba7bf92d0de90cd4469e4b16802fd7394994f33 /src
parent59209af1e2d73334ff7dfe6c7da465293dc24c0b (diff)
Add Prores 4444 support (#2263).
Diffstat (limited to 'src')
-rw-r--r--src/lib/export_config.cc8
-rw-r--r--src/lib/ffmpeg_file_encoder.cc9
-rw-r--r--src/lib/ffmpeg_file_encoder.h1
-rw-r--r--src/wx/export_video_file_dialog.cc12
4 files changed, 25 insertions, 5 deletions
diff --git a/src/lib/export_config.cc b/src/lib/export_config.cc
index 66c5e3d66..e030b98e2 100644
--- a/src/lib/export_config.cc
+++ b/src/lib/export_config.cc
@@ -63,6 +63,8 @@ ExportConfig::read(cxml::ConstNodePtr node)
_format = ExportFormat::SUBTITLES_DCP;
} else if (format == "h264-aac") {
_format = ExportFormat::H264_AAC;
+ } else if (format == "prores-4444") {
+ _format = ExportFormat::PRORES_4444;
} else {
_format = ExportFormat::PRORES_HQ;
}
@@ -80,8 +82,12 @@ ExportConfig::write(xmlpp::Element* node) const
string name;
switch (_format) {
+ case ExportFormat::PRORES_4444:
+ name = "prores-4444";
+ break;
case ExportFormat::PRORES_HQ:
- name = "prores";
+ /* Write this but we also accept 'prores' for backwards compatibility */
+ name = "prores-hq";
break;
case ExportFormat::H264_AAC:
name = "h264-aac";
diff --git a/src/lib/ffmpeg_file_encoder.cc b/src/lib/ffmpeg_file_encoder.cc
index 17f6f55cb..307a30aca 100644
--- a/src/lib/ffmpeg_file_encoder.cc
+++ b/src/lib/ffmpeg_file_encoder.cc
@@ -228,6 +228,13 @@ FFmpegFileEncoder::FFmpegFileEncoder (
_pixel_format = pixel_format (format);
switch (format) {
+ case ExportFormat::PRORES_4444:
+ _sample_format = AV_SAMPLE_FMT_S16;
+ _video_codec_name = "prores_ks";
+ _audio_codec_name = "pcm_s16le";
+ av_dict_set(&_video_options, "profile", "4", 0);
+ av_dict_set(&_video_options, "threads", "auto", 0);
+ break;
case ExportFormat::PRORES_HQ:
_sample_format = AV_SAMPLE_FMT_S16;
_video_codec_name = "prores_ks";
@@ -281,6 +288,8 @@ AVPixelFormat
FFmpegFileEncoder::pixel_format (ExportFormat format)
{
switch (format) {
+ case ExportFormat::PRORES_4444:
+ return AV_PIX_FMT_YUV444P10;
case ExportFormat::PRORES_HQ:
return AV_PIX_FMT_YUV422P10;
case ExportFormat::H264_AAC:
diff --git a/src/lib/ffmpeg_file_encoder.h b/src/lib/ffmpeg_file_encoder.h
index fd716d47c..5bf501370 100644
--- a/src/lib/ffmpeg_file_encoder.h
+++ b/src/lib/ffmpeg_file_encoder.h
@@ -43,6 +43,7 @@ class ExportAudioStream;
enum class ExportFormat
{
+ PRORES_4444,
PRORES_HQ,
H264_AAC,
SUBTITLES_DCP
diff --git a/src/wx/export_video_file_dialog.cc b/src/wx/export_video_file_dialog.cc
index 5e5e9c4ff..3cc4b133f 100644
--- a/src/wx/export_video_file_dialog.cc
+++ b/src/wx/export_video_file_dialog.cc
@@ -35,25 +35,29 @@ using std::string;
using boost::bind;
-#define FORMATS 2
+int constexpr FORMATS = 3;
wxString format_names[] = {
- _("MOV / ProRes"),
+ _("MOV / ProRes 4444"),
+ _("MOV / ProRes HQ"),
_("MP4 / H.264"),
};
wxString format_filters[] = {
_("MOV files (*.mov)|*.mov"),
+ _("MOV files (*.mov)|*.mov"),
_("MP4 files (*.mp4)|*.mp4"),
};
wxString format_extensions[] = {
"mov",
+ "mov",
"mp4",
};
ExportFormat formats[] = {
+ ExportFormat::PRORES_4444,
ExportFormat::PRORES_HQ,
ExportFormat::H264_AAC,
};
@@ -165,9 +169,9 @@ ExportVideoFileDialog::format_changed ()
DCPOMATIC_ASSERT (selection >= 0 && selection < FORMATS);
_file->SetWildcard (format_filters[selection]);
_file->SetPath (_initial_name);
- _x264_crf->Enable (selection == 1);
+ _x264_crf->Enable (formats[selection] == ExportFormat::H264_AAC);
for (int i = 0; i < 2; ++i) {
- _x264_crf_label[i]->Enable (selection == 1);
+ _x264_crf_label[i]->Enable(formats[selection] == ExportFormat::H264_AAC);
}
_mixdown->Enable (selection != 2);