简体   繁体   中英

Compress video by using FFMPEG

I tried Call C/C++ function in C/C++ file in java file and okay.

But I don't know how I can transfer the query string in below to C/C++ function` for compressing video :

ffmpeg -y -i /sdcard/videokit/in.mp4 -strict experimental -s 160x120 -r 25 -aspect 3:4 -vcodec mpeg4 -b 2097152 -ab 48000 -ac 2 -ar 22050 /sdcard/videokit/out.mp4

exactly.

What I want is I can compress the video using ffmpeg . (I think we will call via C function in C file)

p/s : I read many topics, many people get this issue, but no answer is satisfied.

People who know this,

Please help me,

Thanks,

This command converts to dozens of API calls in ffmpeg. So see what option sets what, you must read the ffmpeg.c file. Another option is to use ffmpeg.c, rename main() to something else, compile it into your program, then you can call it with a string.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM