Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scaling not work #43

Open
alimusavi67 opened this issue Jun 12, 2016 · 1 comment
Open

scaling not work #43

alimusavi67 opened this issue Jun 12, 2016 · 1 comment

Comments

@alimusavi67
Copy link

alimusavi67 commented Jun 12, 2016

hi
i am using this gem for my video process and i want to scale my video to different size, but the output not change and all my version have same video size and resolution
this is my code:
`class MediaUploader < CarrierWave::Uploader::Base

encoding: utf-8

include CarrierWave::Video  # for your video processing
include CarrierWave::Video::Thumbnailer
include ::CarrierWave::Backgrounder::Delay
include CarrierWave::MimeTypes
require 'rubygems'
require 'streamio-ffmpeg'


process encode_video: [:mp4, audio_codec: "aac", custom: "-strict experimental -q:v 5 -preset slow -g 30 -movflags faststart",
  callbacks: { after_transcode: :set_success } ], :if => :video?

version :thumb do
  process thumbnail: [{format: 'png', quality: 10, size: 710, logger: Rails.logger}]
  def full_filename for_file
    png_name for_file, version_name
  end
end

version :mp4 do
  process encode_video: [:mp4, audio_codec: "aac", custom: "-strict experimental -q:v 5 -preset slow -g 30 -movflags faststart",
    callbacks: { after_transcode: :set_success } ], :if => :video?
  def full_filename for_file
    mp4_name for_file, version_name
  end
end
version :mid_mp4 do
  process encode_video: [:mp4, audio_codec: "aac", custom: "-vf scale=-1:360 -strict experimental -q:v 5 -preset slow -g 30 -movflags faststart",
    callbacks: { after_transcode: :set_success } ], :if => :video?
  def full_filename for_file
    mp4_name_mid for_file, version_name
  end
end`
@alimusavi67
Copy link
Author

i already try ```
resolution: "640x360"
version :mp4 do
process encode_video: [:mp4, resolution: "640x360"
def full_filename for_file
mp4_name for_file, version_name
end
end

and of curse not worked. 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant