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

1607 views

ANSWER

Hello,

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?

03/18/2014

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 :'(
03/18/2014