Coder Social home page Coder Social logo

Comments (18)

gupta-vikash avatar gupta-vikash commented on June 12, 2024 6

Hello All,
I was facing the same problem.
and i found one solution.

add following before output
-c:v libx264 -preset ultrafast

it will help to decrease processing time.

from ffmpeg-android-java.

anilpthummar avatar anilpthummar commented on June 12, 2024 4

Hello All,
I was facing the same problem.
and my video is 12 second and it will take long time to compress ,
i need it will complete within 12-15 second .

i am using below command with video size 45mb and 12 second.

"ffmpeg -y -i /sdcard/videokit/input.mp4 -s 320x240 -r 20 -c:v libx264 -preset ultrafast -c:a copy -me_method zero -tune fastdecode -tune zerolatency -strict -2 -b:v 1000k -pix_fmt yuv420p /sdcard/videokit/123out.mp4";

Please help me to complete this compressor in 12-15 second.

from ffmpeg-android-java.

amna-mirza avatar amna-mirza commented on June 12, 2024 2

This command make video processing really fast
-c:v libx264 -preset ultrafast
I am working on slowing video playback.

from ffmpeg-android-java.

Vijayadhas avatar Vijayadhas commented on June 12, 2024 1

Hi.. I am using

-y -i /sdcard/videokit/in.mp4 -strict experimental -vcodec libx264 -preset ultrafast -crf 24 -acodec aac -ar 44100 -ac 2 -b 36000k -s 1280x720 -aspect 16:9 -metadata:s:v:0 rotate=0 /sdcard/videokit/out3.mp4
command. It reduce the compression time little.

from ffmpeg-android-java.

lakkad-amish avatar lakkad-amish commented on June 12, 2024 1

anyone please help me to solve the issue.

Unable to find a suitable output format for 'ffmpeg' ffmpeg: Invalid argument

tried many ways and also change commands but still the same issue

"ffmpeg -y -i "+path+" -s 320x240 -r 20 -c:v libx264 -preset ultrafast -c:a copy -me_method zero -tune fastdecode -tune zerolatency -strict -2 -b:v 1000k -pix_fmt yuv420p "+outputFilePath;

input and output format is mp4.i want to compress the video

from ffmpeg-android-java.

vikrammittal avatar vikrammittal commented on June 12, 2024 1

try this

ffmpeg -i /storage/emulated/0/Movies/Instagram/VID_219920217_214928_732.mp4 -vf scale=-1:480.0 -threads 16 -c:v libx264 -maxrate 1984k -bufsize 3968k -ac 2 -vf format=yuv420p -g 60 -c:a aac -b:a 128k -ar 44100 -movflags +faststart -profile:v baseline -level 3.1 -crf 28 -preset ultrafast -strict -2 /storage/emulated/0/Android/data/com.staze/cache/1514433292621.mp4

Working fine for me using
compile 'com.writingminds:FFmpegAndroid:0.3.2'

from ffmpeg-android-java.

joshuamzm avatar joshuamzm commented on June 12, 2024

I ran into same issue here. I suspect making up a service may help since main thread is in charge of UI drawing, etc.

It's only a guess, in fact I'll try this option and then share my discoveries.

from ffmpeg-android-java.

gupta-vikash avatar gupta-vikash commented on June 12, 2024

* Overlaying two videos of around max 15 seconds**
I am also facing same issue. Even for a 5 second video the processing time is around 1 minute.
We are using service with a handlerthread, but still we are facing the issue.
Please Help.

from ffmpeg-android-java.

mateusgrb avatar mateusgrb commented on June 12, 2024

Also noticed that, conversion is very slow. Fortunately "-preset ultrafast" helped a lot.

from ffmpeg-android-java.

sanjaysiliconithub avatar sanjaysiliconithub commented on June 12, 2024

Hi
I have used below command but right now its display '-preset' Unrecognized option.
-y -i /sdcard/videokit/in.mp4 -strict experimental -vcodec libx264 -preset ultrafast -crf 24 -acodec aac -ar 44100 -ac 2 -b 36000k -s 1280x720 -aspect 16:9 -metadata:s:v : 0 rotate=0 /sdcard/videokit/out3.mp4

from ffmpeg-android-java.

rt1909 avatar rt1909 commented on June 12, 2024

Hi,
I too had the same issue with "-preset ultrafast" command. Here is the error from log:

Reading option '-preset' ...Unrecognized option 'preset'.
Error splitting the argument list: Option not found
ffmpeg4android: ffmpeg_parse_options not passed
exit_program: 1

from ffmpeg-android-java.

sanjaysiliconithub avatar sanjaysiliconithub commented on June 12, 2024

Hi rt1909
i think in android library there are "-preset ultrafast " not supported if you found than please replay hear.

from ffmpeg-android-java.

rt1909 avatar rt1909 commented on June 12, 2024

Hi Sanjay,

I have checked it. In the blog post they mentioned about using the "-preset
ultrafast" in combination with mpeg4 codec. But it seems it works only with
libx264.

On Thu, Jul 28, 2016 at 12:49 PM, Sanjay Bhalani [email protected]
wrote:

Hi rt1909
i think in android library there are "-preset ultrafast " not supported
if you found than please replay hear.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#54 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATeQKl0yAV5dTveyIav9K4I3tyZrpHOgks5qaFgHgaJpZM4Gmb_F
.

from ffmpeg-android-java.

sanjaysiliconithub avatar sanjaysiliconithub commented on June 12, 2024

Hi rt1909
Yes but in my case it's seem to taken to much time for compressed video also decries video quality. Below command is working fine with same quality, but it's also take 30 to 50 second for compressing any video.

"ffmpeg -y -i in.mp4 -strict experimental -r 30 -ab 48000 -ac 2 -ar 48000 -vcodec mpeg4 -b 2097152 out.mp4"

from ffmpeg-android-java.

mwshubham avatar mwshubham commented on June 12, 2024

What is -b:v stands for if bitrate how setting -b:v 1000k decrease the process time

from ffmpeg-android-java.

Nasib555 avatar Nasib555 commented on June 12, 2024

What is -b:v stands for if bitrate how setting -b:v 1000k decrease the process time

-b:v means you want to alter bitrate of the video stream. -v:b 1000k means that in the output video, the bitrate of video stream will be 1000 bps. It should decrease processing time becuase the bitrate is low.

from ffmpeg-android-java.

mehrdadhosseinzadeh avatar mehrdadhosseinzadeh commented on June 12, 2024

/usr/bin/ffmpeg -y -i /var/www/vod/storage/app/public/temp/GIbSMv9DcueO2maksuvZ6ZeWvGcSiDI4RMtn4qzB.mp4 -map 0 -flags -global_header -f segment -segment_format mpeg_ts -segment_list /var/www/vod/storage/app/public/movies/lopl//nonenc/l69enpRRLtbJuO3wBSbM_1500.m3u8 -segment_time 6 -threads 12 -vcodec libx264 -acodec aac -b:v 1500k -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -pass 1 -passlogfile /tmp/ffmpeg-passes5f73880a9868fmowmp/pass-5f73880a9881a /var/www/vod/storage/app/public/movies/lopl//nonenc/l69enpRRLtbJuO3wBSbM_1500_%05d.ts

this is my command

but very slow!!
i am using php and laravel-ffmpeg

i change thread from 12 to 16 but not effective!

this command use very cpu but not effective
ram is very low usage
please help me

from ffmpeg-android-java.

sahileducateapp avatar sahileducateapp commented on June 12, 2024

Did anyone got the command which is fast for video compression in android. i have been trying to reduce the compression time but nothing seems to be working. if anyone have the way please reply

from ffmpeg-android-java.

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.