On Tuesday, October 19, 2021, Andrea paz via Cin <[email protected]> wrote:
> These topics are very interesting to me, and I've tried to discuss > them at other times. > > @MatN > The xml format of CinGG is specific and not compatible with that of > other programs. There can be no interchange. Andrew has worked on the > EDL CMX3600, but it is not fully functional and in any case it is too > poor and obsolete (it was born for analog). Perhaps a feasible way > would be to make the CinGG xml compatible with OpenTimelineIO > (https://github.com/PixarAnimationStudios/OpenTimelineIO), but I have > no idea how difficult it would be to create an "adapter". > > > @Stefan > Since ffmpeg supports mxf in a basic way, there is an encoding preset > available in CinGG; however, I assume you are referring to more > advanced features such as timecode and metadata support, so that the > SMTP standard is fully respected. Could you provide more details on > what is required by this format and what is missing? Do you think it's > possible to implement it in CinGG (which also involves implementing > timecode and metadata)? I hacked unconditional timecode output some time ago not sure how useful it is? I guess other metadata will require some gui changes. Cinelerra - CVE had something like this... (if I remember correctly) https://github.com/vanakala/cinelerra-cve/blob/master/cinelerra/fileavlibs.C === // Metadata AVDictionary *meta = 0; struct tm ctim, *ptm; time_t tst; char string[128]; av_dict_set(&meta, "comment", version_name, 0); tst = time(0); if((ptm = gmtime_r(&tst, &ctim)) && strftime(string, sizeof(string), "%FT%TZ", ptm)) av_dict_set(&meta, "creation_time", string, 0); if(metalist = asset->encoder_parameters[FILEAVLIBS_METADT_IX]) { if(aparam = metalist->find("copyright")) av_dict_set(&meta, "copyright", aparam->stringvalue, 0); if(aparam = metalist->find("title")) av_dict_set(&meta, "title", aparam->stringvalue, 0); if(aparam = metalist->find("author")) av_dict_set(&meta, "author", aparam->stringvalue, 0); } context->metadata = meta; ==== > [PS: I saw that you are contributing to the AXIOM Beta/OpenCine > project; what is the status of the project? I wish you all the luck! > https://apertus.org/axiom-beta > https://apertus.org/opencine] > -- > Cin mailing list > [email protected] > https://lists.cinelerra-gg.org/mailman/listinfo/cin >
From 269d6342fe23a3430dfe9ea28c2a6f72f3961b82 Mon Sep 17 00:00:00 2001 From: Andrew Randrianasulu <[email protected]> Date: Mon, 21 Jun 2021 02:22:08 +0300 Subject: [PATCH 30/72] Add timecode to output mov/mxf --- cinelerra-5.1/cinelerra/ffmpeg.C | 8 ++++++++ cinelerra-5.1/cinelerra/render.C | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/cinelerra-5.1/cinelerra/ffmpeg.C b/cinelerra-5.1/cinelerra/ffmpeg.C index 3655d643..e3c5b1c9 100644 --- a/cinelerra-5.1/cinelerra/ffmpeg.C +++ b/cinelerra-5.1/cinelerra/ffmpeg.C @@ -2895,6 +2895,14 @@ int FFMPEG::open_encoder(const char *type, const char *spec) vid->width = asset->width; vid->height = asset->height; vid->frame_rate = asset->frame_rate; + + char tc_str[20] = "00:00:00:00"; + double tc_offset; + if(asset->timecode > 0) + Units::totext(tc_str, asset->timecode, TIME_HMSF, 0, asset->frame_rate, 0); + //printf("tc: %s \n", tc_str); + av_dict_set(&st->metadata, "timecode", tc_str, 0); + if( (vid->color_range = asset->ff_color_range) < 0 ) vid->color_range = file_base->file->preferences->yuv_color_range; switch( vid->color_range ) { diff --git a/cinelerra-5.1/cinelerra/render.C b/cinelerra-5.1/cinelerra/render.C index 1136be9b..abb9b5e4 100644 --- a/cinelerra-5.1/cinelerra/render.C +++ b/cinelerra-5.1/cinelerra/render.C @@ -419,6 +419,7 @@ int Render::check_asset(EDL *edl, Asset &asset) File::renders_video(&asset) ) { asset.video_data = 1; asset.layers = 1; + asset.width = edl->session->output_w; asset.height = edl->session->output_h; asset.interlace_mode = edl->session->interlace_mode; @@ -726,6 +727,11 @@ void RenderThread::render_single(int test_overwrite, Asset *asset, EDL *edl, if( !render->result ) { // Get total range to render render->total_start = command->start_position; + + render->default_asset->timecode = command->start_position; + printf("tc: %f \n", render->default_asset->timecode); + render->default_asset->timecode += edl->session->timecode_offset; + render->total_end = command->end_position; total_length = render->total_end - render->total_start; -- 2.33.1
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin

