Coder Social home page Coder Social logo

Comments (12)

hiteshsondhi88 avatar hiteshsondhi88 commented on June 12, 2024

you can add quotes while sending file path with spaces

from ffmpeg-android-java.

protoss5482 avatar protoss5482 commented on June 12, 2024

I tried with quotes:
-i '/storage/emulated/0/Music/They Might Be Giants - Seven Days Of The We.mp3' -strict experimental -ab 48000 -ac 2 -ar 22050 /storage/emulated/0/Music/out.mp4

logcat:
'/storage/emulated/0/Music/They: No such file or directory

Or there must be other quotes?

from ffmpeg-android-java.

hiteshsondhi88 avatar hiteshsondhi88 commented on June 12, 2024

Try escaping the spaces similar to this -> "./ffmpeg -i /sdcard/sample\ 1.mkv /sdcard/sample\ 2.mp4"

from ffmpeg-android-java.

Thiru2Moorthy avatar Thiru2Moorthy commented on June 12, 2024

I followed your suggestions of using single and double quote and also tried using escape sequence while using path with spaces.

However the log cat still source same error.

Any other suggestions please.

from ffmpeg-android-java.

Thiru2Moorthy avatar Thiru2Moorthy commented on June 12, 2024

I discovered that calling "Runtime.getRuntime().exec();" with a string array as parameter instead of string solved this issue, by passing the commands as an array allowed me to include spaces.

Ex: Process run(String command[]) {
Process process = null;
try {
process = Runtime.getRuntime().exec(command);
} catch (IOException e) {
Log.e("Exception while trying to run: " + command, e);
}
return process;
}

from ffmpeg-android-java.

gderaco avatar gderaco commented on June 12, 2024

This library uses Runtime.getRuntime().exec(String) method wich is not good if you have for example double quotes ( see https://stackoverflow.com/questions/14078799/getruntime-exec-with-double-quotes-in-command ). Need to switch to exec(String[] cmdarray)

from ffmpeg-android-java.

javiermanzano avatar javiermanzano commented on June 12, 2024

Any solution with this @gderaco ?

from ffmpeg-android-java.

javiermanzano avatar javiermanzano commented on June 12, 2024

I've just done a pull request for this: #17

from ffmpeg-android-java.

dayeba avatar dayeba commented on June 12, 2024

i'm having the same issue, i tried escaping and my final command is
ffmpeg -y -i /storage/emulated/0/Download/1\ -\ 1.mp4 -f mp4 -vcodec libx264 -maxrate 750k -ss 0.0 -to 120.0 -vf scale=480:-2 -r 24 -strict -2 /storage/emulated/0/DCIM/Camera/aaa.mp4
and logcat says
Unrecognized option ''.
Error splitting the argument list: Option not found

Do I have to use Runtime.getRuntime().exec() then?

from ffmpeg-android-java.

rafaelekol avatar rafaelekol commented on June 12, 2024

I have same issue, how I can use your commit #17?

from ffmpeg-android-java.

Dak0r avatar Dak0r commented on June 12, 2024

These changes don't seem to be in the Maven Repository, yet.. do you have plans for updating the repository? thanks

from ffmpeg-android-java.

symphonyrecords avatar symphonyrecords commented on June 12, 2024

I've fixed this problem by doing this stackoverflow

from ffmpeg-android-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.