Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFMPEG command can not generate output file #13

Open
mansiJspaceo opened this issue Feb 20, 2020 · 0 comments
Open

FFMPEG command can not generate output file #13

mansiJspaceo opened this issue Feb 20, 2020 · 0 comments

Comments

@mansiJspaceo
Copy link

Hello

Successfully i build all arms Thank you for you Response.
also add all files in JNILibs.
Now When i Run Command in Android It's can not gives any error also not generating output
video
for this.

Can you please give Idea how can i run command successfully get output

`private fun ffmpegTest() {
object : Thread() {
override fun run() {
val startTime = System.currentTimeMillis()
val input = Environment.getExternalStorageDirectory().path + File.separator +
"DCIM" + File.separator + "test.mp3"
val output = Environment.getExternalStorageDirectory().path + File.separator +
"DCIM" + File.separator + "output.mp3"

            val cmd = "ffmpeg -y -i %s -vn -acodec copy -ss %s -t %s %s"
            val result = String.format(cmd, input, "00:00:30", "00:00:40", output)

            command.runCmd(result.split(" ".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray())
            Log.d("FFmpegTest", "run: 耗时:" + (System.currentTimeMillis() - startTime))
        }
    }.start()


}`

This is my Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant