Black screen when trying to play video
Closed this issue · 1 comments
DenaG commented
When I try to upload videos it posts as a black screen with a play button that does not work. See
below. I added 'Paperclip.options[:command_path] = "/usr/local/bin" into my config.development folder and the 'paperclip-ffmpeg' gem has been included as well. Any ideas? I have been working on this for awhile. I have a post on stackoverflow as well however, I have had no feedback. Thanks any help is greatly appreciated.
Post Model
class Post < ActiveRecord::Base
belongs_to :user
has_attached_file :image, :styles => { :medium => "300x300>", :thumb => "100x100>" }
has_attached_file :video, :styles => {
:medium => { :geometry => "300x300", :format => 'flv' },
:thumb => { :geometry => "100x100#", :format => 'jpg', :time => 10 }
}, :processors => [:ffmpeg]
has_attached_file :video, :styles => {
:mobile => {:geometry => "400x300", :format => 'mp4', :streaming => true}
}, :processors => [:ffmpeg, :qtfaststart]
validates_attachment_content_type :image, :content_type => ["video/mp4", "video.MOV", "video/flv", "image/jpg", "image/jpeg", "image/png", "image/gif"]
validates :description, presence: true
validates :image, presence: false
validates :video, presence: false
end
Migration
class AddAttachmentImageToPosts < ActiveRecord::Migration
def self.up
change_table :posts do |t|
t.attachment :image
t.attachment :video
end
end
def self.down
drop_attached_file :posts, :image, :video
end
end
def change
create_table :videos do |t|
t.string :video_file_name
t.string :video_content_type
t.integer :video_file_size
t.datetime :video_updated_at
t.timestamps
end
end
owahab commented
This project has been deprecated in favor of paperclip-av-transcoder.