cancel
Showing results for 
Search instead for 
Did you mean: 

No register commands for conversion

William_Cooper
Champ in-the-making
Champ in-the-making

when i use this code:

    CommandLineExecutorComponent commandLineExecutorComponent = new CommandLineExecutorComponent();
	for (String command : commandLineExecutorComponent.getRegistredCommands()) {
		System.out.println(command);
	}
	
	for (String command : commandLineExecutorComponent.getAvailableCommands()) {
		System.out.println(command);
	}

it doesnt print anything. i cant proceed because when i use ffmpeg its says

Exception in thread "main" org.nuxeo.ecm.platform.commandline.executor.api.CommandNotAvailable: ffmpeg is not a registered command. null
at org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent.execCommand(CommandLineExecutorComponent.java:155)
at tv.migo.nuxeo.IntermidiateTranscoding.run(IntermidiateTranscoding.java:69)
at tv.migo.nuxeo.IntermidiateTranscoding.main(IntermidiateTranscoding.java:78)

code here:

@OperationMethod
public BlobHolder run(BlobHolder blobHolder) throws ClientException, CommandNotAvailable {

	System.out.println(blobHolder.getFilePath());
	System.out.println(blobHolder.getBlob().getFilename());
	System.out.println(blobHolder.getBlob().getLength());
	
	/*
	ConversionServiceImpl conversionServiceImpl = new ConversionServiceImpl();
	BlobHolder holder = conversionServiceImpl.convertToMimeType(".mp4", blobHolder, null);
	*/
	
	CommandLineExecutorComponent commandLineExecutorComponent = new CommandLineExecutorComponent();
	for (String command : commandLineExecutorComponent.getRegistredCommands()) {
		System.out.println(command);
	}
	
	for (String command : commandLineExecutorComponent.getAvailableCommands()) {
		System.out.println(command);
	}
	CmdParameters parameters = new CmdParameters();
	
	parameters.addNamedParameter("-i", blobHolder.getFilePath());
	parameters.addNamedParameter("-vcodec", "dnxhd");
	parameters.addNamedParameter("-b", "115M");
	
	BlobHolder holder = (BlobHolder) commandLineExecutorComponent.execCommand("ffmpeg", parameters);
	
	return holder;
}
2 REPLIES 2

Vladimir_Pasqui
Star Collaborator
Star Collaborator

Hello,

William_Cooper
Champ in-the-making
Champ in-the-making

yes.ffmpeg is found on my own pc and in our nuxeo server. i've tried it.the problem is that NO COMMANDS are available.0.even echo doesn't appear

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.