I have an ffmpeg
executable file compiled for ARM Android in my /data/data/APP/files
folder, with execute permission.
I am trying to execute a command based on an example extracted from the FFmpeg site.
This is the command-line I'm typing:
./ffmpeg -loop 1 -i /mnt/sdcard/com.example.test/image.png -c:v libx264 -t 30 -pix_fmt yuv420p /mnt/sdcard/com.example.test/video.mp4
My objetive is to execute it from my app, but even in command-line, I'm getting this error:
./ffmpeg: 1: Syntax error: "(" unexpected
Does anyone know what is and how to solve it?
- UPDATE
I found a newer version and I think I passed through that error.
But now, for any call to ffmpeg
executable, I'm getting an error like this:
# ./ffmpeg -loop 1 -i /mnt/sdcard/com.example.teste/imagem.png -c:v libx264 -t 30 -pix_fmt yuv420p /mnt/sdcard/com.example.teste/video.mp4
[1] + Stopped (signal) ./ffmpeg -loop 1 -i /mnt/sdcard/com.example.teste/imagem.png -c:v libx264 -t 30 -pix_fmt yuv420p /mnt/sdcard/com.example.teste/video.mp4
[1] Segmentation fault ./ffmpeg -loop 1 -i /mnt/sdcard/com.example.teste/imagem.png -c:v libx264 -t 30 -pix_fmt yuv420p /mnt/sdcard/com.example.teste/video.mp4
What does it mean?
I solved my problem by using hints and files of @HiteshSondhi on Cross Compiling FFmpeg with x264 for Android.
Actually, I didn't compile the whole FFmpeg by myself. Instead, I used and configured the SampleFFmpegApp
he distributes at his GitHub page.
And the final hint: Test it in a real device. That's the only place I really could get it to work well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With