Android: ffmpeg with filenames containing spaces

后端 未结 2 1545
一个人的身影
一个人的身影 2021-01-26 00:49

I want to execute ffmpeg from an Android app, very much as described here: Using FFmpeg with Android-NDK.

Executing the following commands work fine:

Pro         


        
2条回答
  •  温柔的废话
    2021-01-26 01:30

    Wild guess , but you may want the java process to pass "\ " read "backslash space" to the underlying OS when you want ffmpeg to open a file with a name containing a space.

    Its not what the java does with the string fileName. Its what the underlying OS and ffmpeg process receives that it will use as 'filename'. There you want "foo bar.input" to be

    "foo\ bar.input"

    So, the underlying expression "ffmpeg -i foo\ bar.input" should work.

    you just need to figure out how to construct your java strings so that the process feeds the above expression to the NDK / process layer running the "ffmpeg" command.

    more here

提交回复
热议问题