简体   繁体   中英

Remuxing mp4 and change resolution with ffmpeg programmatically

I have a remuxing.c example working from ffmpeg but I need to change resolution to minimize file size, anybody can explain me how to do that? Or if there is another way to "compress" mp4 files without command line? I'm a begginer with FFmpeg and need to send video files from android to server, and I'm deploying a NDK library to make this job because FFmpeg command-line implementation have some limitations and is very slow.

Thanks

You should take a look at the filtering video and the transcoding examples. The first one goes through how you add "filters" in ffmpeg. It includes a scaling filter, which will rescale the video to a given resolution. Transcoding includes some filtering, and you can actually change the filter_spec string to be whatever you want, and the program should scale your input video.

This is probably not the best solution, I just found it myself, but it at least introduces you to the components being used.

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