oh, source_start was always 0, no wonder it was not working!

try new patch?



On Wednesday, June 2, 2021, Andrew Randrianasulu <[email protected]>
wrote:

>
>
> On Wednesday, June 2, 2021, Andrea paz <[email protected]>
> wrote:
>
>> Preface: I do not use and do not know how to use other NLEs than
>> CinGG. I installed them just to see their functionality and updates.
>>
>> Kdenlive creates an edl (even though it calls it .xml) via
>> OpenTimeline. This doesn't work for me on either Kdenlive itself or
>> Olive (which uses OpenTimeline). The error is that the format is not
>> recognized.
>
>
> is there vertical column 1-17 like i see in dropbox preview?
>
> oh, it copied w/o this column..
>
>
> TITLE: Kdenlive imported timeline
>
> 001 aaaamp4 A C 00:00:00:00 00:00:01:06 00:00:00:00 00:00:01:06
> * FROM CLIP: aaaa.mp4
> * OTIO TRUNCATED REEL NAME FROM: aaaa.mp4
> 002 aaaamp4 A C 00:00:01:07 00:00:03:15 00:00:01:06 00:00:03:14
> * FROM CLIP: aaaa.mp4
> * OTIO TRUNCATED REEL NAME FROM: aaaa.mp4
> 003 aaaamp4 A C 00:00:03:16 00:00:06:06 00:00:03:14 00:00:06:04
> * FROM CLIP: aaaa.mp4
> * OTIO TRUNCATED REEL NAME FROM: aaaa.mp4
> 004 aaaamp4 A C 00:00:06:07 00:00:07:21 00:00:06:04 00:00:07:18
> * FROM CLIP: aaaa.mp4
> * OTIO TRUNCATED REEL NAME FROM: aaaa.mp4
> 005 aaaamp4 A C 00:00:07:22 00:00:09:18 00:00:07:18 00:00:09:14
> * FROM CLIP: aaaa.mp4
> * OTIO TRUNCATED REEL NAME FROM: aaaa.mp4
>
> anyway, from big A before C i can guess it tries to export audio only?
>
> try to change this to V or A/V?
>
>
>
>> DaVinci Resolve creates an edl file that is not recognized in Kdenlive
>> and Olive. Even inside DVR itself it is opened but it doesn't work.
>> Anyway I don't know how to use DVR so it's sure that I'm wrong in
>> something.
>
>
>  TITLE: Timeline 1
> FCM: NON-DROP FRAME
>
> 001 edl V C 00:00:00:00 00:00:08:07 01:00:00:00 01:00:08:07
> * FROM CLIP NAME: bbb.mov
>
> 002 edl V C 00:00:08:07 00:00:14:03 01:00:08:07 01:00:14:03
> * FROM CLIP NAME: bbb.mov
>
> 003 edl V C 00:00:14:03 00:00:16:09 01:00:14:03 01:00:16:09
> * FROM CLIP NAME: bbb.mov
>
> 004 edl V C 00:00:16:09 00:00:20:09 01:00:16:09 01:00:20:09
> * FROM CLIP NAME: bbb.mov
>
> ====
>
> this one looks correct, may be it need 'relinking' for finding source
> files?
>
> The DVR edl is recognized in Openshot, but it doesn't open it because
>> it can't find the original source. Again, I don't know how to do this.
>>
>> See the files at:
>> https://www.dropbox.com/s/8nau5lvn7ymrgqr/edl.tar.gz?dl=0
>>
>
> thanks a lot for doing those tests!
>
diff --git a/cinelerra-5.1/cinelerra/exportedl.C b/cinelerra-5.1/cinelerra/exportedl.C
index f4e3805c..8d3f23ff 100644
--- a/cinelerra-5.1/cinelerra/exportedl.C
+++ b/cinelerra-5.1/cinelerra/exportedl.C
@@ -92,11 +92,12 @@ int ExportEDLAsset::edit_to_timecodes(Edit *edit,
 	double edit_sourceend;
 	double edit_deststart;
 	double edit_destend;
-
+	
+	if(!strcmp(reel_name,""))
 	strcpy(reel_name, "   BL   ");
-	edit_sourcestart = 0;
-	edit_sourceend = track->from_units(edit->length);
-
+	edit_sourcestart = track->from_units(edit->startsource);
+	edit_sourceend = track->from_units(edit->length + edit->startsource);
+	
 	edit_deststart = track->from_units(edit->startproject);
 	edit_destend = track->from_units(edit->startproject + edit->length);
 
@@ -138,8 +139,22 @@ void ExportEDLAsset::export_it()
 	{
 
 		// TODO: Find docs about exact header for CMX3600
-		fprintf(fh, "TITLE: Cinproj   FORMAT: CMX 3600 4-Ch\n");
-
+		// https://xmil.biz/EDL-X/CMX3600.pdf
+		double frame_rate = edl->session->frame_rate;
+		int frame_rate_int = (int)frame_rate;
+		char proj_title[BCTEXTLEN];
+		strcpy(proj_title,basename(mwindow->session->filename));
+		fprintf(fh, "TITLE: %s fps: %i\n", proj_title, frame_rate_int);
+		switch(frame_rate_int) {
+		case 24:
+		case 25:
+		case 50:
+		case 60:
+		fprintf(fh, "FCM: NON-DROP FRAME\n"); // fixme: select depending on fps
+		break;
+		default:
+		fprintf(fh, "FCM: DROP FRAME\n");
+		}
 		int colnum = 1;
 
 
@@ -147,6 +162,11 @@ void ExportEDLAsset::export_it()
 			edit;
 			edit = edit->next)
 		{
+		
+		// max number of entries in cmx3600
+		if (colnum > 999)
+		return;
+		
 			char reel_name[BCTEXTLEN];
 			char avselect[5];
 			char edittype[5] = "C   ";
@@ -155,6 +175,12 @@ void ExportEDLAsset::export_it()
 			char sourceoutpoint[12];
 			char destinpoint[12];
 			char destoutpoint[12];
+			
+			if(!edit->asset)
+			strcpy(reel_name,"BL  ");
+			else
+			strcpy(reel_name,"AX  ");
+			
 			if (track->data_type == TRACK_AUDIO)
 				strcpy(avselect, "A   ");
 			else
@@ -187,10 +213,15 @@ void ExportEDLAsset::export_it()
 			} else
 			{
 				edit_to_timecodes(edit, sourceinpoint, sourceoutpoint, destinpoint, destoutpoint, reel_name);
+				char filename[1024];
+				if (edit->asset)
+				strcpy(filename,basename(edit->asset->path));
 				fprintf(fh, "%03d %8s %s %4s %3s", colnum, reel_name, avselect, edittype, cutinfo);
 				fprintf(fh, " %s %s", sourceinpoint, sourceoutpoint);
 				fprintf(fh, " %s %s", destinpoint, destoutpoint);
 				fprintf(fh,"\n");
+				if(edit->asset)
+				fprintf(fh,"* FROM CLIP NAME: %s\n", filename);
 				last_dissolve = 0;
 			}
 
-- 
Cin mailing list
[email protected]
https://lists.cinelerra-gg.org/mailman/listinfo/cin

Reply via email to