No register commands for conversion
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;
}
0 votes
0 answers
1687 views
Did you setup ffmpeg on your machine? Do you have other logs in server.log? Can you try to run ffmpeg on a file for a test outside Nuxeo?