- job = new BatchRenderJob(mwindow->preferences);
- jobs->append(job);
- strcpy(&job->edl_path[0], xml_filename);
- asset = job->asset;
-
- sprintf(&asset->path[0],"%s/dvd.ac3", asset_dir);
- asset->audio_data = 1;
- asset->format = FILE_AC3;
- asset->channels = session->audio_channels;
- asset->sample_rate = session->sample_rate;
- asset->bits = 16;
- asset->byte_order = 0;
- asset->signed_ = 1;
- asset->header = 0;
- asset->dither = 0;
- asset->ac3_bitrate = DVD_KAUDIO_RATE;
+ if( use_ffmpeg ) {
+ char option_path[BCTEXTLEN];
+ sprintf(&asset->path[0],"%s/dvd.mpg", asset_dir);
+ asset->format = FILE_FFMPEG;
+ strcpy(asset->fformat, "dvd");
+
+ asset->audio_data = 1;
+ strcpy(asset->acodec, "dvd.dvd");
+ FFMPEG::set_option_path(option_path, "audio/%s", asset->acodec);
+ FFMPEG::load_options(option_path, asset->ff_audio_options,
+ sizeof(asset->ff_audio_options));
+ asset->ff_audio_bitrate = DVD_KAUDIO_RATE * 1000;
+
+ asset->video_data = 1;
+ strcpy(asset->vcodec, "dvd.dvd");
+ FFMPEG::set_option_path(option_path, "video/%s", asset->vcodec);
+ FFMPEG::load_options(option_path, asset->ff_video_options,
+ sizeof(asset->ff_video_options));
+ asset->ff_video_bitrate = vid_bitrate;
+ asset->ff_video_quality = 0;
+
+ int len = strlen(asset->ff_video_options);
+ char *cp = asset->ff_video_options + len;
+ snprintf(cp, sizeof(asset->ff_video_options)-len-1,
+ "aspect %.5f\n", asset->aspect_ratio);
+ }
+ else {
+ sprintf(&asset->path[0],"%s/dvd.m2v", asset_dir);
+ asset->video_data = 1;
+ asset->format = FILE_VMPEG;
+ asset->vmpeg_cmodel = BC_YUV420P;
+ asset->vmpeg_fix_bitrate = 1;
+ asset->vmpeg_bitrate = vid_bitrate;
+ asset->vmpeg_quantization = 15;
+ asset->vmpeg_iframe_distance = 15;
+ asset->vmpeg_progressive = 0;
+ asset->vmpeg_denoise = 0;
+ asset->vmpeg_seq_codes = 0;
+ asset->vmpeg_derivative = 2;
+ asset->vmpeg_preset = 8;
+ asset->vmpeg_field_order = 0;
+ asset->vmpeg_pframe_distance = 0;
+ job = new BatchRenderJob(mwindow->preferences);
+ jobs->append(job);
+ strcpy(&job->edl_path[0], xml_filename);
+ asset = job->asset;
+
+ sprintf(&asset->path[0],"%s/dvd.ac3", asset_dir);
+ asset->audio_data = 1;
+ asset->format = FILE_AC3;
+ asset->channels = session->audio_channels;
+ asset->sample_rate = session->sample_rate;
+ asset->bits = 16;
+ asset->byte_order = 0;
+ asset->signed_ = 1;
+ asset->header = 0;
+ asset->dither = 0;
+ asset->ac3_bitrate = DVD_KAUDIO_RATE;
+ }