X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fdvdcreate.C;h=f61078148bedaf8cfae29f0725f54926cfe64d36;hb=a9bdd58fae360fa33d27caa059f5ca2c6fa26cd4;hp=c560f208d1e70c283a20d104a23e111478681771;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/dvdcreate.C b/cinelerra-5.1/cinelerra/dvdcreate.C index c560f208..f6107814 100644 --- a/cinelerra-5.1/cinelerra/dvdcreate.C +++ b/cinelerra-5.1/cinelerra/dvdcreate.C @@ -1,4 +1,5 @@ #include "asset.h" +#include "clip.h" #include "dvdcreate.h" #include "edl.h" #include "edit.h" @@ -24,6 +25,29 @@ // DVD Creation +#define HD_1920x1080_2997 0 +#define HD_1920x1080_2500 1 +#define HD_1280x720_5994p 2 +#define HD_1280x720_5000p 3 +#define HD_720x576_5000p 4 +#define HD_720x576_2500 5 +#define HD_720x480_5994p 6 +#define HD_720x480_2997 7 + +static struct hd_format { + const char *name; + int w, h; + double framerate; +} hd_formats[] = { + { "1920x1080 29.97", 1920,1080, 29.97 }, + { "1920x1080 25", 1920,1080, 25 }, + { "1280x720 59.94p", 1280,720, 59.94 }, + { "1280x720 50p", 1280,720, 50 }, + { "720x576 50p(PAL)", 720,576, 50 }, + { "720x576 25 (PAL)", 720,576, 25 }, + { "720x480 59.94p(NTSC)", 720,480, 59.94 }, + { "720x480 29.97 (NTSC)", 720,480, 29.97 }, +}; const int64_t CreateDVD_Thread::DVD_SIZE = 4700000000; const int CreateDVD_Thread::DVD_STREAMS = 1; @@ -61,14 +85,25 @@ CreateDVD_Thread::CreateDVD_Thread(MWindow *mwindow) this->mwindow = mwindow; this->gui = 0; this->use_deinterlace = 0; - this->use_inverse_telecine = 0; this->use_scale = 0; - this->use_resize_tracks = 0; this->use_histogram = 0; + this->use_inverse_telecine = 0; this->use_wide_audio = 0; this->use_wide_aspect = 0; - this->use_label_chapters = 0; this->use_ffmpeg = 0; + this->use_resize_tracks = 0; + this->use_label_chapters = 0; + + this->dvd_size = DVD_SIZE; + this->dvd_width = DVD_WIDTH; + this->dvd_height = DVD_HEIGHT; + this->dvd_aspect_width = DVD_ASPECT_WIDTH; + this->dvd_aspect_height = DVD_ASPECT_HEIGHT; + this->dvd_framerate = DVD_FRAMERATE; + this->dvd_samplerate = DVD_SAMPLERATE; + this->dvd_max_bitrate = DVD_MAX_BITRATE; + this->dvd_kaudio_rate = DVD_KAUDIO_RATE; + this->max_w = this->max_h = 0; } CreateDVD_Thread::~CreateDVD_Thread() @@ -112,12 +147,12 @@ int CreateDVD_Thread::create_dvd_jobs(ArrayList *jobs, session->video_channels = DVD_STREAMS; session->video_tracks = DVD_STREAMS; - session->frame_rate = DVD_FRAMERATE; - session->output_w = DVD_WIDTH; - session->output_h = DVD_HEIGHT; - session->aspect_w = use_wide_aspect ? DVD_WIDE_ASPECT_WIDTH : DVD_ASPECT_WIDTH; - session->aspect_h = use_wide_aspect ? DVD_WIDE_ASPECT_HEIGHT : DVD_ASPECT_HEIGHT; - session->sample_rate = DVD_SAMPLERATE; + session->frame_rate = dvd_framerate; + session->output_w = dvd_width; + session->output_h = dvd_height; + session->aspect_w = dvd_aspect_width; + session->aspect_h = dvd_aspect_height; + session->sample_rate = dvd_samplerate; session->audio_channels = session->audio_tracks = use_wide_audio ? DVD_WIDE_CHANNELS : DVD_CHANNELS; @@ -145,6 +180,9 @@ int CreateDVD_Thread::create_dvd_jobs(ArrayList *jobs, fprintf(fp,"rm -rf $1/iso\n"); fprintf(fp,"mkdir -p $1/iso\n"); fprintf(fp,"\n"); +// dvdauthor ver 0.7.0 requires this to work + fprintf(fp,"export VIDEO_FORMAT=%s\n", + use_standard == HD_720x576_2500 ? "PAL" : "NTSC"); fprintf(fp,"dvdauthor -x - <\n"); fprintf(fp," \n"); @@ -152,7 +190,8 @@ int CreateDVD_Thread::create_dvd_jobs(ArrayList *jobs, fprintf(fp," \n"); fprintf(fp," \n"); fprintf(fp," \n"); - fprintf(fp,"