i have list of video files in my sdcard.when i click the selected video in gridview,i want to compress the selected video file in android.How to compress a video file in android.is there any sample code availavble?
I think the best solution for video compression is using ffmpeg library.
Here you can find a sample android app that used that library:
https://github.com/umeshbsa/ffmpeg-video-compresion-with-progress-android
another lovely library is silicompressor you can find that here:
https://github.com/Tourenathan-G5organisation/SiliCompressor
Video Compression can be done by MediaCodec (From JB) and FFMPEG. Please refer documents of FFMPEG for more information on compression.
Refer:
ffmpeg: compress video?
https://www.virag.si/2012/01/web-video-encoding-tutorial-with-ffmpeg-0-9/
Related
Iam trying to upload video and audio files from my app on android to backend using api.
But before sending want to compress them to reduce size, how can we make it?
Thanks
Yes, you can . You can use ffmpeg library for that . For more info visit ffmpeg
Please can anyone tell me the usages of ffmpeg file in android. Though I tried to browse but none of them satisfied me.
FFMPEG is library,it will used to decode and encode audio,video file , if you are streaming a video from your android application it will be used.
Is it possible to convert the format of the media source when playing a video with exoplayer? I thought that I could use FFMPEG to convert the format, but I do not really know how exoplayer works and the problem is that the media source is not a file, but a stream. It is avi format, which unfortunately is not supported by exoplayer, and I could not find any working player for android that has avi support.
I see there is a ffmpeg extension for exoplayer, but I do not know if that will solve my problem and I have no idea about NDK and compiling c++ for android and the instructions are very unclear. If someone could explain how to do it or give me a guide that would be nice. This is the link to the exoplayer extension:
ffmpeg extension
I want to Create video using Image and mp3 or m4a file.
I try to use ffmpeg library but that library still not working for me.
I’m also try to use Media-codec and MediaMuxer.
if you have any new library or code then please suggest me.
Thanks in advance.
HI all,
I am working on playing audio from URI using ffmpeg shared library in android.
I configured android-ndk and added ffmpeg shared library to project and able to compile the project using cygwin.
In ffmpeg library i see ffmpeg.c file, i donot know how i can use this file to implement audio player in my activity.
Please help me on this issue.
Thank you in advance
First, Use ffmpeg to open the URI and read frames and decode to raw PCM data, you can take a look at ffplay.c about the decoding part.
Next, using the Android AudioTrack class to play the raw PCM data, there is a tutorial: fun with audiotrack
Good luck!