On Saturday, May 21, 2022, Phyllis Smith via Cin <cin@lists.cinelerra-gg.org>
wrote:

> Andrea, I am still trying to understand it too and will let you know as it
> is not currently documented in the manual.
>


from what I remember this function retrives timecode crom media/assets, if
it exist there. Then you can use align timecode function..


I have patch forcing cingg's ffmpeg to write timecode relative to timeline,
so you can use this for making short movs or mpegs with this info


moment... attached


1. around page 140 in the pdf manual, I noticed the "Overwirte Plugins" is
> missing the word "plugins" and is just the overwrite like the preceding
> overwrite.
> 2. Timecode option for the Edits Popup is not actually documented anywhere
> and is not in the Shortcuts either.
>
> On Sat, May 21, 2022 at 3:33 AM Andrea paz via Cin <
> cin@lists.cinelerra-gg.org> wrote:
>
>> I don't understand how this option works and what it is for; however
>> compiling the latest git I have these results:
>>
>> MMB on edit and then "Timecode" --> Ok
>> MMB on selected edit and then "Timecode" --> OK
>>
>> ctrl + ! (shortcut) on edit --> OK
>> ctrl + ! (shortcut) on selected edit --> OK
>> --
>> Cin mailing list
>> Cin@lists.cinelerra-gg.org
>> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>>
>
From 9a078474f2a41f80f78a4d9db3a94a63063735a3 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianas...@gmail.com>
Date: Mon, 21 Jun 2021 02:22:08 +0300
Subject: [PATCH 04/35] 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.34.0

-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin

Reply via email to