{"action":"opened","issue":{"url":"https://api.github.com/repos/ruby-av/paperclip-av-transcoder/issues/31","labels_url":"https://api.github.com/repos/ruby-av/paperclip-av-transcoder/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/ruby-av/paperclip-av-transcoder/issues/31/comments","events_url":"https://api.github.com/repos/ruby-av/paperclip-av-transcoder/issues/31/events","html_url":"https://github.com/ruby-av/paperclip-av-transcoder/issues/31","id":103348732,"number":31,"title":"Video Skewed (does not maintain aspect ratio)","user":{"login":"zreitano","id":3478061,"avatar_url":"https://avatars.githubusercontent.com/u/3478061?v=3","gravatar_id":"","url":"https://api.github.com/users/zreitano","html_url":"https://github.com/zreitano","followers_url":"https://api.github.com/users/zreitano/followers","following_url":"https://api.github.com/users/zreitano/following{/other_user}","gists_url":"https://api.github.com/users/zreitano/gists{/gist_id}","starred_url":"https://api.github.com/users/zreitano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zreitano/subscriptions","organizations_url":"https://api.github.com/users/zreitano/orgs","repos_url":"https://api.github.com/users/zreitano/repos","events_url":"https://api.github.com/users/zreitano/events{/privacy}","received_events_url":"https://api.github.com/users/zreitano/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-26T19:40:28Z","updated_at":"2015-08-26T19:40:28Z","closed_at":null,"body":"The video uploaded does not maintain aspect ratio. In the readme it says, \" '!' - Keep the same aspect of the image/video, but with the passed dimesion.\" \r\n\r\nMy goal is to be able to be able to have the video returned in a square (while maintaining the aspect ratio). Cropping from the center would be ideal, as well. \r\n\r\nAny help would be greatly appreciated. I included my code below. \r\n\r\nHere is a link to a **skewed** 500x500! video of my puppy: \r\nhttp://s3.amazonaws.com/pivotdevelopment/posts/videos/102/square.mp4?1440617576\r\n\r\nHere is the **non-skewed** version for comparison:\r\nhttp://s3.amazonaws.com/pivotdevelopment/posts/videos/103/square.mp4?1440617933\r\n\r\n```\r\nclass Video < Post\r\n\r\n  Paperclip.interpolates :id do |attachment, style|\r\n    attachment.instance.id\r\n  end\r\n\r\n  #basename/extension is paperclip interpolation from attachment, can write own interpolations as needed\r\n\r\n  # have to link /usr/local/bin to the linuxbrew version of ffmpeg\r\n  has_attached_file :video,  path: \"/posts/videos/:id/:style.:extension\",\r\n  :styles => {\r\n    :square => {:geometry => \"500x500!\", :format => 'mp4', :streaming => true }\r\n  },\r\n  :processors => [:transcoder]\r\n\r\n  validates_attachment :video, :presence => true,\r\n                               :content_type => { content_type: [\"video/mp4\", \"video/mov\", \"video/mpeg\",\"video/mpeg4\", \"video/quicktime\"] }\r\n\r\n  def video_url\r\n    video = self.video\r\n    if video.present?\r\n      return video.url(:square)\r\n    end\r\n  end\r\n\r\nend\r\n```"}}