mortenjust / androidtool-mac

One-click screenshots, video recordings, app installation for iOS and Android
Apache License 2.0
5.43k stars 325 forks source link

Ultra large gif files #89

Open danielgomezrico opened 8 years ago

danielgomezrico commented 8 years ago

Hi Using:

Im trying with a 10 second recording the gif ends up with 73.3 MB and its unplayable.

mriddle commented 8 years ago

@danielgomezrico What's your terminal output? AndroidTool > Tools > Terminal Output or ⇧⌘O

Check the scale parameters being passed to ffmpeg. With the quality you've set a recording on an iPhone6+ an 11 second video is 5.3mb for me.

The gif conversion currently fails for me but should be resolved when #92 and #93 get merged. In the mean time you can convert your .mov to a .gif manually by running the following command

ffmpeg -i source.mov -r 16 -filter:v "setpts=0.5*PTS" -vf scale=iw*0.5:ih*0.5 source.gif

Where -r 16 -filter:v "setpts=0.5*PTS" doubles the playback speed and drops some of the frames Where scale=iw*0.5:ih*0.5 is half of the original source keeping aspect

mriddle commented 8 years ago

What device are you recording on? Perhaps it's the resolution of the .mov - the dimensions of mine were 1080 × 1920