From: Good Guy Date: Sat, 27 Jan 2018 00:01:30 +0000 (-0700) Subject: render config sample/pixel fmt, piped files, ffmpeg raw yuv/rgb X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=fbb844da24c44cce0509451116df248c861ef8f7;p=goodguy%2Fhistory.git render config sample/pixel fmt, piped files, ffmpeg raw yuv/rgb --- diff --git a/cinelerra-5.1/cinelerra/asset.C b/cinelerra-5.1/cinelerra/asset.C index 0993b12f..07aa00b3 100644 --- a/cinelerra-5.1/cinelerra/asset.C +++ b/cinelerra-5.1/cinelerra/asset.C @@ -85,9 +85,11 @@ int Asset::init_values() strcpy(acodec, ""); ff_audio_options[0] = 0; - ff_video_options[0] = 0; + ff_sample_format[0] = 0; ff_audio_bitrate = 0; ff_audio_quality = -1; + ff_video_options[0] = 0; + ff_pixel_format[0] = 0; ff_video_bitrate = 0; ff_video_quality = -1; @@ -223,9 +225,11 @@ void Asset::copy_format(Asset *asset, int do_index) strcpy(acodec, asset->acodec); strcpy(ff_audio_options, asset->ff_audio_options); - strcpy(ff_video_options, asset->ff_video_options); + strcpy(ff_sample_format, asset->ff_sample_format); ff_audio_bitrate = asset->ff_audio_bitrate; ff_audio_quality = asset->ff_audio_quality; + strcpy(ff_video_options, asset->ff_video_options); + strcpy(ff_pixel_format, asset->ff_pixel_format); ff_video_bitrate = asset->ff_video_bitrate; ff_video_quality = asset->ff_video_quality; @@ -353,6 +357,7 @@ int Asset::equivalent(Asset &asset, int test_audio, int test_video, EDL *edl) !strcmp(acodec, asset.acodec)); if(result && format == FILE_FFMPEG) result = !strcmp(ff_audio_options, asset.ff_audio_options) && + !strcmp(ff_sample_format, asset.ff_sample_format) && ff_audio_bitrate == asset.ff_audio_bitrate && ff_audio_quality == asset.ff_audio_quality; } @@ -373,6 +378,7 @@ int Asset::equivalent(Asset &asset, int test_audio, int test_video, EDL *edl) jpeg_sphere == asset.jpeg_sphere); if(result && format == FILE_FFMPEG) result = !strcmp(ff_video_options, asset.ff_video_options) && + !strcmp(ff_pixel_format, asset.ff_pixel_format) && ff_video_bitrate == asset.ff_video_bitrate && ff_video_quality == asset.ff_video_quality; } @@ -795,9 +801,11 @@ void Asset::load_defaults(BC_Hash *defaults, theora_keyframe_force_frequency = GET_DEFAULT("THEORA_FORCE_KEYFRAME_FREQUENCY", theora_keyframe_force_frequency); GET_DEFAULT("FF_AUDIO_OPTIONS", ff_audio_options); + GET_DEFAULT("FF_SAMPLE_FORMAT", ff_sample_format); ff_audio_bitrate = GET_DEFAULT("FF_AUDIO_BITRATE", ff_audio_bitrate); ff_audio_quality = GET_DEFAULT("FF_AUDIO_QUALITY", ff_audio_quality); GET_DEFAULT("FF_VIDEO_OPTIONS", ff_video_options); + GET_DEFAULT("FF_PIXEL_FORMAT", ff_pixel_format); ff_video_bitrate = GET_DEFAULT("FF_VIDEO_BITRATE", ff_video_bitrate); ff_video_quality = GET_DEFAULT("FF_VIDEO_QUALITY", ff_video_quality); @@ -887,9 +895,11 @@ void Asset::save_defaults(BC_Hash *defaults, UPDATE_DEFAULT("VORBIS_MAX_BITRATE", vorbis_max_bitrate); UPDATE_DEFAULT("FF_AUDIO_OPTIONS", ff_audio_options); + UPDATE_DEFAULT("FF_SAMPLE_FORMAT", ff_sample_format); UPDATE_DEFAULT("FF_AUDIO_BITRATE", ff_audio_bitrate); UPDATE_DEFAULT("FF_AUDIO_QUALITY", ff_audio_quality); UPDATE_DEFAULT("FF_VIDEO_OPTIONS", ff_video_options); + UPDATE_DEFAULT("FF_PIXEL_FORMAT", ff_pixel_format); UPDATE_DEFAULT("FF_VIDEO_BITRATE", ff_video_bitrate); UPDATE_DEFAULT("FF_VIDEO_QUALITY", ff_video_quality); @@ -988,9 +998,11 @@ int Asset::dump(FILE *fp) fprintf(fp," format %d\n", format); fprintf(fp," fformat=\"%s\"\n", fformat); fprintf(fp," ff_audio_options=\"%s\"\n", ff_audio_options); + fprintf(fp," ff_sample_format=\"%s\"\n", ff_sample_format); fprintf(fp," ff_audio_bitrate=%d\n", ff_audio_bitrate); fprintf(fp," ff_audio_quality=%d\n", ff_audio_quality); fprintf(fp," ff_video_options=\"%s\"\n", ff_video_options); + fprintf(fp," ff_pixel_format=\"%s\"\n", ff_pixel_format); fprintf(fp," ff_video_bitrate=%d\n", ff_video_bitrate); fprintf(fp," ff_video_quality=%d\n", ff_video_quality); fprintf(fp," audio_data %d channels %d samplerate %d bits %d" diff --git a/cinelerra-5.1/cinelerra/asset.h b/cinelerra-5.1/cinelerra/asset.h index b90cacfc..b877c47d 100644 --- a/cinelerra-5.1/cinelerra/asset.h +++ b/cinelerra-5.1/cinelerra/asset.h @@ -208,12 +208,12 @@ public: // ffmpeg muxer file extension char fformat[BCSTRLEN]; - char ff_audio_options[BCTEXTLEN]; char ff_video_options[BCTEXTLEN]; - int ff_audio_bitrate; - int ff_audio_quality; - int ff_video_bitrate; - int ff_video_quality; + char ff_pixel_format[BCSTRLEN]; + int ff_video_bitrate, ff_video_quality; + char ff_audio_options[BCTEXTLEN]; + char ff_sample_format[BCSTRLEN]; + int ff_audio_bitrate, ff_audio_quality; // PNG video compression int png_use_alpha; diff --git a/cinelerra-5.1/cinelerra/confirmsave.C b/cinelerra-5.1/cinelerra/confirmsave.C index 5fe6ab90..3542a049 100644 --- a/cinelerra-5.1/cinelerra/confirmsave.C +++ b/cinelerra-5.1/cinelerra/confirmsave.C @@ -47,14 +47,12 @@ int ConfirmSave::test_file(MWindow *mwindow, char *path) int ConfirmSave::test_files(MWindow *mwindow, ArrayList *paths) { - FILE *file; ArrayList list; int result = 0; for(int i = 0; i < paths->size(); i++) { char *path = paths->values[i]; - if( (file=fopen(path, "r")) != 0 ) { - fclose(file); + if( !access(path, F_OK) ) { list.append(new BC_ListBoxItem(path)); } } diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C index 167ee479..b0ba1c90 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.C +++ b/cinelerra-5.1/cinelerra/ffmpeg.C @@ -19,8 +19,11 @@ #include "asset.h" #include "bccmodels.h" #include "bchash.h" -#include "fileffmpeg.h" +#include "edl.h" +#include "edlsession.h" #include "file.h" +#include "fileffmpeg.h" +#include "filesystem.h" #include "ffmpeg.h" #include "indexfile.h" #include "interlacemodes.h" @@ -1384,6 +1387,37 @@ AVRational FFMPEG::to_time_base(int sample_rate) return (AVRational){1, sample_rate}; } +int FFMPEG::get_fmt_score(AVSampleFormat dst_fmt, AVSampleFormat src_fmt) +{ + int score = 0; + int dst_planar = av_sample_fmt_is_planar(dst_fmt); + int src_planar = av_sample_fmt_is_planar(src_fmt); + if( dst_planar != src_planar ) ++score; + int dst_bytes = av_get_bytes_per_sample(dst_fmt); + int src_bytes = av_get_bytes_per_sample(src_fmt); + score += (src_bytes > dst_bytes ? 100 : -10) * (src_bytes - dst_bytes); + int src_packed = av_get_packed_sample_fmt(src_fmt); + int dst_packed = av_get_packed_sample_fmt(dst_fmt); + if( dst_packed == AV_SAMPLE_FMT_S32 && src_packed == AV_SAMPLE_FMT_FLT ) score += 20; + if( dst_packed == AV_SAMPLE_FMT_FLT && src_packed == AV_SAMPLE_FMT_S32 ) score += 2; + return score; +} + +AVSampleFormat FFMPEG::find_best_sample_fmt_of_list( + const AVSampleFormat *sample_fmts, AVSampleFormat src_fmt) +{ + AVSampleFormat best = AV_SAMPLE_FMT_NONE; + int best_score = get_fmt_score(best, src_fmt); + for( int i=0; sample_fmts[i] >= 0; ++i ) { + AVSampleFormat sample_fmt = sample_fmts[i]; + int score = get_fmt_score(sample_fmt, src_fmt); + if( score >= best_score ) continue; + best = sample_fmt; best_score = score; + } + return best; +} + + void FFMPEG::set_option_path(char *path, const char *fmt, ...) { char *ep = path + BCTEXTLEN-1; @@ -1480,10 +1514,10 @@ int FFMPEG::get_file_format() return ret; } -int FFMPEG::scan_option_line(char *cp, char *tag, char *val) +int FFMPEG::scan_option_line(const char *cp, char *tag, char *val) { while( *cp == ' ' || *cp == '\t' ) ++cp; - char *bp = cp; + const char *bp = cp; while( *cp && *cp != ' ' && *cp != '\t' && *cp != '=' && *cp != '\n' ) ++cp; int len = cp - bp; if( !len || len > BCSTRLEN-1 ) return 1; @@ -1501,6 +1535,123 @@ int FFMPEG::scan_option_line(char *cp, char *tag, char *val) return 0; } +int FFMPEG::can_render(const char *fformat, const char *type) +{ + FileSystem fs; + char option_path[BCTEXTLEN]; + FFMPEG::set_option_path(option_path, type); + fs.update(option_path); + int total_files = fs.total_files(); + for( int i=0; iget_name(); + const char *ext = strrchr(name,'.'); + if( !ext ) continue; + if( !strcmp(fformat, ++ext) ) return 1; + } + return 0; +} + +int FFMPEG::get_ff_option(const char *nm, const char *options, char *value) +{ + for( const char *cp=options; *cp!=0; ) { + char line[BCTEXTLEN], *bp = line, *ep = bp+sizeof(line)-1; + while( bp < ep && *cp && *cp!='\n' ) *bp++ = *cp++; + if( *cp ) ++cp; + *bp = 0; + if( !line[0] || line[0] == '#' || line[0] == ';' ) continue; + char key[BCSTRLEN], val[BCTEXTLEN]; + if( FFMPEG::scan_option_line(line, key, val) ) continue; + if( !strcmp(key, nm) ) { + strncpy(value, val, BCSTRLEN); + return 0; + } + } + return 1; +} + +void FFMPEG::scan_audio_options(Asset *asset, EDL *edl) +{ + char cin_sample_fmt[BCSTRLEN]; + int cin_fmt = AV_SAMPLE_FMT_NONE; + const char *options = asset->ff_audio_options; + if( !get_ff_option("cin_sample_fmt", options, cin_sample_fmt) ) + cin_fmt = (int)av_get_sample_fmt(cin_sample_fmt); + if( cin_fmt < 0 ) { + char audio_codec[BCSTRLEN]; audio_codec[0] = 0; + AVCodec *av_codec = !FFMPEG::get_codec(audio_codec, "audio", asset->acodec) ? + avcodec_find_encoder_by_name(audio_codec) : 0; + if( av_codec && av_codec->sample_fmts ) + cin_fmt = find_best_sample_fmt_of_list(av_codec->sample_fmts, AV_SAMPLE_FMT_FLT); + } + if( cin_fmt < 0 ) cin_fmt = AV_SAMPLE_FMT_S16; + const char *name = av_get_sample_fmt_name((AVSampleFormat)cin_fmt); + if( !name ) name = _("None"); + strcpy(asset->ff_sample_format, name); + + char value[BCSTRLEN]; + if( !get_ff_option("cin_bitrate", options, value) ) + asset->ff_audio_bitrate = atoi(value); + if( !get_ff_option("cin_quality", options, value) ) + asset->ff_audio_quality = atoi(value); +} + +void FFMPEG::load_audio_options(Asset *asset, EDL *edl) +{ + char options_path[BCTEXTLEN]; + set_option_path(options_path, "audio/%s", asset->acodec); + if( !load_options(options_path, + asset->ff_audio_options, + sizeof(asset->ff_audio_options)) ) + scan_audio_options(asset, edl); +} + +void FFMPEG::scan_video_options(Asset *asset, EDL *edl) +{ + char cin_pix_fmt[BCSTRLEN]; + int cin_fmt = AV_PIX_FMT_NONE; + const char *options = asset->ff_video_options; + if( !get_ff_option("cin_pix_fmt", options, cin_pix_fmt) ) + cin_fmt = (int)av_get_pix_fmt(cin_pix_fmt); + if( cin_fmt < 0 ) { + char video_codec[BCSTRLEN]; video_codec[0] = 0; + AVCodec *av_codec = !get_codec(video_codec, "video", asset->vcodec) ? + avcodec_find_encoder_by_name(video_codec) : 0; + if( av_codec && av_codec->pix_fmts ) { + if( edl ) { + int color_model = edl->session->color_model; + int max_bits = BC_CModels::calculate_pixelsize(color_model) * 8; + max_bits /= BC_CModels::components(color_model); + cin_fmt = avcodec_find_best_pix_fmt_of_list(av_codec->pix_fmts, + (BC_CModels::is_yuv(color_model) ? + (max_bits > 8 ? AV_PIX_FMT_AYUV64LE : AV_PIX_FMT_YUV444P) : + (max_bits > 8 ? AV_PIX_FMT_RGB48LE : AV_PIX_FMT_RGB24)), 0, 0); + } + else + cin_fmt = av_codec->pix_fmts[0]; + } + } + if( cin_fmt < 0 ) cin_fmt = AV_PIX_FMT_YUV420P; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get((AVPixelFormat)cin_fmt); + const char *name = desc ? desc->name : _("None"); + strcpy(asset->ff_pixel_format, name); + + char value[BCSTRLEN]; + if( !get_ff_option("cin_bitrate", options, value) ) + asset->ff_video_bitrate = atoi(value); + if( !get_ff_option("cin_quality", options, value) ) + asset->ff_video_quality = atoi(value); +} + +void FFMPEG::load_video_options(Asset *asset, EDL *edl) +{ + char options_path[BCTEXTLEN]; + set_option_path(options_path, "video/%s", asset->vcodec); + if( !load_options(options_path, + asset->ff_video_options, + sizeof(asset->ff_video_options)) ) + scan_video_options(asset, edl); +} + int FFMPEG::load_defaults(const char *path, const char *type, char *codec, char *codec_options, int len) { @@ -1521,18 +1672,24 @@ int FFMPEG::load_defaults(const char *path, const char *type, return load_options(default_file, codec_options, len); } -void FFMPEG::set_asset_format(Asset *asset, const char *text) +void FFMPEG::set_asset_format(Asset *asset, EDL *edl, const char *text) { if( asset->format != FILE_FFMPEG ) return; if( text != asset->fformat ) strcpy(asset->fformat, text); - if( !asset->ff_audio_options[0] ) { - asset->audio_data = !load_defaults("audio", text, asset->acodec, - asset->ff_audio_options, sizeof(asset->ff_audio_options)); + if( asset->audio_data && !asset->ff_audio_options[0] ) { + if( !load_defaults("audio", text, asset->acodec, + asset->ff_audio_options, sizeof(asset->ff_audio_options)) ) + scan_audio_options(asset, edl); + else + asset->audio_data = 0; } - if( !asset->ff_video_options[0] ) { - asset->video_data = !load_defaults("video", text, asset->vcodec, - asset->ff_video_options, sizeof(asset->ff_video_options)); + if( asset->video_data && !asset->ff_video_options[0] ) { + if( !load_defaults("video", text, asset->vcodec, + asset->ff_video_options, sizeof(asset->ff_video_options)) ) + scan_video_options(asset, edl); + else + asset->video_data = 0; } } @@ -1544,19 +1701,18 @@ int FFMPEG::get_encoder(const char *options, eprintf(_("options open failed %s\n"),options); return 1; } - if( get_encoder(fp, format, codec, bsfilter) ) + char line[BCTEXTLEN]; + if( !fgets(line, sizeof(line), fp) || + scan_encoder(line, format, codec, bsfilter) ) eprintf(_("format/codec not found %s\n"), options); fclose(fp); return 0; } -int FFMPEG::get_encoder(FILE *fp, +int FFMPEG::scan_encoder(const char *line, char *format, char *codec, char *bsfilter) { format[0] = codec[0] = bsfilter[0] = 0; - char line[BCTEXTLEN]; - if( !fgets(line, sizeof(line), fp) ) return 1; - line[sizeof(line)-1] = 0; if( scan_option_line(line, format, codec) ) return 1; char *cp = codec; while( *cp && *cp != '|' ) ++cp; @@ -1890,14 +2046,18 @@ int FFMPEG::open_decoder() int FFMPEG::init_encoder(const char *filename) { - int fd = ::open(filename,O_WRONLY); - if( fd < 0 ) fd = open(filename,O_WRONLY+O_CREAT,0666); - if( fd < 0 ) { +// try access first for named pipes + int ret = access(filename, W_OK); + if( ret ) { + int fd = ::open(filename,O_WRONLY); + if( fd < 0 ) fd = open(filename,O_WRONLY+O_CREAT,0666); + if( fd >= 0 ) { close(fd); ret = 0; } + } + if( ret ) { eprintf(_("bad file path: %s\n"), filename); return 1; } - ::close(fd); - int ret = get_file_format(); + ret = get_file_format(); if( ret > 0 ) { eprintf(_("bad file format: %s\n"), filename); return 1; @@ -2021,7 +2181,10 @@ int FFMPEG::open_encoder(const char *type, const char *spec) break; } ctx->time_base = st->time_base = (AVRational){1, aud->sample_rate}; - ctx->sample_fmt = codec->sample_fmts[0]; + AVSampleFormat sample_fmt = av_get_sample_fmt(asset->ff_sample_format); + if( sample_fmt == AV_SAMPLE_FMT_NONE ) + sample_fmt = codec->sample_fmts ? codec->sample_fmts[0] : AV_SAMPLE_FMT_S16; + ctx->sample_fmt = sample_fmt; uint64_t layout = av_get_default_channel_layout(ctx->channels); aud->resample_context = swr_alloc_set_opts(NULL, layout, ctx->sample_fmt, aud->sample_rate, @@ -2070,18 +2233,10 @@ int FFMPEG::open_encoder(const char *type, const char *spec) vid->width = asset->width; vid->height = asset->height; vid->frame_rate = asset->frame_rate; - AVPixelFormat pix_fmt = codec->pix_fmts ? - codec->pix_fmts[0] : AV_PIX_FMT_YUV420P; - AVDictionaryEntry *tag = av_dict_get(sopts, "cin_pix_fmt", NULL, 0); - if( tag != 0 ) { - int avfmt = av_get_pix_fmt(tag->value); - if( avfmt < 0 ) { - eprintf(_("cin_pix_fmt unknown = %s\n"), tag->value); - ret = 1; - break; - } - pix_fmt = (AVPixelFormat)avfmt; - } + + AVPixelFormat pix_fmt = av_get_pix_fmt(asset->ff_pixel_format); + if( pix_fmt == AV_PIX_FMT_NONE ) + pix_fmt = codec->pix_fmts ? codec->pix_fmts[0] : AV_PIX_FMT_YUV420P; ctx->pix_fmt = pix_fmt; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); int mask_w = (1<log2_chroma_w)-1; diff --git a/cinelerra-5.1/cinelerra/ffmpeg.h b/cinelerra-5.1/cinelerra/ffmpeg.h index 11194792..5c9b1ea1 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.h +++ b/cinelerra-5.1/cinelerra/ffmpeg.h @@ -13,6 +13,7 @@ #include "bcwindowbase.inc" #include "condition.h" #include "cstrdup.h" +#include "edl.inc" #include "linklist.h" #include "ffmpeg.inc" #include "filebase.inc" @@ -254,18 +255,29 @@ public: AVRational check_frame_rate(AVCodec *codec, double frame_rate); AVRational to_sample_aspect_ratio(Asset *asset); AVRational to_time_base(int sample_rate); + static int get_fmt_score(AVSampleFormat dst_fmt, AVSampleFormat src_fmt); + static AVSampleFormat find_best_sample_fmt_of_list( + const AVSampleFormat *sample_fmts, AVSampleFormat src_fmt); static void set_option_path(char *path, const char *fmt, ...); static void get_option_path(char *path, const char *type, const char *spec); static int get_format(char *format, const char *path, const char *spec); static int get_codec(char *codec, const char *path, const char *spec); - static int scan_option_line(char *cp,char *tag,char *val); + static int scan_option_line(const char *cp,char *tag,char *val); static int load_defaults(const char *path, const char *type, char *codec, char *codec_options, int len); - static void set_asset_format(Asset *asset, const char *text); + static int can_render(const char *fformat, const char *type); + static int renders_audio(const char *fformat) { return can_render(fformat, "audio"); } + static int renders_video(const char *fformat) { return can_render(fformat, "video"); } + static int get_ff_option(const char *nm, const char *options, char *value); + static void scan_audio_options(Asset *asset, EDL *edl); + static void load_audio_options(Asset *asset, EDL *edl); + static void scan_video_options(Asset *asset, EDL *edl); + static void load_video_options(Asset *asset, EDL *edl); + static void set_asset_format(Asset *asset, EDL *edl, const char *text); int get_file_format(); - int get_encoder(const char *options, char *format, char *codec, char *bsfilter); - int get_encoder(FILE *fp, char *format, char *codec, char *bsfilter); + static int get_encoder(const char *options, char *format, char *codec, char *bsfilter); + static int scan_encoder(const char *line, char *format, char *codec, char *bsfilter); int read_options(const char *options, AVDictionary *&opts, int skip=0); int scan_options(const char *options, AVDictionary *&opts, AVStream *st); int read_options(FILE *fp, const char *options, AVDictionary *&opts); diff --git a/cinelerra-5.1/cinelerra/file.C b/cinelerra-5.1/cinelerra/file.C index 67b731de..264be2e8 100644 --- a/cinelerra-5.1/cinelerra/file.C +++ b/cinelerra-5.1/cinelerra/file.C @@ -165,24 +165,19 @@ int File::get_options(FormatTools *format, int audio_options, int video_options) { BC_WindowBase *parent_window = format->window; - //ArrayList *plugindb = format->plugindb; Asset *asset = format->asset; - + EDL *edl = format->mwindow ? format->mwindow->edl : 0; format_window = 0; getting_options = 1; format_completion->lock("File::get_options"); switch( asset->format ) { - case FILE_AC3: - FileAC3::get_parameters(parent_window, - asset, - format_window, - audio_options, - video_options); + case FILE_AC3: FileAC3::get_parameters(parent_window, asset, format_window, + audio_options, video_options, edl); break; #ifdef HAVE_DV case FILE_RAWDV: FileDV::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; #endif case FILE_PCM: @@ -191,56 +186,56 @@ int File::get_options(FormatTools *format, case FILE_AIFF: case FILE_SND: FileSndFile::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; case FILE_FFMPEG: FileFFMPEG::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; case FILE_AMPEG: case FILE_VMPEG: FileMPEG::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; case FILE_JPEG: case FILE_JPEG_LIST: FileJPEG::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; #ifdef HAVE_OPENEXR case FILE_EXR: case FILE_EXR_LIST: FileEXR::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; #endif case FILE_FLAC: FileFLAC::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; case FILE_PNG: case FILE_PNG_LIST: FilePNG::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; case FILE_PPM: case FILE_PPM_LIST: FilePPM::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; case FILE_TGA: case FILE_TGA_LIST: FileTGA::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; case FILE_TIFF: case FILE_TIFF_LIST: FileTIFF::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; case FILE_OGG: FileOGG::get_parameters(parent_window, asset, format_window, - audio_options, video_options); + audio_options, video_options, edl); break; default: break; @@ -1430,7 +1425,7 @@ int File::renders_video(int format) int File::renders_video(Asset *asset) { return asset->format == FILE_FFMPEG ? - FileFFMPEG::renders_video(asset->fformat) : + FFMPEG::renders_video(asset->fformat) : renders_video(asset->format); } @@ -1456,7 +1451,7 @@ int File::renders_audio(int format) int File::renders_audio(Asset *asset) { return asset->format == FILE_FFMPEG ? - FileFFMPEG::renders_audio(asset->fformat) : + FFMPEG::renders_audio(asset->fformat) : renders_audio(asset->format); } diff --git a/cinelerra-5.1/cinelerra/fileac3.C b/cinelerra-5.1/cinelerra/fileac3.C index cc3cafae..c573e387 100644 --- a/cinelerra-5.1/cinelerra/fileac3.C +++ b/cinelerra-5.1/cinelerra/fileac3.C @@ -76,10 +76,8 @@ int FileAC3::reset_parameters_derived() } void FileAC3::get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options) + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl) { if(audio_options) { diff --git a/cinelerra-5.1/cinelerra/fileac3.h b/cinelerra-5.1/cinelerra/fileac3.h index 9304a80f..6683816b 100644 --- a/cinelerra-5.1/cinelerra/fileac3.h +++ b/cinelerra-5.1/cinelerra/fileac3.h @@ -30,6 +30,7 @@ extern "C" { #include "libswresample/swresample.h" }; +#include "edl.inc" #include "filebase.h" #include "filempeg.inc" #include "indexfile.inc" @@ -45,10 +46,8 @@ public: int reset_parameters_derived(); static void get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options); + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl); static int check_sig(); int open_file(int rd, int wr); int close_file(); diff --git a/cinelerra-5.1/cinelerra/filebase.h b/cinelerra-5.1/cinelerra/filebase.h index 5e8d291e..3fb8be42 100644 --- a/cinelerra-5.1/cinelerra/filebase.h +++ b/cinelerra-5.1/cinelerra/filebase.h @@ -26,6 +26,7 @@ #include "assets.inc" #include "bccmodels.h" #include "edit.inc" +#include "edl.inc" #include "ffmpeg.inc" #include "guicast.h" #include "file.inc" @@ -54,23 +55,9 @@ public: friend class FileList; friend class FrameWriter; - - - void get_mode(char *mode, int rd, int wr); void reset_parameters(); - - - virtual void get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase **format_window, - int audio_options, - int video_options, - int lock_compressor) {}; - - - virtual int get_index(IndexFile *index_file, MainProgressBar *progress_bar) { return -1; } virtual int check_header() { return 0; } // Test file to see if it is of this type. virtual int reset_parameters_derived() { return 0; } diff --git a/cinelerra-5.1/cinelerra/filedv.C b/cinelerra-5.1/cinelerra/filedv.C index 1d22bc3d..1a543744 100644 --- a/cinelerra-5.1/cinelerra/filedv.C +++ b/cinelerra-5.1/cinelerra/filedv.C @@ -102,10 +102,8 @@ FileDV::~FileDV() } void FileDV::get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options) + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl) { if(audio_options) { diff --git a/cinelerra-5.1/cinelerra/filedv.h b/cinelerra-5.1/cinelerra/filedv.h index d0db5b54..843b59b8 100644 --- a/cinelerra-5.1/cinelerra/filedv.h +++ b/cinelerra-5.1/cinelerra/filedv.h @@ -25,6 +25,7 @@ #ifdef HAVE_DV #include "../config.h" +#include "edl.inc" #include "filebase.h" #include "file.inc" @@ -42,10 +43,8 @@ public: ~FileDV(); static void get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options); + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl); int reset_parameters_derived(); int open_file(int rd, int wr); diff --git a/cinelerra-5.1/cinelerra/fileexr.C b/cinelerra-5.1/cinelerra/fileexr.C index 33b1bdd2..351da2a3 100644 --- a/cinelerra-5.1/cinelerra/fileexr.C +++ b/cinelerra-5.1/cinelerra/fileexr.C @@ -244,10 +244,8 @@ int FileEXR::check_sig(Asset *asset, char *test) } void FileEXR::get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options) + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl) { if(video_options) { diff --git a/cinelerra-5.1/cinelerra/fileexr.h b/cinelerra-5.1/cinelerra/fileexr.h index d4cea047..3e474891 100644 --- a/cinelerra-5.1/cinelerra/fileexr.h +++ b/cinelerra-5.1/cinelerra/fileexr.h @@ -23,6 +23,7 @@ #define FILEEXR_H +#include "edl.inc" #include "file.inc" #include "fileexr.inc" #include "filelist.h" @@ -36,10 +37,8 @@ public: static int check_sig(Asset *asset, char *test); static void get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options); + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl); static int get_best_colormodel(Asset *asset, int driver); int colormodel_supported(int colormodel); int read_frame_header(char *path); diff --git a/cinelerra-5.1/cinelerra/fileffmpeg.C b/cinelerra-5.1/cinelerra/fileffmpeg.C index cc8a5371..10f685c1 100644 --- a/cinelerra-5.1/cinelerra/fileffmpeg.C +++ b/cinelerra-5.1/cinelerra/fileffmpeg.C @@ -11,6 +11,7 @@ #include "bcwindowbase.h" #include "bitspopup.h" #include "ctype.h" +#include "edl.h" #include "ffmpeg.h" #include "filebase.h" #include "file.h" @@ -25,7 +26,7 @@ #include "videodevice.inc" FileFFMPEG::FileFFMPEG(Asset *asset, File *file) - : FileBase(asset, file) + : FileBase(asset, file) { ff = 0; if(asset->format == FILE_UNKNOWN) @@ -60,8 +61,8 @@ void FFMpegConfigNum::create_objects() int FFMpegConfigNum::update_param(const char *param, const char *opts) { - char value[BCTEXTLEN]; - if( !FileFFMPEG::get_ff_option(param, opts, value) ) { + char value[BCSTRLEN]; + if( !FFMPEG::get_ff_option(param, opts, value) ) { if( (*output = atoi(value)) < 0 ) { disable(1); return 0; @@ -134,7 +135,69 @@ int FFMpegVideoQuality::handle_event() return ret; } -void FileFFMPEG::set_parameters(char *cp, int len, const char *bp) +FFMpegPixelFormat::FFMpegPixelFormat(FFMPEGConfigVideo *vid_config, + int x, int y, int w, int list_h) + : BC_PopupTextBox(vid_config, 0, 0, x, y, w, list_h) +{ + this->vid_config = vid_config; +} + +int FFMpegPixelFormat::handle_event() +{ + strncpy(vid_config->asset->ff_pixel_format, get_text(), + sizeof(vid_config->asset->ff_pixel_format)); + return 1; +} + +void FFMpegPixelFormat::update_formats() +{ + pixfmts.remove_all_objects(); + char video_codec[BCSTRLEN]; video_codec[0] = 0; + const char *vcodec = vid_config->asset->vcodec; + AVCodec *av_codec = !FFMPEG::get_codec(video_codec, "video", vcodec) ? + avcodec_find_encoder_by_name(video_codec) : 0; + const AVPixelFormat *pix_fmts = av_codec ? av_codec->pix_fmts : 0; + if( pix_fmts ) { + for( int i=0; pix_fmts[i]>=0; ++i ) { + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmts[i]); + if( desc ) pixfmts.append(new BC_ListBoxItem(desc->name)); + } + } + update_list(&pixfmts); +} + +FFMpegSampleFormat::FFMpegSampleFormat(FFMPEGConfigAudio *aud_config, + int x, int y, int w, int list_h) + : BC_PopupTextBox(aud_config, 0, 0, x, y, w, list_h) +{ + this->aud_config = aud_config; +} + +int FFMpegSampleFormat::handle_event() +{ + strncpy(aud_config->asset->ff_sample_format, get_text(), + sizeof(aud_config->asset->ff_sample_format)); + return 1; +} + +void FFMpegSampleFormat::update_formats() +{ + samplefmts.remove_all_objects(); + char audio_codec[BCSTRLEN]; audio_codec[0] = 0; + const char *acodec = aud_config->asset->acodec; + AVCodec *av_codec = !FFMPEG::get_codec(audio_codec, "audio", acodec) ? + avcodec_find_encoder_by_name(audio_codec) : 0; + const AVSampleFormat *sample_fmts = av_codec ? av_codec->sample_fmts : 0; + if( sample_fmts ) { + for( int i=0; sample_fmts[i]>=0; ++i ) { + const char *name = av_get_sample_fmt_name(sample_fmts[i]); + if( name ) samplefmts.append(new BC_ListBoxItem(name)); + } + } + update_list(&samplefmts); +} + +void FileFFMPEG::set_options(char *cp, int len, const char *bp) { char *ep = cp + len-2, ch = 0; while( cp < ep && *bp != 0 ) { ch = *bp++; *cp++ = ch; } @@ -144,26 +207,35 @@ void FileFFMPEG::set_parameters(char *cp, int len, const char *bp) void FileFFMPEG::get_parameters(BC_WindowBase *parent_window, Asset *asset, BC_WindowBase *&format_window, - int audio_options, int video_options) + int audio_options, int video_options, EDL *edl) { - if(audio_options) { - FFMPEGConfigAudio *window = new FFMPEGConfigAudio(parent_window, asset); + Asset *ff_asset = new Asset(); + ff_asset->copy_from(asset, 0); + if( audio_options ) { + FFMPEGConfigAudio *window = new FFMPEGConfigAudio(parent_window, ff_asset, edl); format_window = window; window->create_objects(); - if( !window->run_window() ) - set_parameters(asset->ff_audio_options, sizeof(asset->ff_audio_options), - window->audio_options->get_text()); + if( !window->run_window() ) { + asset->copy_from(ff_asset,0); + set_options(asset->ff_audio_options, + sizeof(asset->ff_audio_options), + window->audio_options->get_text()); + } delete window; } - else if(video_options) { - FFMPEGConfigVideo *window = new FFMPEGConfigVideo(parent_window, asset); + else if( video_options ) { + FFMPEGConfigVideo *window = new FFMPEGConfigVideo(parent_window, ff_asset, edl); format_window = window; window->create_objects(); - if( !window->run_window() ) - set_parameters(asset->ff_video_options, sizeof(asset->ff_video_options), - window->video_options->get_text()); + if( !window->run_window() ) { + asset->copy_from(ff_asset,0); + set_options(asset->ff_video_options, + sizeof(asset->ff_video_options), + window->video_options->get_text()); + } delete window; } + ff_asset->remove_user(); } int FileFFMPEG::check_sig(Asset *asset) @@ -379,43 +451,9 @@ int FileFFMPEG::get_best_colormodel(Asset *asset, int driver) return BC_YUV420P; } -int FileFFMPEG::can_render(const char *fformat, const char *type) -{ - FileSystem fs; - char option_path[BCTEXTLEN]; - FFMPEG::set_option_path(option_path, type); - fs.update(option_path); - int total_files = fs.total_files(); - for( int i=0; iget_name(); - const char *ext = strrchr(name,'.'); - if( !ext ) continue; - if( !strcmp(fformat, ++ext) ) return 1; - } - return 0; -} - -int FileFFMPEG::get_ff_option(const char *nm, const char *options, char *value) -{ - for( const char *cp=options; *cp!=0; ) { - char line[BCTEXTLEN], *bp = line, *ep = bp+sizeof(line)-1; - while( bp < ep && *cp && *cp!='\n' ) *bp++ = *cp++; - if( *cp ) ++cp; - *bp = 0; - if( !line[0] || line[0] == '#' || line[0] == ';' ) continue; - char key[BCSTRLEN], val[BCTEXTLEN]; - if( FFMPEG::scan_option_line(line, key, val) ) continue; - if( !strcmp(key, nm) ) { - strcpy(value, val); - return 0; - } - } - return 1; -} - //====== -FFMPEGConfigAudio::FFMPEGConfigAudio(BC_WindowBase *parent_window, Asset *asset) +FFMPEGConfigAudio::FFMPEGConfigAudio(BC_WindowBase *parent_window, Asset *asset, EDL *edl) : BC_Window(_(PROGRAM_NAME ": Audio Preset"), parent_window->get_abs_cursor_x(1), parent_window->get_abs_cursor_y(1), @@ -423,6 +461,7 @@ FFMPEGConfigAudio::FFMPEGConfigAudio(BC_WindowBase *parent_window, Asset *asset) { this->parent_window = parent_window; this->asset = asset; + this->edl = edl; preset_popup = 0; bitrate = 0; @@ -439,6 +478,11 @@ FFMPEGConfigAudio::~FFMPEGConfigAudio() unlock_window(); } +void FFMPEGConfigAudio::load_options() +{ + FFMPEG::load_audio_options(asset, edl); +} + void FFMPEGConfigAudio::create_objects() { int x = 10, y = 10; @@ -483,8 +527,20 @@ void FFMPEGConfigAudio::create_objects() quality->create_objects(); quality->set_increment(1); quality->set_boundaries((int64_t)-1, (int64_t)51); - y += quality->get_h() + 10; + + add_subwindow(new BC_Title(x, y, _("Samples:"))); + sample_format = new FFMpegSampleFormat(this, x+90, y, 100, 120); + sample_format->create_objects(); + if( asset->acodec[0] ) { + sample_format->update_formats(); + if( !asset->ff_audio_options[0] ) + load_options(); + } + if( !asset->ff_sample_format[0] ) strcpy(asset->ff_sample_format, _("None")); + sample_format->update(asset->ff_sample_format); + y += sample_format->get_h() + 10; + BC_Title *title = new BC_Title(x, y, _("Audio Options:")); add_subwindow(title); @@ -493,13 +549,7 @@ void FFMPEGConfigAudio::create_objects() add_subwindow(new FFOptionsViewAudio(this, x1, y, _("view"))); y += 25; - if( !asset->ff_audio_options[0] && asset->acodec[0] ) { - FFMPEG::set_option_path(option_path, "audio/%s", asset->acodec); - FFMPEG::load_options(option_path, asset->ff_audio_options, - sizeof(asset->ff_audio_options)); - } - - audio_options = new FFAudioOptions(this, x, y, get_w()-x-20, 10, + audio_options = new FFAudioOptions(this, x, y, get_w()-x-20, 8, sizeof(asset->ff_audio_options)-1, asset->ff_audio_options); audio_options->create_objects(); add_subwindow(new BC_OKButton(this)); @@ -538,17 +588,16 @@ FFMPEGConfigAudioPopup::FFMPEGConfigAudioPopup(FFMPEGConfigAudio *popup, int x, int FFMPEGConfigAudioPopup::handle_event() { strcpy(popup->asset->acodec, get_text()); + popup->sample_format->update_formats(); Asset *asset = popup->asset; - asset->ff_audio_bitrate = 0; - char option_path[BCTEXTLEN]; - 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 = 0; asset->ff_audio_quality = -1; + popup->load_options(); popup->audio_options->update(asset->ff_audio_options); popup->audio_options->set_text_row(0); popup->bitrate->update_param("cin_bitrate", asset->ff_audio_options); popup->quality->update_param("cin_quality", asset->ff_audio_options); + popup->sample_format->update(asset->ff_sample_format); return 1; } @@ -568,7 +617,7 @@ int FFMPEGConfigAudioToggle::handle_event() //====== -FFMPEGConfigVideo::FFMPEGConfigVideo(BC_WindowBase *parent_window, Asset *asset) +FFMPEGConfigVideo::FFMPEGConfigVideo(BC_WindowBase *parent_window, Asset *asset, EDL *edl) : BC_Window(_(PROGRAM_NAME ": Video Preset"), parent_window->get_abs_cursor_x(1), parent_window->get_abs_cursor_y(1), @@ -576,6 +625,7 @@ FFMPEGConfigVideo::FFMPEGConfigVideo(BC_WindowBase *parent_window, Asset *asset) { this->parent_window = parent_window; this->asset = asset; + this->edl = edl; preset_popup = 0; bitrate = 0; @@ -592,6 +642,11 @@ FFMPEGConfigVideo::~FFMPEGConfigVideo() unlock_window(); } +void FFMPEGConfigVideo::load_options() +{ + FFMPEG::load_video_options(asset, edl); +} + void FFMPEGConfigVideo::create_objects() { int x = 10, y = 10; @@ -641,8 +696,20 @@ void FFMPEGConfigVideo::create_objects() quality->create_objects(); quality->set_increment(1); quality->set_boundaries((int64_t)-1, (int64_t)51); - y += quality->get_h() + 10; + + add_subwindow(new BC_Title(x, y, _("Pixels:"))); + pixel_format = new FFMpegPixelFormat(this, x+90, y, 100, 120); + pixel_format->create_objects(); + if( asset->vcodec[0] ) { + pixel_format->update_formats(); + if( !asset->ff_video_options[0] ) + load_options(); + } + if( !asset->ff_pixel_format[0] ) strcpy(asset->ff_pixel_format, _("None")); + pixel_format->update(asset->ff_pixel_format); + y += pixel_format->get_h() + 10; + BC_Title *title = new BC_Title(x, y, _("Video Options:")); add_subwindow(title); @@ -651,13 +718,7 @@ void FFMPEGConfigVideo::create_objects() add_subwindow(new FFOptionsViewVideo(this, x1, y, _("view"))); y += 25; - if( !asset->ff_video_options[0] && asset->vcodec[0] ) { - FFMPEG::set_option_path(option_path, "video/%s", asset->vcodec); - FFMPEG::load_options(option_path, asset->ff_video_options, - sizeof(asset->ff_video_options)); - } - - video_options = new FFVideoOptions(this, x, y, get_w()-x-20, 10, + video_options = new FFVideoOptions(this, x, y, get_w()-x-20, 8, sizeof(asset->ff_video_options)-1, asset->ff_video_options); video_options->create_objects(); add_subwindow(new BC_OKButton(this)); @@ -695,17 +756,16 @@ FFMPEGConfigVideoPopup::FFMPEGConfigVideoPopup(FFMPEGConfigVideo *popup, int x, int FFMPEGConfigVideoPopup::handle_event() { strcpy(popup->asset->vcodec, get_text()); + popup->pixel_format->update_formats(); Asset *asset = popup->asset; - char option_path[BCTEXTLEN]; asset->ff_video_bitrate = 0; asset->ff_video_quality = -1; - FFMPEG::set_option_path(option_path, "video/%s", asset->vcodec); - FFMPEG::load_options(option_path, asset->ff_video_options, - sizeof(asset->ff_video_options)); + popup->load_options(); popup->video_options->update(asset->ff_video_options); popup->video_options->set_text_row(0); popup->bitrate->update_param("cin_bitrate", asset->ff_video_options); popup->quality->update_param("cin_quality", asset->ff_video_options); + popup->pixel_format->update(asset->ff_pixel_format); return 1; } @@ -900,16 +960,16 @@ char *FFOptions_Opt::get(char *vp, int sz) void *obj = (void *)options->obj; uint8_t *bp = 0; if( av_opt_get(obj, opt->name, 0, &bp) >= 0 && bp != 0 ) { - const char *val = (const char *)bp; + const char *val = (const char *)bp; if( opt->unit && *val ) { int id = atoi(val); const char *uid = unit_name(id); if( uid ) val = uid; } - cp = sz >= 0 ? strncpy(vp,val,sz) : strcpy(vp, val); - if( sz > 0 ) vp[sz-1] = 0; - av_freep(&bp); - } + cp = sz >= 0 ? strncpy(vp,val,sz) : strcpy(vp, val); + if( sz > 0 ) vp[sz-1] = 0; + av_freep(&bp); + } return cp; } diff --git a/cinelerra-5.1/cinelerra/fileffmpeg.h b/cinelerra-5.1/cinelerra/fileffmpeg.h index d3e22dd3..e3a9196c 100644 --- a/cinelerra-5.1/cinelerra/fileffmpeg.h +++ b/cinelerra-5.1/cinelerra/fileffmpeg.h @@ -5,6 +5,7 @@ #include "bcdialog.h" #include "bcwindowbase.inc" #include "bitspopup.inc" +#include "edl.inc" #include "ffmpeg.h" #include "filebase.h" #include "fileffmpeg.inc" @@ -31,19 +32,16 @@ public: static void ff_lock(const char *cp=0); static void ff_unlock(); - static void set_parameters(char *cp, int len, const char *bp); - static void get_parameters(BC_WindowBase *parent_window,Asset *asset, - BC_WindowBase *&format_window,int audio_options,int video_options); + static void set_options(char *cp, int len, const char *bp); + static void get_parameters(BC_WindowBase *parent_window, + Asset *asset, BC_WindowBase *&format_window, + int audio_options,int video_options, EDL *edl); static int check_sig(Asset *asset); int get_best_colormodel(int driver, int vstream); int get_video_info(int track, int &pid, double &framerate, int &width, int &height, char *title=0); int get_audio_for_video(int vstream, int astream, int64_t &channel_mask); static void get_info(char *path,char *text,int len); - static int can_render(const char *fformat, const char *type); - static int renders_audio(const char *fformat) { return can_render(fformat, "audio"); } - static int renders_video(const char *fformat) { return can_render(fformat, "video"); } - static int get_ff_option(const char *nm, const char *options, char *value); int open_file(int rd,int wr); int get_index(IndexFile *index_file, MainProgressBar *progress_bar); int close_file(void); @@ -126,15 +124,41 @@ public: int handle_event(); }; +class FFMpegPixelFormat : public BC_PopupTextBox +{ +public: + FFMpegPixelFormat(FFMPEGConfigVideo *vid_config, int x, int y, int w, int list_h); + + FFMPEGConfigVideo *vid_config; + ArrayList pixfmts; + + int handle_event(); + void update_formats(); +}; + +class FFMpegSampleFormat : public BC_PopupTextBox +{ +public: + FFMpegSampleFormat(FFMPEGConfigAudio *aud_config, int x, int y, int w, int list_h); + + FFMPEGConfigAudio *aud_config; + ArrayList samplefmts; + + int handle_event(); + void update_formats(); +}; + class FFMPEGConfigAudio : public BC_Window { public: - FFMPEGConfigAudio(BC_WindowBase *parent_window, Asset *asset); + FFMPEGConfigAudio(BC_WindowBase *parent_window, Asset *asset, EDL *edl); ~FFMPEGConfigAudio(); void create_objects(); int close_event(); + void load_options(); + FFMpegSampleFormat *sample_format; ArrayList presets; FFMPEGConfigAudioPopup *preset_popup; FFMpegAudioBitrate *bitrate; @@ -142,6 +166,7 @@ public: FFAudioOptions *audio_options; BC_WindowBase *parent_window; Asset *asset; + EDL *edl; FFOptionsDialog *ff_options_dialog; }; @@ -177,12 +202,14 @@ public: class FFMPEGConfigVideo : public BC_Window { public: - FFMPEGConfigVideo(BC_WindowBase *parent_window, Asset *asset); + FFMPEGConfigVideo(BC_WindowBase *parent_window, Asset *asset, EDL *edl); ~FFMPEGConfigVideo(); void create_objects(); int close_event(); + void load_options(); + FFMpegPixelFormat *pixel_format; ArrayList presets; FFMPEGConfigVideoPopup *preset_popup; BC_WindowBase *parent_window; @@ -190,6 +217,7 @@ public: FFMpegVideoQuality *quality; FFVideoOptions *video_options; Asset *asset; + EDL *edl; FFOptionsDialog *ff_options_dialog; }; diff --git a/cinelerra-5.1/cinelerra/fileflac.C b/cinelerra-5.1/cinelerra/fileflac.C index 842fcb4b..96fdb8bd 100644 --- a/cinelerra-5.1/cinelerra/fileflac.C +++ b/cinelerra-5.1/cinelerra/fileflac.C @@ -55,10 +55,8 @@ FileFLAC::~FileFLAC() } void FileFLAC::get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options) + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl) { if(audio_options) { diff --git a/cinelerra-5.1/cinelerra/fileflac.h b/cinelerra-5.1/cinelerra/fileflac.h index 70408792..e85b64cf 100644 --- a/cinelerra-5.1/cinelerra/fileflac.h +++ b/cinelerra-5.1/cinelerra/fileflac.h @@ -23,14 +23,10 @@ #define FILEFLAC_H #include "bitspopup.inc" +#include "edl.inc" #include "file.inc" #include "filebase.h" - - - - - class FileFLAC : public FileBase { public: @@ -38,10 +34,8 @@ public: ~FileFLAC(); static void get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options); + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl); int reset_parameters_derived(); static int check_sig(Asset *asset, char *test); diff --git a/cinelerra-5.1/cinelerra/filejpeg.C b/cinelerra-5.1/cinelerra/filejpeg.C index 3abfa99f..8c5687cc 100644 --- a/cinelerra-5.1/cinelerra/filejpeg.C +++ b/cinelerra-5.1/cinelerra/filejpeg.C @@ -75,10 +75,8 @@ int FileJPEG::check_sig(Asset *asset) void FileJPEG::get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options) + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl) { if(video_options) { diff --git a/cinelerra-5.1/cinelerra/filejpeg.h b/cinelerra-5.1/cinelerra/filejpeg.h index b7c77ea0..21846cf4 100644 --- a/cinelerra-5.1/cinelerra/filejpeg.h +++ b/cinelerra-5.1/cinelerra/filejpeg.h @@ -22,6 +22,7 @@ #ifndef FILEJPEG_H #define FILEJPEG_H +#include "edl.inc" #include "file.inc" #include "filelist.h" #include "vframe.inc" @@ -35,10 +36,8 @@ public: // basic commands for every file interpreter static int check_sig(Asset *asset); static void get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options); + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl); static int get_best_colormodel(Asset *asset, int driver); int colormodel_supported(int colormodel); diff --git a/cinelerra-5.1/cinelerra/filejpeglist.C b/cinelerra-5.1/cinelerra/filejpeglist.C index 891bead6..b7755996 100644 --- a/cinelerra-5.1/cinelerra/filejpeglist.C +++ b/cinelerra-5.1/cinelerra/filejpeglist.C @@ -55,10 +55,8 @@ char* FileJPEGList::extension() } void FileJPEGList::get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options) + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl) { if(video_options) { diff --git a/cinelerra-5.1/cinelerra/filejpeglist.h b/cinelerra-5.1/cinelerra/filejpeglist.h index db446abd..9b1a9d8e 100644 --- a/cinelerra-5.1/cinelerra/filejpeglist.h +++ b/cinelerra-5.1/cinelerra/filejpeglist.h @@ -22,6 +22,7 @@ #ifndef FILEJPEGLIST_H #define FILEJPEGLIST_H +#include "edl.inc" #include "file.inc" #include "filebase.h" #include "filelist.h" @@ -36,10 +37,8 @@ public: static void get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options); + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl); int get_best_colormodel(int driver, int colormodel); int read_frame(VFrame *frame, VFrame *data); diff --git a/cinelerra-5.1/cinelerra/filempeg.C b/cinelerra-5.1/cinelerra/filempeg.C index 9913a98b..9988673f 100644 --- a/cinelerra-5.1/cinelerra/filempeg.C +++ b/cinelerra-5.1/cinelerra/filempeg.C @@ -105,10 +105,8 @@ FileMPEG::~FileMPEG() } void FileMPEG::get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options) + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl) { if(audio_options && asset->format == FILE_AMPEG) { diff --git a/cinelerra-5.1/cinelerra/filempeg.h b/cinelerra-5.1/cinelerra/filempeg.h index 9b8db9dd..a92f29b7 100644 --- a/cinelerra-5.1/cinelerra/filempeg.h +++ b/cinelerra-5.1/cinelerra/filempeg.h @@ -24,6 +24,7 @@ #include "bitspopup.inc" #include "condition.inc" +#include "edl.inc" #include "file.inc" #include "filebase.h" #include "indexfile.inc" @@ -63,10 +64,8 @@ public: friend class FileMPEGVideo; static void get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options); + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl); static int check_sig(Asset *asset); diff --git a/cinelerra-5.1/cinelerra/fileogg.C b/cinelerra-5.1/cinelerra/fileogg.C index a0fc9b18..b413066d 100644 --- a/cinelerra-5.1/cinelerra/fileogg.C +++ b/cinelerra-5.1/cinelerra/fileogg.C @@ -100,10 +100,8 @@ FileOGG::~FileOGG() } void FileOGG::get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options) + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl) { if(audio_options) { diff --git a/cinelerra-5.1/cinelerra/fileogg.h b/cinelerra-5.1/cinelerra/fileogg.h index 01d9ef6a..1538281b 100644 --- a/cinelerra-5.1/cinelerra/fileogg.h +++ b/cinelerra-5.1/cinelerra/fileogg.h @@ -23,6 +23,7 @@ #define FILEOGG_H #include "../config.h" +#include "edl.inc" #include "filebase.h" #include "file.inc" #include "packagingengine.h" @@ -103,10 +104,8 @@ public: ~FileOGG(); static void get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options); + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl); int reset_parameters_derived(); int open_file(int rd, int wr); diff --git a/cinelerra-5.1/cinelerra/filepng.C b/cinelerra-5.1/cinelerra/filepng.C index d6fd3796..68ce488c 100644 --- a/cinelerra-5.1/cinelerra/filepng.C +++ b/cinelerra-5.1/cinelerra/filepng.C @@ -77,10 +77,8 @@ int FilePNG::check_sig(Asset *asset) void FilePNG::get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options) + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl) { if(video_options) { diff --git a/cinelerra-5.1/cinelerra/filepng.h b/cinelerra-5.1/cinelerra/filepng.h index 85951444..2263bc38 100644 --- a/cinelerra-5.1/cinelerra/filepng.h +++ b/cinelerra-5.1/cinelerra/filepng.h @@ -23,6 +23,7 @@ #define FILEPNG_H +#include "edl.inc" #include "file.inc" #include "filebase.h" #include "filelist.h" @@ -36,10 +37,8 @@ public: static int check_sig(Asset *asset); static void get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options); + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl); static int get_best_colormodel(Asset *asset, int driver); int colormodel_supported(int colormodel); int read_frame(VFrame *frame, VFrame *data); diff --git a/cinelerra-5.1/cinelerra/fileppm.C b/cinelerra-5.1/cinelerra/fileppm.C index ac991aa4..f8dc0415 100644 --- a/cinelerra-5.1/cinelerra/fileppm.C +++ b/cinelerra-5.1/cinelerra/fileppm.C @@ -207,8 +207,9 @@ PPMConfigVideo::PPMConfigVideo(BC_WindowBase *gui, Asset *asset) unlock_window(); } -void FilePPM::get_parameters(BC_WindowBase *parent_window, Asset *asset, - BC_WindowBase* &format_window, int audio_options, int video_options) +void FilePPM::get_parameters(BC_WindowBase *parent_window, + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl) { if(video_options) { PPMConfigVideo *window = new PPMConfigVideo(parent_window, asset); diff --git a/cinelerra-5.1/cinelerra/fileppm.h b/cinelerra-5.1/cinelerra/fileppm.h index 05f145d1..db476971 100644 --- a/cinelerra-5.1/cinelerra/fileppm.h +++ b/cinelerra-5.1/cinelerra/fileppm.h @@ -22,6 +22,7 @@ #ifndef FILEPPM_H #define FILEPPM_H +#include "edl.inc" #include "filelist.h" #include "fileppm.inc" @@ -43,8 +44,9 @@ public: int read_frame_header(char *path); int write_frame(VFrame *frame, VFrame *output, FrameWriterUnit *unit); FrameWriterUnit* new_writer_unit(FrameWriter *writer); - static void get_parameters(BC_WindowBase *parent_window, Asset *asset, - BC_WindowBase* &format_window, int audio_options, int video_options); + static void get_parameters(BC_WindowBase *parent_window, + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl); }; class PPMConfigVideo : public BC_Window diff --git a/cinelerra-5.1/cinelerra/filesndfile.C b/cinelerra-5.1/cinelerra/filesndfile.C index 3ed55f01..f3370e16 100644 --- a/cinelerra-5.1/cinelerra/filesndfile.C +++ b/cinelerra-5.1/cinelerra/filesndfile.C @@ -356,10 +356,8 @@ int FileSndFile::write_samples(double **buffer, int64_t len) } void FileSndFile::get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options) + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl) { if(audio_options) { diff --git a/cinelerra-5.1/cinelerra/filesndfile.h b/cinelerra-5.1/cinelerra/filesndfile.h index ed86c141..74414c69 100644 --- a/cinelerra-5.1/cinelerra/filesndfile.h +++ b/cinelerra-5.1/cinelerra/filesndfile.h @@ -26,6 +26,7 @@ #include #include "bitspopup.inc" +#include "edl.inc" #include "filebase.h" #include "filesndfile.h" #include "sndfile.h" @@ -53,10 +54,8 @@ public: void asset_to_format(); static void get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options); + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl); SNDFILE *fd; SF_INFO fd_config; diff --git a/cinelerra-5.1/cinelerra/filetga.C b/cinelerra-5.1/cinelerra/filetga.C index e970c1c8..21c53d1d 100644 --- a/cinelerra-5.1/cinelerra/filetga.C +++ b/cinelerra-5.1/cinelerra/filetga.C @@ -98,10 +98,8 @@ int FileTGA::check_sig(Asset *asset) } void FileTGA::get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options) + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl) { if(video_options) { diff --git a/cinelerra-5.1/cinelerra/filetga.h b/cinelerra-5.1/cinelerra/filetga.h index 60ec6feb..e539c6d6 100644 --- a/cinelerra-5.1/cinelerra/filetga.h +++ b/cinelerra-5.1/cinelerra/filetga.h @@ -22,6 +22,7 @@ #ifndef FILETGA_H #define FILETGA_H +#include "edl.inc" #include "filelist.h" #include "guicast.h" @@ -33,10 +34,8 @@ public: static int check_sig(Asset *asset); static void get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options); + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl); int read_frame_header(char *path); static const char* compression_to_str(const char *compression); static const char* str_to_compression(const char *string); diff --git a/cinelerra-5.1/cinelerra/filetiff.C b/cinelerra-5.1/cinelerra/filetiff.C index 994fd6d0..5621f0e3 100644 --- a/cinelerra-5.1/cinelerra/filetiff.C +++ b/cinelerra-5.1/cinelerra/filetiff.C @@ -46,10 +46,8 @@ FileTIFF::~FileTIFF() void FileTIFF::get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options) + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl) { if(video_options) { diff --git a/cinelerra-5.1/cinelerra/filetiff.h b/cinelerra-5.1/cinelerra/filetiff.h index 354b9d07..321ea9be 100644 --- a/cinelerra-5.1/cinelerra/filetiff.h +++ b/cinelerra-5.1/cinelerra/filetiff.h @@ -24,6 +24,7 @@ #include +#include "edl.inc" #include "file.inc" #include "filelist.h" #include "mutex.inc" @@ -39,10 +40,8 @@ public: ~FileTIFF(); static void get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options); + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl); static int check_sig(Asset *asset); static const char* compression_to_str(int value); static const char* cmodel_to_str(int value); diff --git a/cinelerra-5.1/cinelerra/filevorbis.C b/cinelerra-5.1/cinelerra/filevorbis.C index c3281212..65eedf71 100644 --- a/cinelerra-5.1/cinelerra/filevorbis.C +++ b/cinelerra-5.1/cinelerra/filevorbis.C @@ -56,10 +56,8 @@ FileVorbis::~FileVorbis() } void FileVorbis::get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options) + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl) { if(audio_options) { diff --git a/cinelerra-5.1/cinelerra/filevorbis.h b/cinelerra-5.1/cinelerra/filevorbis.h index b40eed50..0e6c92cb 100644 --- a/cinelerra-5.1/cinelerra/filevorbis.h +++ b/cinelerra-5.1/cinelerra/filevorbis.h @@ -22,6 +22,7 @@ #ifndef FILEVORBIS_H #define FILEVORBIS_H +#include "edl.inc" #include "file.inc" #include "filebase.h" #include "vorbis/vorbisenc.h" @@ -39,10 +40,8 @@ public: ~FileVorbis(); static void get_parameters(BC_WindowBase *parent_window, - Asset *asset, - BC_WindowBase* &format_window, - int audio_options, - int video_options); + Asset *asset, BC_WindowBase* &format_window, + int audio_options, int video_options, EDL *edl); int reset_parameters_derived(); static int check_sig(Asset *asset); diff --git a/cinelerra-5.1/cinelerra/formatpopup.C b/cinelerra-5.1/cinelerra/formatpopup.C index 8977e55b..0793e59e 100644 --- a/cinelerra-5.1/cinelerra/formatpopup.C +++ b/cinelerra-5.1/cinelerra/formatpopup.C @@ -25,14 +25,11 @@ #include "ffmpeg.h" #include "formatpopup.h" #include "language.h" -#include "pluginserver.h" - FormatPopup::FormatPopup(int x, int y, int do_audio, int do_video, int use_brender) : BC_ListBox(x, y, 200, 200, LISTBOX_TEXT, 0, 0, 0, 1, 0, 1) { - this->plugindb = plugindb; this->do_audio = do_audio; this->do_video = do_video; this->use_brender = use_brender; @@ -101,10 +98,9 @@ int FormatPopup::handle_event() } -FFMPEGPopup::FFMPEGPopup(ArrayList *plugindb, int x, int y) +FFMPEGPopup::FFMPEGPopup(int x, int y) : BC_ListBox(x, y, 100, 200, LISTBOX_TEXT, 0, 0, 0, 1, 0, 1) { - this->plugindb = plugindb; set_tooltip(_("Set ffmpeg file type")); } diff --git a/cinelerra-5.1/cinelerra/formatpopup.h b/cinelerra-5.1/cinelerra/formatpopup.h index f7ba7975..aec42efd 100644 --- a/cinelerra-5.1/cinelerra/formatpopup.h +++ b/cinelerra-5.1/cinelerra/formatpopup.h @@ -26,7 +26,6 @@ #include "guicast.h" #include "formatpopup.inc" -#include "pluginserver.inc" class FormatPopup : public BC_ListBox { @@ -39,7 +38,6 @@ public: void create_objects(); void post_item(int format); virtual int handle_event(); // user copies text to value here - ArrayList *plugindb; ArrayList format_items; int use_brender, do_audio, do_video; }; @@ -48,12 +46,11 @@ public: class FFMPEGPopup : public BC_ListBox { public: - FFMPEGPopup(ArrayList *plugindb, int x, int y); + FFMPEGPopup(int x, int y); ~FFMPEGPopup(); void create_objects(); virtual int handle_event(); - ArrayList *plugindb; ArrayList ffmpeg_types; }; diff --git a/cinelerra-5.1/cinelerra/formattools.C b/cinelerra-5.1/cinelerra/formattools.C index 74c4cf09..48701998 100644 --- a/cinelerra-5.1/cinelerra/formattools.C +++ b/cinelerra-5.1/cinelerra/formattools.C @@ -46,7 +46,6 @@ FormatTools::FormatTools(MWindow *mwindow, this->mwindow = mwindow; this->window = window; this->asset = asset; - this->plugindb = mwindow->plugindb; aparams_button = 0; vparams_button = 0; @@ -164,7 +163,7 @@ void FormatTools::create_objects( format_button->create_objects(); x += format_button->get_w() + 5; window->add_subwindow(ffmpeg_type = new FFMpegType(x, y, 70, 1, asset->fformat)); - FFMPEG::set_asset_format(asset, asset->fformat); + FFMPEG::set_asset_format(asset, mwindow->edl, asset->fformat); x += ffmpeg_type->get_w(); window->add_subwindow(format_ffmpeg = new FormatFFMPEG(x, y, this)); format_ffmpeg->create_objects(); @@ -753,7 +752,7 @@ int FormatFormat::handle_event() FormatFFMPEG::FormatFFMPEG(int x, int y, FormatTools *format) - : FFMPEGPopup(format->plugindb, x, y) + : FFMPEGPopup(x, y) { this->format = format; } @@ -770,7 +769,7 @@ int FormatFFMPEG::handle_event() format->ffmpeg_type->update(text); format->asset->ff_audio_options[0] = 0; format->asset->ff_video_options[0] = 0; - FFMPEG::set_asset_format(format->asset, text); + FFMPEG::set_asset_format(format->asset, format->mwindow->edl, text); format->update_extension(); format->close_format_windows(); format->update_format(); diff --git a/cinelerra-5.1/cinelerra/formattools.h b/cinelerra-5.1/cinelerra/formattools.h index e0946a1f..35415ae0 100644 --- a/cinelerra-5.1/cinelerra/formattools.h +++ b/cinelerra-5.1/cinelerra/formattools.h @@ -36,24 +36,18 @@ class FormatTools { public: - FormatTools(MWindow *mwindow, - BC_WindowBase *window, - Asset *asset); + FormatTools(MWindow *mwindow, BC_WindowBase *window, Asset *asset); virtual ~FormatTools(); - void create_objects(int &init_x, - int &init_y, - int do_audio, // Include tools for audio - int do_video, // Include tools for video - int prompt_audio, // Include checkbox for audio - int prompt_video, // Include checkbox for video - int prompt_audio_channels, - int prompt_video_compression, - const char *locked_compressor, // Select compressors to be offered - int recording, // Change captions for recording - int *file_per_label, // prompt if nonzero - int brender, // Supply file formats for background rendering - int horizontal_layout = 0); + void create_objects(int &init_x, int &init_y, + int do_audio, int do_video, // Include tools for audio, video + int prompt_audio, int prompt_video, // Include checkbox for audio, video + int prompt_audio_channels, int prompt_video_compression, + const char *locked_compressor, // Select compressors to be offered + int recording, // Change captions for recording + int *file_per_label, // prompt if nonzero + int brender, // Supply file formats for background rendering + int horizontal_layout = 0); // In recording preferences, aspects of the format are locked // depending on the driver used. void update_driver(int driver); @@ -100,7 +94,6 @@ public: FormatFilePerLabel *labeled_files; - ArrayList *plugindb; MWindow *mwindow; const char *locked_compressor; int recording; diff --git a/cinelerra-5.1/ffmpeg/video/faststart_h264.mp4 b/cinelerra-5.1/ffmpeg/video/faststart_h264.mp4 index db06202b..9e7d6151 100644 --- a/cinelerra-5.1/ffmpeg/video/faststart_h264.mp4 +++ b/cinelerra-5.1/ffmpeg/video/faststart_h264.mp4 @@ -4,6 +4,7 @@ maxrate=20000000 bufsize=20000000 preset=veryslow profile=high +cin_pix_fmt yuv420p level=41 bf=8 refs=4 diff --git a/cinelerra-5.1/ffmpeg/video/raw.rgb b/cinelerra-5.1/ffmpeg/video/raw.rgb new file mode 100644 index 00000000..b7941178 --- /dev/null +++ b/cinelerra-5.1/ffmpeg/video/raw.rgb @@ -0,0 +1,2 @@ +rawvideo rawvideo +cin_pix_fmt rgb24 diff --git a/cinelerra-5.1/ffmpeg/video/raw.yuv b/cinelerra-5.1/ffmpeg/video/raw.yuv new file mode 100644 index 00000000..1f6a8ee6 --- /dev/null +++ b/cinelerra-5.1/ffmpeg/video/raw.yuv @@ -0,0 +1,2 @@ +rawvideo rawvideo +cin_pix_fmt yuv420p diff --git a/cinelerra-5.1/ffmpeg/video/rgb.dfl b/cinelerra-5.1/ffmpeg/video/rgb.dfl new file mode 100644 index 00000000..0394fb89 --- /dev/null +++ b/cinelerra-5.1/ffmpeg/video/rgb.dfl @@ -0,0 +1 @@ +raw.rgb diff --git a/cinelerra-5.1/ffmpeg/video/yuv.dfl b/cinelerra-5.1/ffmpeg/video/yuv.dfl new file mode 100644 index 00000000..47b9a075 --- /dev/null +++ b/cinelerra-5.1/ffmpeg/video/yuv.dfl @@ -0,0 +1 @@ +raw.yuv