Comments (2)
There is currently not a method for doing this in this gem.
It shouldn't be too hard to implement for normal streamio transcoding if you wanted to pass a block as an option to :encode_video
Here is how you pass the block: https://github.com/streamio/streamio-ffmpeg#transcoding
You would add it to the options and if it's set, execute it here: https://github.com/rheaton/carrierwave-video/blob/master/lib/carrierwave/video.rb#L57
Here's an example of how it might look in the end:
class VideoUploader < CarrierWave::Uploader::Base
include CarrierWave::Video
process encode_video: [:mp4, { progress_block: Proc.new {|progress| puts progress} } ]
end
If you wanted it to send a method to the object with the uploader, you'd have to check that the scope worked out. That might look like this:
class VideoUploader < CarrierWave::Uploader::Base
include CarrierWave::Video
process encode_video: [:mp4, { callbacks: { progress: :progress_method } ]
end
I can't remember if the ffmpeg2theora binary gives any progress as I'm not actively developing this anymore.
Feel free to create a pull request for this!
from carrierwave-video.
This pull request solves the issue: #8
Please check readme and PR for use.
Thanks!
from carrierwave-video.
Related Issues (20)
- S3 support
- Why is there a default resolution?! HOT 3
- Rename gem? HOT 1
- Transcoding passes but video not uploaded (rollback transaction) HOT 3
- after_transcoding callback called too soon
- Resize to Pad (Adding of Black Bars around Videos)
- scaling not work HOT 1
- Compatibility with streamio-ffmpeg 2.1.0 HOT 4
- Failed to transcode with FFmpeg HOT 10
- Aspect ratio distorted with newer Samsung Galaxy videos
- Failed to transcode with FFmpeg HOT 1
- set uploaded video length limit HOT 1
- How do you configure the encoder to include audio?
- Are video files being saved at a later time frame than the initial commit?
- video files are not processing on commit
- I don't need encode video to size 1920x1080 if source size 1280x720. How to solve?
- store multiple quality HOT 1
- No such filter: '"movie'
- percentage progress HOT 1
- Successfully converted file is not moved from cache to the actual storage directory.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carrierwave-video.