Giter Club home page Giter Club logo

Comments (8)

madhavanmalolan avatar madhavanmalolan commented on July 23, 2024

I am not able to reproduce this. Can you please tell me the values of MediaUtils.getBitrateFromVideoResolution(context, path)
SystemUtils.getNumberOfCores()

And possibly the video you are actually trying to compress?

Do you see any error message in logcat?

from ffmpegandroidlibrary.

FranciscoNin avatar FranciscoNin commented on July 23, 2024

Thanks for the quick response!

The bitrate used is 1M and the number of cores is 2.

The video I tested:
test_compress.mp4.zip

I don't see any error messages in the logcat

from ffmpegandroidlibrary.

HardikChauhanSA avatar HardikChauhanSA commented on July 23, 2024

@madhavanmalolan : Getting the same issue, I started the video compressing but nothing is happening.

The video was about 3.5mb.
This is the command i used,

val complexCommand = arrayOf<String>("-y", "-i", filePath!!, "-strict", "experimental", "-vcodec", "libx264", "-preset", "ultrafast", "-crf", "24", "-acodec", "aac", "-ar", "44100", "-ac", "2", "-b:a", "96k", "-s", "320x240", "-aspect", "4:3", outputFile)

Controller.getInstance().run(complexCommand)

Its working with your command in exmaple.

Can you please check or guide me through the command of compression of the video?

from ffmpegandroidlibrary.

madhavanmalolan avatar madhavanmalolan commented on July 23, 2024

Have either of you @FranciscoNin @HardikChauhanSA found a solution to this?
I have not been able to debug this issue 😞

from ffmpegandroidlibrary.

Anbuselvankt avatar Anbuselvankt commented on July 23, 2024

I used to compress the video process with the below comments, it works for up to Nougat 7.0 (API level 24), Latest Android versions stopped working. (Versions are
Oreo | 8.1.0 | API level 27
Oreo | 8.0.0 | API level 26
Nougat | 7.1 | API level 25 )

Package Name: Xamarin.Android.FFmpeg
Version: 1.0.32

string[] cmds = new string[] {
"-y",
"-i",
inputFilepath,
"-strict", "experimental",
"-vcodec", "libx264",
"-preset", "ultrafast",
"-crf","30", "-acodec","aac", "-ar", "44100" ,
"-q:v", "20",
"-vf",
"mp=eq2=1:1.68:0.3:1.25:1:0.96:1",
ouputFile,
};

string cmdParams = string.Join(" ", cmds);

FFMpeg.Xamarin.FFMpegLibrary.Run(Xamarin.Forms.Forms.Context, cmdParams, loggerAction);

Can you please help me on this issue?

from ffmpegandroidlibrary.

FranciscoNin avatar FranciscoNin commented on July 23, 2024

@madhavanmalolan I gave up and used the ffmpeg4android library, but even by tweaking every possible command combination I wasn't able to compress in less than 30 seconds for a 3 seconds video.
What I made was to make my own camera in app so I would record only videos in a lower resolution with a max size of 22mb (in a 1min video), so I wouldn't need to compress it before sending to the server.

from ffmpegandroidlibrary.

khetiyachintan avatar khetiyachintan commented on July 23, 2024

@FranciscoNin Having the same issue. Thanks for the sharing your notes. Is your custom camera support to latest Android OS 9.0 Pie? Do you have sample code on GitHub as open source? can you share me that link that would be helpful?

from ffmpegandroidlibrary.

FranciscoNin avatar FranciscoNin commented on July 23, 2024

@khetiyachintan sure, I did that recently on an issue from the ffmpeg library for Android.
There I explained what I tried to achieve with that library and what I ended up doing with a custom camera view.

Here:
WritingMinds/ffmpeg-android-java#265 (comment)

Hope it helps. If there's anything else I can do to help, please let me know.

Cheers

from ffmpegandroidlibrary.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.