2

I would like to separate audio and video from given input video file.I have build ffmpeg sos for Android using http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/ this link.

generated SOS

 libavcodec-56.so,libavfilter-5.so,libavformat-56.so,libavutil-54.so,libswscale-3.so 

ffmpeg command for separate video file(doesn't contain audio) from input video file

ffmpeg -i input.mkv -map 0:v -codec copy output.mkv 

I know the command which we have used in command prompt to get the desired output

I dont know how to call the ffmpeg command from Android Java Native method.and also dont know about write a JNI wrapper for this command.

0

1 Answer 1

1

Since you are doing the ffmpeg library porting to android, not the ffmpeg binary format. You need to reference the ffmpeg library documents to call APIs exported in the library instead invoking the ffmpeg command.

You could use system() or exec() Linux C api to call the command ffmpeg in JNI, but i don't think this is the way you are looking for.

The article link you posted already provide the examples, have you checked?

Sign up to request clarification or add additional context in comments.

5 Comments

please advice which type will provide better perfomance.ffmpeg binary format or ffmpeg library API.
the library api will have better performance since it doesn't have to create new process.
I am not clear about ffmpeg library API for separate audio/video. so I am going with ffmpeg binary executable. is any better tutorial for ffmpeg android binary
@Manoj the usage for android binary would be the same the usage in PC, if you cross-compile ffmpeg binary for android platform. So the best tutorial might be the manual in PC. man ffmpeg
These examples are not working and making errors also there's no proper guidance or help about these tutorials. Is there any step by step guide to use these in android studio gradle project ?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.