Code Monkey home page Code Monkey logo

carrierwave-video-thumbnailer's People

Contributors

argent-smith avatar artdevil avatar dkoropenko avatar otty avatar rilian avatar sadfuzzy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

carrierwave-video-thumbnailer's Issues

No such file or directory - ffmpegthumbnailer -i input_path -o output_path

hey,I have known about that if this error happend just because I haven't install ffmpegthumbnailer and to solve this problem just install this lib . But for some reason,I can't install this lib successfuly, such as the version of the server dosen't support this. In that case, how can I try this exception? bellow is what I did,but it dosen't work at all !

version :thumb do
  begin
    process thumbnail: [{format: 'png', quality: 10, size: 90, strip: true, logger:Rails.logger}]
    def full_filename for_file
      png_name for_file
    end
  rescue
    nil
  end
end

How to use the thumbnail in the view?

Hi, how do I use the generated thumbnail in the view? It doesn't seem to mandate the creation of a new column, so presumably it isn't an attribute of the file, no examples are provided either.

Errno::ENOENT (No such file or directory) in Heroku

Failed to upload thumb in dokku using rails 7 and ruby 3
gem 'carrierwave'
gem 'carrierwave-video-thumbnailer'
gem "mini_magick"

https://github.com/shunjikonishi/heroku-buildpack-ffmpeg
https://github.com/johnklawlor/heroku-buildpack-ffmpeg-thumbnailer
https://github.com/heroku/heroku-buildpack-ruby

Failed to thumbnail with ffmpegthumbnailer. Check ffmpegthumbnailer install and verify video is not corrupt. Original error: No such file or directory @ rb_file_s_rename -

app/vendor/ffmpegthumbnailer instead of this vendor/ffmpegthumbnailer its missing /app/ at the beginning;

Is there anyway to get this gem working for Windows <=10?

I'm currently having an issue where I receive the message below. I tried to install ffmpegthumbnailer using Ubuntu on Windows 10, but nothing seems to solve the issue, directly.

Running....ffmpegthumbnailer -i "C:/Users/CoderName/RubymineProjects/NewApp/tmp/1534794016-3832-0001-8958/thumb/video_test.mp4"

Errno::ENOENT: No such file or directory - ffmpegthumbnailer -i "C:/Users/CoderName/RubymineProjects/NewApp/tmp/1534794016-3832-0001-8958/thumb/video_test.mp4"

Unable to crop the thumbnail with a customized height and width how to do it

version :thumb do
# process :resize_to_fill => [1000, 400]
process thumbnail: [{format: 'png', quality: 10, size: 1000, strip: false, logger: Rails.logger}]
this is the code in video_uploader ,on uncommenting resize to fill gives undefined method error
Please tell how to customize my thumbnail to particular height and width using this gem.
Thanks
Etika

Change thumbnail Content type video/mp4 to image/png

HI,

When i upload a mp4 video, video and video thumbnail both content types are storing as video/mp4. how can i set vide content type to video/mp4 and thumbnail content type image/png.

Uploder.rb:

version :thumb do
    process thumbnail: [{format: 'png', quality: 10, size: 260, workaround: true, strip: true, logger: Rails.logger}]

    def full_filename for_file
      png_name for_file, version_name
    end
end

def png_name for_file, version_name
    %Q{#{version_name}_#{for_file.chomp(File.extname(for_file))}.png}
end

about size options

In document

size: thumbnail length in pixels (defaults to 128).


My question

Is it possible to keep original size?
For example the video may be 1920x1080,
Can I generate a thumbnail also the same size?(1920x1080)

Thanks

image rotated

Hello~

Dont know why the thumb is rotated.
I upload the video from my i phone.

thumb_video

Why is that?

Incorrect thumbnail mimetype after storing to s3

Hello,

Thumbnail has incorrect mimetype in case of fog storage. On s3 the picture has, for example, AVI type after all.
Everything works well if storage :file

Version 0.1.4
Rails 4.1
Ruby 2.1.0

Use ImageMagick processes

Is it possible to use ImageMagick processes like resize_to_limit or resize_to_fill from a created thumbnail? For example, I tried:

version :square_thumb do
process thumbnail: [{format: 'png', quality: 10, size: 105, strip: false, logger: Rails.logger}]
def full_filename for_file
png_name for_file, version_name
end
process resize_to_fill: [105, 105]
end

But I get the error "Wrong number of arguments (1 for 0)"

Error When running ffmpegthumbnailer

I have been working on building my video thumbnail but haven't been able to get it working. So I figured I would give your's a shot.

I keep receiving this error and not exactly able to narrow down the issue.

Running....ffmpegthumbnailer -i /uploads/tmp/20121101-0003-26086-5152/thumb_352.mp4 -o /uploads/tmp/20121101-0003-26086-5152/tmpfile.png -c png -q 10 -s 192 -f
Errno::ENOENT: No such file or directory - ffmpegthumbnailer -i /uploads/tmp/20121101-0003-26086-5152/thumb_352.mp4 -o /uploads/tmp/20121101-0003-26086-5152/tmpfile.png -c png -q 10 -s 192 -f

Recreate thumbnails and sending it to AWS

Thank you for your time for creating this gem and answering this question.
The question is i am trying to recreate version and send it AWS S3 i am getting
the following error

Video.first.url.recreate_versions!

Video Load (0.4ms) SELECT "videos".* FROM "videos" LIMIT 1
Aws::S3::Errors::NoSuchKey: The specified key does not exist.
from /home/webonise/.rvm/gems/ruby-1.9.3-p551/gems/aws-sdk-core-2.2.27/lib/seahorse/client/plugins/raise_response_errors.rb:15:in call' from /home/webonise/.rvm/gems/ruby-1.9.3-p551/gems/aws-sdk-core-2.2.27/lib/aws-sdk-core/plugins/s3_sse_cpk.rb:18:in call'
from /home/webonise/.rvm/gems/ruby-1.9.3-p551/gems/aws-sdk-core-2.2.27/lib/aws-sdk-core/plugins/param_converter.rb:20:in call' from /home/webonise/.rvm/gems/ruby-1.9.3-p551/gems/aws-sdk-core-2.2.27/lib/seahorse/client/plugins/response_target.rb:21:in call'
from /home/webonise/.rvm/gems/ruby-1.9.3-p551/gems/aws-sdk-core-2.2.27/lib/seahorse/client/request.rb:70:in send_request' from /home/webonise/.rvm/gems/ruby-1.9.3-p551/gems/aws-sdk-core-2.2.27/lib/seahorse/client/base.rb:207:in block (2 levels) in define_operation_methods'
from /home/webonise/.rvm/gems/ruby-1.9.3-p551/gems/aws-sdk-resources-2.2.27/lib/aws-sdk-resources/request.rb:24:in call' from /home/webonise/.rvm/gems/ruby-1.9.3-p551/gems/aws-sdk-resources-2.2.27/lib/aws-sdk-resources/operations.rb:41:in call'
from /home/webonise/.rvm/gems/ruby-1.9.3-p551/gems/aws-sdk-resources-2.2.27/lib/aws-sdk-resources/operation_methods.rb:19:in block in add_operation' from /home/webonise/.rvm/gems/ruby-1.9.3-p551/gems/carrierwave-aws-1.0.1/lib/carrierwave/storage/aws_file.rb:38:in read'
from /home/webonise/.rvm/gems/ruby-1.9.3-p551/gems/carrierwave-0.10.0/lib/carrierwave/uploader/cache.rb:77:in sanitized_file' from /home/webonise/.rvm/gems/ruby-1.9.3-p551/gems/carrierwave-0.10.0/lib/carrierwave/uploader/cache.rb:116:in cache!'
from /home/webonise/.rvm/gems/ruby-1.9.3-p551/gems/carrierwave-0.10.0/lib/carrierwave/uploader/versions.rb:226:in recreate_versions!' from (irb):6 from /home/webonise/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.16/lib/rails/commands/console.rb:47:in start'
from /home/webonise/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.16/lib/rails/commands/console.rb:8:in start' from /home/webonise/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.16/lib/rails/commands.rb:41:in <top (required)>'
from script/rails:6:in require' from script/rails:6:in

amazon s3 uploading with fog not working as expected

I tried to setup the gem with fog storage to amazon s3 but it does not seem to be working.
There are no errors, the png is uploaded to amazon but when i open it it is a 1 second black video.

When i change the storage to :file it is working fine.
I tried the command itself and it is outputting the png correctly.
I tried replacing current_path with a local directory and the thumbnail is showing up just fine.

Any advise on how to get the thumbnail to upload to amazon correctly?

http://f.cq.tl/T1Rb

Version 'from_version' doesn't work

version :small_thumb, from_version: :thumb do
process resize_to_fill: [20, 200]
end

it doesn't work with a current version carrierwave
it creates a video file instead of image

Errno::ENOENT: No such file or directory

When I try running the thumbnailer on my video, I get the error:

Errno::ENOENT: No such file or directory

Here are my logs:

Started POST "/videos" for 127.0.0.1 at 2013-09-27 15:52:34 -0400
Processing by VideosController#create as HTML
Parameters: {"utf8"=>"โœ“", "authenticity_token"=>"5lMoFtM5Rrdu4Ra8ut8rD3jYv3FJ0cxo38QW5ATw9ZQ=", "video"=>{"project_id"=>"4", "step_id"=>"22", "saved"=>"true", "embed_url"=>"", "video_path"=>#<ActionDispatch::Http::UploadedFile:0x007fc09b974420 @original_filename="2013-08-02 17.19.02.mp4", @content_type="video/mp4", @headers="Content-Disposition: form-data; name="video[video_path]"; filename="2013-08-02 17.19.02.mp4"\r\nContent-Type: video/mp4\r\n", @tempfile=#File:/var/folders/dc/c0nfvwy96lq7p4ll94mklnmr0000gp/T/RackMultipart20130927-20398-qyz4qz>}, "button"=>""}
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
Project Load (0.2ms) SELECT "projects".* FROM "projects" WHERE "projects"."id" = $1 LIMIT 1 [["id", "4"]]
Running....ffmpegthumbnailer -i /Users/.../Website/public/uploads/tmp/1380311554-20398-7589/thumb_2013-08-02_17.19.02.mp4 -o /Users/.../Website/public/uploads/tmp/1380311554-20398-7589/tmpfile.png -c png -q 10 -s 158 -f
Success!
Errno::ENOENT: No such file or directory - (/Users/.../Website/public/uploads/tmp/1380311554-20398-7589/tmpfile.png, /Users/.../Website/public/uploads/tmp/1380311554-20398-7589/thumb_2013-08-02_17.19.02.mp4)

This is what my uploader file looks like:

class VideoPathUploader < CarrierWave::Uploader::Base
include CarrierWave::Video
include CarrierWave::Video::Thumbnailer

process encode_video: [:mp4]

Choose what kind of storage to use for this uploader:

storage :fog

Override the directory where uploaded files will be stored.

This is a sensible default for uploaders that are meant to be mounted:

def store_dir
"#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end

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

def png_name for_file, version_name
%Q{#{version_name}_#{for_file.chomp(File.extname(for_file))}.png}
end

end

Not adhering to seek option

Hey there,

I am processing video thumbnails using this:

process thumbnail: [{format: 'jpg', quality: 10, size: 175, seek: '50%', square: true, logger: Rails.logger}]

For some reason unknown to me, it is not adhering to the seek. Any chance for some assistance?

I'm trying to create a thumbnail 3 seconds into a mp4 video I've transcoded.

Running....ffmpegthumbnailer -c jpg -q 10 -s 175 -t 00:00:03.0 -a -i /<FILEPATH>/thumb_20160816182847.MP4 -o /<FILEPATH>/tmpfile.jpg

The thumbnail is still showing second 0...what am I doing incorrectly?

The command is successful.

Error while loading shared libraries libjpeg.so.62

I am having issues running the thumbnailer on Heroku. Everything seems to work fine locally.

The error I receive is:

ffmpegthumbnailer: error while loading shared libraries: libjpeg.so.62: cannot open shared object file: NO such file or directory
Errno::ENOENT: No such file or directory @ sys_fail2 - (/app/public/uploads/tmp/1441312607-10-0856/tmpfile.png, /app/public/uploads/tmp/1441312607-10-0856/thumb_2015-06-02_17.43.37.mp4)

Any idea what might be causing this?

*Note: This happened after upgrading to cedar-14; the thumbnailer worked fine on cedar-10

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.