[Cin] Suggestion for improving the BathRender window

Andrew Randrianasulu randrianasulu at gmail.com
Wed Jan 20 00:04:32 CET 2021


В сообщении от Wednesday 20 January 2021 00:18:36 Rafa Mar Multimedia en Gnu\Linux via Cin написал(а):
> With tags you can fragment the render into clips, but you cannot export
> only two non-contiguous fragments, for example.

Hm I looked into it ...

in render.inc you can find those defines:

// Internal rendering strategies

#define SINGLE_PASS             0
#define FILE_PER_LABEL          1
#define SINGLE_PASS_FARM        2
#define FILE_PER_LABEL_FARM     3
#define BRENDER_FARM            4

and grep FILE_PER_LABEL *

resulted in 

guest at slax:~/botva/src/cinelerra-git/cin-5/new-git/cinelerra/cinelerra-5.1/cinelerra$ grep FILE_PER_LABEL *
grep: ci: Нет такого файла или каталога
grep: data: Это каталог
menueffects.C:  use_labels = defaults->get("RENDER_FILE_PER_LABEL", 0);
menueffects.C:  defaults->update("RENDER_EFFECT_FILE_PER_LABEL", use_labels);
menueffects.C:                  if(strategy == FILE_PER_LABEL || strategy == FILE_PER_LABEL_FARM)
menueffects.C:                  if(strategy == FILE_PER_LABEL || strategy == FILE_PER_LABEL_FARM)
packagedispatcher.C:    case FILE_PER_LABEL:
packagedispatcher.C:    case FILE_PER_LABEL_FARM:
packagedispatcher.C:    case FILE_PER_LABEL:
packagedispatcher.C:    case FILE_PER_LABEL_FARM:
render.C:                       (use_labels ? FILE_PER_LABEL_FARM : SINGLE_PASS_FARM) :
render.C:                       (use_labels ? FILE_PER_LABEL      : SINGLE_PASS     ) ;
render.C:       use_labels = mwindow->defaults->get("RENDER_FILE_PER_LABEL", 0);
render.C:       sprintf(string_name, "RENDER_%i_FILE_PER_LABEL", profile_slot);
render.C:       mwindow->defaults->update("RENDER_FILE_PER_LABEL", use_labels);
render.C:           ( strategy == SINGLE_PASS_FARM || strategy == FILE_PER_LABEL_FARM ) ) {
render.C:                   strategy == FILE_PER_LABEL_FARM ) {
render.inc:#define FILE_PER_LABEL          1
render.inc:#define FILE_PER_LABEL_FARM     3
renderprofiles.C:       sprintf(string_name, "RENDER_%i_FILE_PER_LABEL", profile_slot);
renderprofiles.C:               rwindow->render->use_labels ? FILE_PER_LABEL : SINGLE_PASS);
grep: tests: Это каталог

so I looked into packagedispatcher.C

and as far as I can see it uses simple non-stop *while* loop over labels:


int PackageDispatcher::create_packages(MWindow *mwindow, EDL *edl,
	Preferences *preferences, int strategy, Asset *default_asset,
	double total_start, double total_end, int test_overwrite)

[skip]

case FILE_PER_LABEL:
	case FILE_PER_LABEL_FARM:
		label = edl->labels->first;
		total_packages = 0;
		packages = new RenderPackage*[edl->labels->total() + 2];
		if( !label ) {
			eprintf(_("Render file per label and no labels\n"));
			result = 1;
			break;
		}

		Render::get_starting_number(default_asset->path,
			current_number, number_start, total_digits, 3);

		while( audio_position < audio_end ) {
			RenderPackage *package = new RenderPackage;
			packages[total_packages++] = package;
			package->audio_start = audio_position;
			package->video_start = video_position;
			package->audio_do = default_asset->audio_data;
			package->video_do = default_asset->video_data;

			while( label &&
				(label->position < (double)audio_position / default_asset->sample_rate ||
				EQUIV(label->position, (double)audio_position / default_asset->sample_rate)) ) {
				label = label->next;
			}

			if( !label ) {
				package->audio_end = Units::to_int64(total_end * default_asset->sample_rate);
				package->video_end = Units::to_int64(total_end * default_asset->frame_rate);
			}
			else {
				package->audio_end = Units::to_int64(label->position * default_asset->sample_rate);
				package->video_end = Units::to_int64(label->position * default_asset->frame_rate);
			}

			if( package->audio_end > audio_end ) {
				package->audio_end = audio_end;
			}

			if( package->video_end > video_end ) {
				package->video_end = video_end;
			}

			audio_position = package->audio_end;
			video_position = package->video_end;

// Create file number differently if image file sequence
			Render::create_filename(package->path, default_asset->path,
				current_number++, total_digits, number_start);
		}

		total_allocated = total_packages;
		break;

====

so, _I think_ it should be possible to add 'skip_list' to this function so labels
presented in this list will be skipped ..... 

After this 'we' can add GUI for filling this list with label names, of course with
multiselection ...

Not sure if I pull this out :} But I'll try!



> Thank you very much for your answer.
> 
> El mar, 19 ene 2021 a las 22:12, Andrew Randrianasulu via Cin (<
> cin at lists.cinelerra-gg.org>) escribió:
> 
> > В сообщении от Wednesday 20 January 2021 00:01:32 Rafa Mar Multimedia en
> > Gnu\Linux via Cin написал(а):
> > > 1- I think that the batch render assistant should not remember the last
> > > job, after closing the session, and always open blank.
> > > We precisely have the save and load button if we want to save the batch
> > > render list.
> >
> > I think this is one of those "cheap on programmer's time speed ups", but
> > also see below ....
> >
> >
> > > I don't see much sense to the ~/.cast5/batchrender.rc file
> >
> > As far as I understand batchrendering also used for renderfarm. I haven't
> > tested this
> > mode yet, and I'm afraid about modifying code I haven't tested yet.
> >
> > > It would be more useful to improve the "Save jobs" option, showing the
> > > location of the xml file and if it already exists, simply when saving
> > does
> > > not reopen the explorer window, a warning to overwrite, and simply
> > pressing
> > > Load jobs will load it if it is in the box. The latter saved file if it
> > > could be remembered.
> > > 2- Is it possible that the batch render does not take into account the
> > > position of the playhead?
> > > This lacks any logic in batch processing. Typically, the entire project
> > is
> > > rendered regardless of where the playhead was left.
> >
> > As it was laready noted - 'typically' as in other programs may not apply
> > to Cinelerra,
> > due to how  she organized internally ..
> > for better or worse .....
> >
> > > 3- Just a suggestion. Is it possible to add the option to render the area
> > > marked with the in and out points?
> > > For example, in a project I mark an area and by means of a button I
> > > indicate that in the new line of the project loaded in EDL Path only this
> > > area is rendered, if later I create a new line and modify the in and out
> > > points, I can add this to this new line and then the batch render will
> > > export these fragments to me, from the same or several projects.
> >
> > But can't you do the same with labels? Or not?
> > (never used them personally...sorry...)
> >
> > >
> > > [image: Idea.png]
> > > In this way it would even be better than in many professional
> > applications.
> > > You just have to explain the importance of creating a new line before
> > > changing data. It is the only thing that is not intuitive, but once it is
> > > known it is no longer a problem.
> > > I'm sticking with the idea of removing the Save to EDL button and the
> > > job/session match option, but this could go on as Andrew-R has done.
> > >
> >
> >
> > --
> > Cin mailing list
> > Cin at lists.cinelerra-gg.org
> > https://lists.cinelerra-gg.org/mailman/listinfo/cin
> >
> 




More information about the Cin mailing list