evrone / carrierwave-video-thumbnailer Goto Github PK
View Code? Open in Web Editor NEWA thumbnailer plugin for Carrierwave that makes easy thumbnailing of your uploaded videos
Home Page: https://evrone.com
License: MIT License
A thumbnailer plugin for Carrierwave that makes easy thumbnailing of your uploaded videos
Home Page: https://evrone.com
License: MIT License
When i am generate thumbnail by using carrier wave thumbnailer, the image generating with left and right film stripe how can i remove this stripes.
note: check
https://rewind-prod.s3.amazonaws.com/uploads/video/video_file/103/thumb_1376337953.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
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.
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)"
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
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.
When I try to use the url for the video inside of the show action, it tells me that no location is provided. What is the default URL for the thumb extension? **<%= image_tag(@post.post_video_url(:thumb) %>**
doesn't work
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"
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
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
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]
storage :fog
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
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
Is there any way to recreate the thumbnail for a video with new parameters without having to upload the video again?
size: thumbnail length in pixels (defaults to 128).
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
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?
I am using carrierwave video thumbnailer for making thumbnail of videos. It is working fot .flv files very well. But not working for .swf, .avi, .mpeg, .mp4 files??
If you take a video from an iPad, and the camera is on the left side, the thumbnail appears upside down.
If the camera is on the right side, it works as intended.
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
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
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
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;
Not exactly an issue with this gem, but I decided it makes sense to mention it here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.