FFMPEG build not able to recognize image file on Android - android

I am trying to convert a series of images to video on Android. I have successfully built Guardian Project. Now when I try to run this command
/data/data/com.mobvcasting.mjpegffmpeg/ffmpeg -r 4 -i /mnt/sdcard/RAS/img/file%03d.bmp -r /mnt/sdcard/RAS/img/demoFile.mp4"
i get an error saying
10-02 05:48:35.247: V/PROJECT_NAME(13972): ***/mnt/sdcard/RAS/img/file%03d.bmp: No such file or directory***
I have images at /mnt/sdcard/RAS/img/ directory starting from file000.bmp.
I even tried changing my command to
/data/data/com.mobvcasting.mjpegffmpeg/ffmpeg -r 4 -i /mnt/sdcard/RAS/img/file000.bmp -r /mnt/sdcard/RAS/img/demoFile.mp4"
to get the same error again.
Also, it is able to recognize /mnt/sdcard/RAS/img/ as a directory.
What can I change to get rid of the error message?
Thanks!

Related

Termux command. Command is wrong or not working

Trying to change metadata for Opus files using termux on android. Tried to change title here but may be command is wrong. Please guide me
ffmpeg -i audio name.opus -metadata title= "test" -c copy audio name.opus
Result:
[NULL # 0x787d23a500] Unable to find a suitable output format for 'test'
test: Invalid argument
Tried to look for some apps or editing tools but found nothing for opus on Android. My format is Opus. Expected that the command will be successful but it didn't work.

FFmpeg sdl output in android

I try to execute the next command
-i $inputFilePath -filter_complex \"realtime,scale=iw/2:-1,negate,format=yuv420p\" -f sdl2 -
with mobile-ffmpeg on android and get the next error
mobile-ffmpeg: [sdl,sdl2 # 0xbf1d9600] Unable to initialize SDL: Application didn't initialize properly, did you include SDL_main.h in the file containing your main() function?
As far as I understand I need to create SDL_Activity or something similar to display video, am I right? Please explain if I'm wrong otherwise help me.

7za execute via terminal emulator android

Im going to use 7za library
now i try to use 7za to extract files and add files from 7z
My problem is that every time i execute nothing happen
Here is my 7z.sh code
and also i set permission and its on /data/local/d
#!/system/bin/sh
export LD_PRELOAD=
umask 000
cd "$1"
shift
/data/local/d/7za "$#"
and in terminal i execute using
su
cd /data/local/d/
sh 7z.sh x -tzip d.zip
And i getting error
Incorrect command line and x : no such file directory
Help me thanks for solution

Image overlay fails using FFMPEG4Android

I am trying to watermark a video using FFMPEG4Android.
I am using the app on the android market from here.
The command used is
ffmpeg -i /sdcard/videokit/in.mp4 -i /sdcard/videokit/logos/1.png -i
/sdcard/videokit/logos/2.png -i /logos/3.png -filter_complex
"[0:v][1:v]
overlay=main_w-overlay_w-10:main_h-overlay_h-10:enable='between(t,0,1)'
[tmp]; [tmp][2:v]
overlay=main_w-overlay_w-10:main_h-overlay_h-10:enable='between(t,2,3)'
[tmp2]; [tmp2][3:v]
overlay=main_w-overlay_w-10:main_h-overlay_h-10:enable='between(t,4,5)'"
/sdcard/videokit/output.mp4
But everytime I run the command the app fails
Opening an output file:
overlay=main_w-overlay_w-10:main_h-overlay_h-10:enable='between(t,0,1)'.
No such filter: '' Error configuring filters. exit_program: 1
Can I get any help for the same?
You need to use complex command, check the ffmpeg4android blog for examples

Running apktool in a bash script

I am trying to write a bash script that decompiles several .apk files using apktool. Each apk file is located in a subdirectory of the sample folder.
#!bin/bash
for item in $(ls samples);
do
for apk in $(ls "samples/$item");
do
echo ./apktool/apktool d "./samples/$item$apk"
$(./apktool/apktool d "./samples/$item$apk")
done
done
When I run the script I get the following output:
./apktool/apktool d ./samples/ADRD/53dc.apk*
Input file (./samples/ADRD/53dc.apk*) was not found or was not readable.
The input file error message is the standard for when apktool cannot find a file. However, if I run the following command in the terminal the apktool will work correctly.
./apktool/apktool d ./samples/ADRD/53dc.apk*
I have changed the permissions of all the files located in the samples folder to rw for all users. I also have tried using sudo with the shell script, but this causes the script to hang. However, when I use sudo with the apktool in the command line it also hangs. Therefore, I am not sure if using sudo with apktool is doable.
Any help is appreciated, thanks.
So it looks like this ls gives you an output with an asterisk * appended at the end of the apk filename, because the file is executable.
for apk in $(ls "samples/$item");
This is not the default behaviour of ls, you are getting this probably because you have aliased ls to ls -F or similar. To bypass the alias, rewrite the line this way:
for apk in $(\ls "samples/$item");
Notice the \ I added there.
BTW, is it normal that an apk file is executable? Perhaps you can remove the executable bit:
find samples -name '*.apk' -exec chmod -x {} \;
Also, possibly your script can be replaced with this one liner:
find samples -name '*.apk' -exec ./apktool/apktool d {} \;
Mind you, this is not exactly the same thing, because it may go deeper than two directories. If you need to limit the depth, that's possible too, see man find

Categories

Resources