bravobit / FFmpeg-Android

FFMpeg/FFprobe compiled for Android
https://bravobit.nl/
MIT License
733 stars 172 forks source link

Invalid data found when processing input #146

Open ilpelatodijavascript opened 4 years ago

ilpelatodijavascript commented 4 years ago

Hello, I'm trying to concat some videos. The command works fine on widows, I tested it with the same txt file and videos. This is the error I get:

/data/data/myapp/files/concat_files.txt: Invalid data found when processing input
E/FFmpeg: Error running FFmpeg binary
    java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Process.exitValue()' on a null object reference
        at nl.bravobit.ffmpeg.CommandResult.getOutputFromProcess(CommandResult.java:18)
        at nl.bravobit.ffmpeg.FFcommandExecuteAsyncTask.doInBackground(FFcommandExecuteAsyncTask.java:49)
        at nl.bravobit.ffmpeg.FFcommandExecuteAsyncTask.doInBackground(FFcommandExecuteAsyncTask.java:12)
        at android.os.AsyncTask$2.call(AsyncTask.java:292)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at java.lang.Thread.run(Thread.java:818)

This is the command:

String[] command = new String[]{"-f", "concat", "-safe", "0", "-i", concatF.toString(), "-c:v", "copy", output.toString()};

Here's my txt file:

file '/data/data/myapp/files/video1.ts'
file '/data/data/myapp/files/video2.ts'
file '/data/data/myapp/files/video3.ts'
file '/data/data/myapp/files/video4.ts'
file '/data/data/myapp/files/video5.ts'
#End