JorenSix / Panako

The Panako acoustic fingerprinting system.
GNU Affero General Public License v3.0
185 stars 38 forks source link

A couple of issues on Windows #5

Closed ggnkua closed 6 years ago

ggnkua commented 6 years ago

Hi,

First of all my java knowledge is non-existent so apologies for any blatant mistakes!

I am trying to use Panako on a Windows machine as the subject says. Because I don't have a java setup on Windows I thought I'd compile it on a linux vm (ubuntu based) and then send the .jar file over to Windows and try it there. Also I have populated a db from the linux vm and brought that over as well.

When I try to run the jar file on Windows I get the following output:

java -jar panako.jar query ..\sos-10.wav

Apr 12, 2018 1:21:03 PM be.tarsos.dsp.io.PipeDecoder <init>
INFO: found ffmpeg on the path (C:/u-blox/gallery/oracle/java/win_64/jdk1.8.0_102/bin;C:\CEVA-ToolBox\V10\CEVA-XC;C:\CEVA-ToolBox\V10\license;C:\CEVA-ToolBox\V1
0\Common;C:\u-blox\depot\\3.1;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\W
bem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Managemen
t Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;
C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Graphviz 2.28\bin;C:\Pr
ogram Files\Microsoft Windows Performance Toolkit\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\12
0\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;C:\u-blox\Programs\MATLAB\R2017b\runtime\win64;C:\u-blox\Programs\M
ATLAB\R2017b\bin;C:\Program Files (x86)\GitExtensions\;C:\Program Files\TortoiseSVN\bin). Will use ffmpeg for decoding media files.
Apr 12, 2018 1:21:03 PM be.panako.cli.Panako actuallyReallyStartApplication
INFO: Starting Panako application query with 1 arguments
Query;Query start (s);Query stop (s); Match Identifier;Match description; Match start (s); Match score; Time factor (%); Frequency factor(%)
Apr 12, 2018 1:21:03 PM be.tarsos.dsp.io.PipeDecoder getDecodedStream
INFO: Starting piped decoding process for C:\Users\gnak\Desktop\leenueks_shared\panako\..\sos-10.wav
Apr 12, 2018 1:21:03 PM be.tarsos.dsp.io.PipeDecoder getDecodedStream
INFO:  with command: ffmpeg -ss 0.0   -i "C:\Users\gnak\Desktop\leenueks_shared\panako\..\sos-10.wav" -vn -ar 8000 -ac 1 -sample_fmt s16 -f s16le pipe:1
Apr 12, 2018 1:21:03 PM be.tarsos.dsp.io.PipeDecoder getDecodedStream
WARNING: IO exception while decoding audio via sub process.Cannot run program "/bin/bash": CreateProcess error=2, The system cannot find the file specified
java.io.IOException: Cannot run program "/bin/bash": CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at be.tarsos.dsp.io.PipeDecoder.getDecodedStream(PipeDecoder.java:175)
        at be.tarsos.dsp.io.PipedAudioStream.getMonoStream(PipedAudioStream.java:91)
        at be.tarsos.dsp.io.PipedAudioStream.getMonoStream(PipedAudioStream.java:73)
        at be.tarsos.dsp.io.jvm.AudioDispatcherFactory.fromPipe(AudioDispatcherFactory.java:187)
        at be.tarsos.dsp.io.jvm.AudioDispatcherFactory.fromPipe(AudioDispatcherFactory.java:163)
        at be.panako.strategy.nfft.NFFTStrategy.query(Unknown Source)
        at be.panako.cli.Query$QueryTask.run(Unknown Source)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
        at java.lang.ProcessImpl.start(ProcessImpl.java:137)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        ... 12 more

My java version on windows is "1.8.0_102" and on linux "1.8.0_162". Also for the record this runs fine on linux. Because I found some multi-platform support in the source code and libraries I thought it might work

Any ideas?

Thanks, George

ggnkua commented 6 years ago

Hi,

the problems above seemed to have been mostly path problems - changing the configuration file seems to have fixed those. However now the program seems to hang after running ffmpeg. I turned logging on and this is what I get:

<?xml version="1.0" encoding="windows-1253" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
<record>
  <date>2018-04-13T10:31:20</date>
  <millis>1523604680401</millis>
  <sequence>0</sequence>
  <logger>be.tarsos.dsp.io.PipeDecoder</logger>
  <level>INFO</level>
  <class>be.tarsos.dsp.io.PipeDecoder</class>
  <method>&lt;init&gt;</method>
  <thread>1</thread>
  <message>found ffmpeg on the path (<snip>). Will use ffmpeg for decoding media files.</message>
</record>
<record>
  <date>2018-04-13T10:31:20</date>
  <millis>1523604680705</millis>
  <sequence>1</sequence>
  <logger>be.panako.cli.Panako</logger>
  <level>INFO</level>
  <class>be.panako.cli.Panako</class>
  <method>actuallyReallyStartApplication</method>
  <thread>1</thread>
  <message>Starting Panako application query with 1 arguments</message>
</record>
<record>
  <date>2018-04-13T10:31:20</date>
  <millis>1523604680708</millis>
  <sequence>2</sequence>
  <logger>be.tarsos.dsp.io.PipeDecoder</logger>
  <level>INFO</level>
  <class>be.tarsos.dsp.io.PipeDecoder</class>
  <method>getDecodedStream</method>
  <thread>13</thread>
  <message>Starting piped decoding process for <snip>sos-30.wav</message>
</record>
<record>
  <date>2018-04-13T10:31:20</date>
  <millis>1523604680708</millis>
  <sequence>3</sequence>
  <logger>be.tarsos.dsp.io.PipeDecoder</logger>
  <level>INFO</level>
  <class>be.tarsos.dsp.io.PipeDecoder</class>
  <method>getDecodedStream</method>
  <thread>13</thread>
  <message> with command: ffmpeg -ss 0.0   -i "<snip>sos-30.wav" -vn -ar 8000 -ac 1 -sample_fmt s16 -f s16le pipe:1</message>
</record>
<record>
  <date>2018-04-13T10:31:20</date>
  <millis>1523604680719</millis>
  <sequence>4</sequence>
  <logger>be.tarsos.dsp.AudioDispatcher</logger>
  <level>FINE</level>
  <class>be.tarsos.dsp.AudioDispatcher</class>
  <method>addAudioProcessor</method>
  <thread>13</thread>
  <message>Added an audioprocessor to the list of processors: be.panako.strategy.nfft.NFFTEventPointProcessor@222e9105</message>
</record> 

Any help appreciated!

ggnkua commented 6 years ago

It seems I had to add /c to DECODER_PIPE_ENVIRONMENT_ARG in the config file. All seems to work ok now - closing ticket