
Recherche avancée
Autres articles (91)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (10566)
-
FFmpeg - selecting appropriate bitrate for VP9 encoding
6 avril 2017, par fastilyI am looking to encode a 4k video shot with iPhone 6s in VP9 in the best quality possible.
For reference, stream data of the video I would like to encode, via
ffprobe
:Duration: 00:00:10.48, start: 0.000000, bitrate: 46047 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 3840x2160, 45959 kb/s, 29.98 fps, 29.97 tbr, 600 tbn, 1200 tbc (default)
Metadata:
creation_time : 2017-03-13T21:12:56.000000Z
handler_name : Core Media Data Handler
encoder : H.264
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 79 kb/s (default)
Metadata:
creation_time : 2017-03-13T21:12:56.000000Z
handler_name : Core Media Data HandlerI am using the following FFmpeg commands, based on these instructions (see
Best Quality (Slowest) Recommended Settings
section).ffmpeg -i INPUT.mov -c:v libvpx-vp9 -pass 1 -b:v 46000K -threads 4 -speed 4 -g 9999 -an -f webm -y /dev/null
ffmpeg -I INPUT.mov -c:v libvpx-vp9 -pass 2 -b:v 46000K -threads 4 -speed 0 -g 9999 -an -f webm OUTPUT.webm
Is there a best practice to select an optimal
-b:v
value such that the resulting video is visually indistinguishable from the original ? I have tried values ranging from 36000K-46000K, but these result in massive files with an overall bitrate exceeding the target bitrate.Thanks in advance !
-
Paperclip geometry ignored
27 mars 2017, par ACIDSTEALTHI have a model called Snapshot, which represents a user-recorded video. I want to take the input video file and scale it to fit within a 720x720 box (ImageMagick documentation). I then want to capture some screenshots of the video to represent it in my app. These sizes are specified accordingly in my model.
I expect the output of this to be an
original
video with a maximum width of 720px (assuming it was recorded in landscape mode), alarge
JPG image with a maximum width of 540px, etc.When I attach the video file and save the model, the images and video file are processed but the result is not what I expected. The video file has a resolution of 960x720 and the images are all square (540x540, 360x360, etc).
I’m not sure if I’m doing something wrong or if this is just a bug with Paperclip. Here is my code :
class Snapshot < ApplicationRecord
has_attached_file :video,
styles: {
original: { geometry: "720x720", format: 'mp4' },
large: { geometry: "540x540", format: 'jpg' },
medium: { geometry: "360x360", format: 'jpg' },
thumb: { geometry: "180x180", format: 'jpg' }
},
default_url: "", processors: [:transcoder]
validates_attachment_content_type :video, content_type: /\Avideo\/.*\Z/
validates_attachment_size :video, less_than: 100.megabytes
endI have also tried adjusting the geometry to
720x720>
,540x540>
, etc. When I did this, the attachments’ resolution was unchanged, which seems to go completely against my understanding of how ImageMagick geometry works. I have numerous other models with image-only attachments that do not suffer from this issue.Here is a snippet from my
Gemfile.lock
so you can see which versions I am running :delayed_paperclip (3.0.1)
activejob (>= 4.2)
paperclip (>= 3.3)
paperclip (5.1.0)
activemodel (>= 4.2.0)
activesupport (>= 4.2.0)
cocaine (~> 0.5.5)
mime-types
mimemagic (~> 0.3.0)
paperclip-av-transcoder (0.6.4)
av (~> 0.9.0)
paperclip (>= 2.5.2)
paperclip-optimizer (2.0.0)
image_optim (~> 0.19)
paperclip (>= 3.4)Update
I retried this with a video recorded in portrait mode (iPhone 6 front-facing webcam) and the video file’s output size was 720x720. The images were still square as before. -
ffmpeg override the same file for every second of the video [on hold]
5 février 2017, par Dorin PleavaI want to get one image for every 10 seconds from a livestream/video, but the image should have the same name, meaning I want to override it every cycle.
This is my command :
ffmpeg.exe -i http://iphone-streaming.ustream.tv/uhls/17074538/streams/live/iphone/playlist.m3u8 -bt 20M -s 480x300 -vf fps=1/10 -y photo.jpg
This code works for one image but for the next I get this
"Could not get frame filename number 2 from pattern ’photo.jpg’ (either set updatefirst or use a pattern like %03d within the filename pattern)
av_interleaved_write_frame() : Invalid argument"If I replace photo.jpeg with photo%03d.jpg I get photo001.jpec, followed by photo002.jpeg, etc.