0

Thx all for helping <3

So, I have downloaded the ffmpeg library, imported it to eclipse, added it as a library to my android application and tried to use it, it doesn't work.

Step by step:

  • Downloaded this file : https://github.com/guardianproject/android-ffmpeg-java
  • Extracted it to an empty folder.
  • At Eclipse, "import" and then I have selected this empty folder.
  • Right click at my project, properties, android, added the ffmpeg library.
  • At my on create I used this code(just for checking):

    ffmpeg -t 30 -i inputfile.mp3 -acodec copy outputfile.mp3

But I get a lot of errors:

Multiple markers at this line
- Syntax error on token(s), misplaced 
 construct(s)
- Syntax error on token "inputfile", delete this 
 token
- Syntax error on token "30", delete this token
- Syntax error on token ".", ; expected

Can you see my problem?

DAVIDBALAS1
  • 484
  • 10
  • 31
  • Are you trying to write shell commands as Java code? That won't work. If you want to write shell commands, you should create a shell script (e.g. an `sh` script). – yshavit Jul 29 '14 at 22:02
  • @yshavit Ty for replying :) yeah thats exactly what im trying to do, do you know how to create a shell script? – DAVIDBALAS1 Jul 30 '14 at 14:42
  • That runs on Android? No (I don't know much/anything about Android dev). In general, just create a file with `#!/bin/bash` on one line, and then your `ffmpeg...` stuff on the next line, and then just run it as `bash myfile.sh` from command line. That has nothing to do with Java or Eclipse, though. – yshavit Jul 30 '14 at 15:16
  • Take a look at updated answer to your 'Trim' question - that should hopefully give you what you need to involve the ffmpeg from a Java Android application: http://stackoverflow.com/a/25002844/334402 – Mick Jul 30 '14 at 17:44

0 Answers0