
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (111)
-
MediaSPIP Player : les contrôles
26 mai 2010, parLes contrôles à la souris du lecteur
En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...) -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (14901)
-
Exit Status with ffmpeg Command in Rails
25 novembre 2012, par DragonFire353I am trying to get uploaded videos to be converted in the background, running windows. I am using :
gem 'paperclip'
gem 'aasm'
gem 'delayed_job_active_record'
gem 'ffmpeg'I was using purely paperclip before and making the user wait and it worked great, now I am having problems with the return of the error status for the command, I have tried editing to possible fix the command wondering if it was failing in the first place but I keep getting :
undefined method `exitstatus' for nil:NilClass
no matter what. I've tried looking this up and it's supposedly valid syntax that should work... Also I've commented out the actual spawn do part because I get another error if I leave that in :
wrong number of arguments
Does anyone know how to properly get this working ? I've went through a few tutorials that have bits and pieces of what I need but I can't get them working together. Here's what I have so far, lemme know if you need more :
Model :
class Video < ActiveRecord::Base
include AASM
belongs_to :user
has_many :comments, dependent: :destroy
attr_accessible :video, :user_id, :video_file_name, :title, :public, :description, :views
has_attached_file :video, url: "/users/:user_id/videos/:id/:basename_:style.:extension"
#, :styles => {
# :video => { geometry: "800x480>", format: 'webm' },
# :thumb => { geometry: "200x200>", format: 'png', time: 3 },
# }, processors: [:ffmpeg], url: "/users/:user_id/videos/:id/:basename_:style.:extension"
#process_in_background :video #causes death
validates :video, presence: true
validates :description, presence: true, length: { minimum: 5, maximum: 100}
validates :title, presence: true, length: { minimum: 1, maximum: 15 }
validates_attachment_size :video, less_than: 1.gigabytes
validates_attachment :video, presence: true
default_scope order: 'created_at DESC'
Paperclip.interpolates :user_id do |attachment, style|attachment.instance.user_id
end
#acts as state machine plugin
aasm state: :pending do
state :pending, initial: true
state :converting
state :converted
#, enter: :set_new_filename
state :error
event :convert do
transitions from: :pending, to: :converting
end
event :converted do
transitions from: :converting, to: :converted
end
event :failure do
transitions from: :converting, to: :error
end
end
# This method is called from the controller and takes care of the converting
def convert
self.convert!
#spawn a new thread to handle conversion
#spawn do
success = delay.system(convert_command)
logger.debug 'Converting File: ' + success.to_s
if success && $?.exitstatus.to_i == 0
self.converted!
else
self.failure!
end
#end
end
def self.search(search)
if search
find(:all, conditions: ["public = 't' AND title LIKE ?", "%#{search}%"], order: "created_at DESC")
else
find(:all, conditions: ["public = 't'"], order: "created_at DESC")
end
end
def self.admin_search(search)
if search
find(:all, conditions: ['title LIKE ?', "%#{search}%"], order: "created_at DESC")
else
find(:all, order: "created_at DESC")
end
end
private
def convert_command
#construct new file extension
webm = "." + id.to_s + ".webm"
#build the command to execute ffmpeg
command = <<-end_command
ffmpeg -i #{ RAILS_ROOT + '/public/users/:user_id/videos/:id/:basename_:style.:extension' } -ar 22050 -ab 32 -s 1280x720 -vcodec webm -r 25 -qscale 8 -f webm -y #{ RAILS_ROOT + '/public/users/:user_id/videos/:id/:basename_.webm' }
end_command
logger.debug "Converting video...command: " + command
command
end
handle_asynchronously :convert_command
# This updates the stored filename with the new flash video file
def set_new_filename
#update_attribute(:filename, "#{filename}.#{id}.webm")
update_attribute(:content_type, "video/x-webm")
end
endController :
class VideosController < ApplicationController
before_filter :signed_in_user, only: [:upload, :update, :destroy]
before_filter :admin_user, only: :admin_index
def upload
@video = Video.new
# generate a unique id for the upload
@uuid = (0..29).to_a.map {|x| rand(10)}
end
def create
@video = Video.new(params[:video])
@video.user_id = current_user.id
if @video.save
@video.convert
flash[:success] = "Uploaded Succefully!"
redirect_to @video.user
else
render 'upload'
end
end
def show
@video = Video.find(params[:id])
@comments = @video.comments.paginate(page: params[:page], per_page: 6)
if !@video.public
if !signed_in? || current_user.id != @video.user_id && !current_user.admin && !current_user.approved?(@video.user)
flash[:notice] = "Video is private"
redirect_to root_path
end
end
end
def update
@video = Video.find(params[:id])
if @video.update_attributes(params[:video])
flash[:success] = "Video preferences saved"
else
flash[:fail] = "Failed to update video preferences"
end
redirect_to :back
end
def destroy
@video = Video.find(params[:id])
@video.destroy
flash[:deleted] = "Deleted Succefully!"
redirect_to :back
end
def index
@videos = Video.paginate(page: params[:page], per_page: 6).search(params[:search])
end
def admin_index
@videos = Video.paginate(page: params[:page], per_page: 6).admin_search(params[:search])
end
def ajax_video_comments
@video = Video.find(params[:id])
@comments = @video.comments.paginate(page: params[:page], per_page: 6)
respond_to do |format|
format.js { render partial: 'shared/comments', content_type: 'text/html' }
end
end
def ajax_video_watched
@video = Video.find(params[:id])
@video.views += 1
@video.save
end
private
def signed_in_user
redirect_to root_path, notice: "Please Login." unless signed_in?
end
def admin_user
redirect_to(root_path) unless current_user.admin?
end
end -
Run makesprites.py on debian 9
2 novembre 2017, par NakemosI try to run makesprites.py (https://github.com/vlanard/videoscripts/blob/master/sprites/makesprites.py) on a .mp4 file with the command :
for f in 480/*.mp4 ; do python makesprites.py $f ; done
My ffmpeg version :
ffmpeg version 3.2.8-1 deb9u1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18) 20170516But I have this error :
root@vps47509:~/test# for f in 480/*.mp4; do python makesprites.py $f; done
Making dir: /root/test/thumbs/1838448.mp_vtt
START [2017-11-02 12:32:17.246337] : ffmpeg -i 480/1838448.mp4 -f image2 -bt 20M -vf fps=1/10 -aspect 16:9 /root/test/thumbs/1838448.mp_vtt/tv%03d.jpg
END [2017-11-02 12:33:11.368050]
ffmpeg version 3.2.8-1~deb9u1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '480/1838448.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.40.101
Duration: 00:10:00.02, start: 0.000000, bitrate: 2122 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2010 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 103 kb/s (default)
Metadata:
handler_name : SoundHandler
[swscaler @ 0x559cbf99d940] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/root/test/thumbs/1838448.mp_vtt/tv%03d.jpg':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.56.101
Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 0.10 fps, 0.10 tbn, 0.10 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc57.64.101 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
frame= 61 fps=1.1 q=1.6 Lsize=N/A time=00:10:10.00 bitrate=N/A speed=11.3x
video:4753kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Removing first image, unneeded
60 thumbs written in /root/test/thumbs/1838448.mp_vtt
START [2017-11-02 12:33:11.370139] : mogrify -geometry 100x /root/test/thumbs/1838448.mp_vtt/tv041.jpg /root/test/thumbs/1838448.mp_vtt/tv008.jpg /root/test/thumbs/1838448.mp_vtt/tv023.jpg /root/test/thumbs/1838448.mp_vtt/tv040.jpg /root/test/thumbs/1838448.mp_vtt/tv025.jpg /root/test/thumbs/1838448.mp_vtt/tv059.jpg /root/test/thumbs/1838448.mp_vtt/tv060.jpg /root/test/thumbs/1838448.mp_vtt/tv019.jpg /root/test/thumbs/1838448.mp_vtt/tv039.jpg /root/test/thumbs/1838448.mp_vtt/tv030.jpg /root/test/thumbs/1838448.mp_vtt/tv052.jpg /root/test/thumbs/1838448.mp_vtt/tv061.jpg /root/test/thumbs/1838448.mp_vtt/tv038.jpg /root/test/thumbs/1838448.mp_vtt/tv014.jpg /root/test/thumbs/1838448.mp_vtt/tv048.jpg /root/test/thumbs/1838448.mp_vtt/tv044.jpg /root/test/thumbs/1838448.mp_vtt/tv047.jpg /root/test/thumbs/1838448.mp_vtt/tv053.jpg /root/test/thumbs/1838448.mp_vtt/tv055.jpg /root/test/thumbs/1838448.mp_vtt/tv026.jpg /root/test/thumbs/1838448.mp_vtt/tv024.jpg /root/test/thumbs/1838448.mp_vtt/tv010.jpg /root/test/thumbs/1838448.mp_vtt/tv007.jpg /root/test/thumbs/1838448.mp_vtt/tv056.jpg /root/test/thumbs/1838448.mp_vtt/tv002.jpg /root/test/thumbs/1838448.mp_vtt/tv017.jpg /root/test/thumbs/1838448.mp_vtt/tv036.jpg /root/test/thumbs/1838448.mp_vtt/tv045.jpg /root/test/thumbs/1838448.mp_vtt/tv035.jpg /root/test/thumbs/1838448.mp_vtt/tv050.jpg /root/test/thumbs/1838448.mp_vtt/tv033.jpg /root/test/thumbs/1838448.mp_vtt/tv051.jpg /root/test/thumbs/1838448.mp_vtt/tv043.jpg /root/test/thumbs/1838448.mp_vtt/tv028.jpg /root/test/thumbs/1838448.mp_vtt/tv009.jpg /root/test/thumbs/1838448.mp_vtt/tv003.jpg /root/test/thumbs/1838448.mp_vtt/tv020.jpg /root/test/thumbs/1838448.mp_vtt/tv004.jpg /root/test/thumbs/1838448.mp_vtt/tv027.jpg /root/test/thumbs/1838448.mp_vtt/tv021.jpg /root/test/thumbs/1838448.mp_vtt/tv006.jpg /root/test/thumbs/1838448.mp_vtt/tv022.jpg /root/test/thumbs/1838448.mp_vtt/tv015.jpg /root/test/thumbs/1838448.mp_vtt/tv049.jpg /root/test/thumbs/1838448.mp_vtt/tv032.jpg /root/test/thumbs/1838448.mp_vtt/tv016.jpg /root/test/thumbs/1838448.mp_vtt/tv011.jpg /root/test/thumbs/1838448.mp_vtt/tv031.jpg /root/test/thumbs/1838448.mp_vtt/tv058.jpg /root/test/thumbs/1838448.mp_vtt/tv029.jpg /root/test/thumbs/1838448.mp_vtt/tv057.jpg /root/test/thumbs/1838448.mp_vtt/tv042.jpg /root/test/thumbs/1838448.mp_vtt/tv005.jpg /root/test/thumbs/1838448.mp_vtt/tv018.jpg /root/test/thumbs/1838448.mp_vtt/tv034.jpg /root/test/thumbs/1838448.mp_vtt/tv046.jpg /root/test/thumbs/1838448.mp_vtt/tv012.jpg /root/test/thumbs/1838448.mp_vtt/tv054.jpg /root/test/thumbs/1838448.mp_vtt/tv013.jpg /root/test/thumbs/1838448.mp_vtt/tv037.jpg
ERROR [2017-11-02 12:33:11.377429] An exception occurred
None
[Errno 2] No such file or directory
Traceback (most recent call last):
File "makesprites.py", line 281, in <module>
run(task)
File "makesprites.py", line 248, in run
resize(thumbfiles)
File "makesprites.py", line 128, in resize
doCmd("mogrify -geometry %dx %s" % (THUMB_WIDTH," ".join(map(pipes.quote, files))))
File "makesprites.py", line 91, in doCmd
raise e #todo ?
OSError: [Errno 2] No such file or directory
</module>In the folder, I have the .jpg files, but not the XXX.mp_thumbs.vtt. Any idea ?
-
swscale/utils : Fix color range of gray16
18 mars 2014, par Carl Eugen Hoyosswscale/utils : Fix color range of gray16
Improves rgb -> gray16 conversion
Fixes Ticket3422
The pam and png output files look visually similar, in both cases the
dynamics increase to 0x0 -> 0xfffb.Signed-off-by : Michael Niedermayer <michaelni@gmx.at>
- [DH] libswscale/utils.c
- [DH] tests/ref/fate/filter-pixdesc
- [DH] tests/ref/fate/filter-pixfmts-copy
- [DH] tests/ref/fate/filter-pixfmts-crop
- [DH] tests/ref/fate/filter-pixfmts-field
- [DH] tests/ref/fate/filter-pixfmts-fieldorder
- [DH] tests/ref/fate/filter-pixfmts-hflip
- [DH] tests/ref/fate/filter-pixfmts-il
- [DH] tests/ref/fate/filter-pixfmts-null
- [DH] tests/ref/fate/filter-pixfmts-scale
- [DH] tests/ref/fate/filter-pixfmts-vflip
- [DH] tests/ref/lavf/pam
- [DH] tests/ref/lavf/png