
Recherche avancée
Autres articles (111)
-
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 (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
Sur d’autres sites (6205)
-
Add support for QT BMP 1bpp color mode
12 mai 2011, par ami_stuffAdd support for QT BMP 1bpp color mode
-
How to compare the difference between 2 videos color in ffmpeg ?
3 décembre 2014, par nico_labI have read How to compare/show the difference between 2 videos in ffmpeg ? , but "blend=all_mode=difference" is green.
How do I get more colorful diffrence using blend filter ?sample command is
ffplay -f lavfi "movie=left.mp4,split[a1][a2]; movie=right.mp4,split[b1][b2]; [a1][b1]blend=all_mode=difference[blend];[a2]pad=2*iw:2*ih[left];[left][b2]overlay=w[tmp];[tmp][blend]overlay=0:h"
using "hue=s=0", color is chenge monochrome.
ffplay -f lavfi "movie=left.mp4,split[a1][a2]; movie=right.mp4,split[b1][b2]; [a1][b1]blend=all_mode=difference,hue=s=0[blend];[a2]pad=2*iw:2*ih[left];[left][b2]overlay=w[tmp];[tmp][blend]overlay=0:h"
The goal is this video. if you have a niconico account.
http://www.nicovideo.jp/watch/sm24864058if you don’t have a niconico account, embed page is
http://www.nicozon.net/watch/sm24864058 -
Upload screenshots to google cloud storage bucket with Fluent-ffmpeg
2 janvier 2021, par aarpodsI am currently using multer to upload videos to my google storage bucket, and fluent-ffmpeg to capture thumbnails of the videos. Videos are being uploaded into the buckets correctly, but not the thumbnails from ffmpeg. How can I change the location of the thumbnails to my google storage bucket ?


Back-End Video upload


require ('dotenv').config()
const express = require('express');
const router = express.Router();
const multer = require("multer");
var ffmpeg = require('fluent-ffmpeg');
const multerGoogleStorage = require('multer-google-storage');
const { Video } = require("../models/Video");
const {User} = require("../models/User")
const { auth } = require("../middleware/auth");


var storage = multer({
 destination: function (req, file, cb) {
 cb(null, 'videos/')
 },
 filename: function (req, file, cb) {
 cb(null, `${Date.now()}_${file.originalname}`)
 },
 fileFilter: (req, file, cb) => {
 const ext = path.extname(file.originalname)
 if (ext !== '.mp4' || ext !== '.mov' || ext !== '.m3u' || ext !== '.flv' || ext !== '.avi' || ext !== '.mkv') {
 return cb(res.status(400).end('Error only videos can be uploaded'), false);
 }
 cb(null,true)
 }
})
// Set location to google storage bucket
var upload = multer({ storage: multerGoogleStorage.storageEngine() }).single("file")

router.post("/uploadfiles", (req, res) => {

 upload(req, res, err => {
 if (err) {
 return res.json({sucess: false, err})
 }
 return res.json({ success: true, filePath: res.req.file.path, fileName: res.req.file.filename})
 })
});



Back-end thumbnail upload


router.post("/thumbnail", (req, res) => {

 let thumbsFilePath = "";
 let fileDuration = "";

 ffmpeg.ffprobe(req.body.filePath, function (err, metadata) {
 console.dir(metadata);
 console.log(metadata.format.duration);

 fileDuration = metadata.format.duration;
 })


 ffmpeg(req.body.filePath)
 .on('filenames', function (filenames) {
 console.log('Will generate ' + filenames.join(', '))
 thumbsFilePath = "thumbnails/" + filenames[0];
 })
 .on('end', function () {
 console.log('Screenshots taken');
 return res.json({ success: true, thumbsFilePath: thumbsFilePath, fileDuration: fileDuration })
 })
 //Can this be uploaded to google storage?
 .screenshots({
 // Will take 3 screenshots
 count: 3,
 folder: '/thumbnails/',
 size: '320x240',
 //Names file w/o extension
 filename:'thumbnail-%b.png'
 });
});



Front-end video upload


const onDrop = (files) => {
 let formData = new FormData();
 const config = {
 header: {'content-type': 'multipart/form-data'}
 }
 console.log(files)
 formData.append("file", files[0])

 axios.post('/api/video/uploadfiles', formData, config)
 .then(response => {
 if (response.data.success) {
 let variable = {
 filePath: response.data.filePath,
 fileName: response.data.fileName
 }
 setFilePath(response.data.filePath)

 //Thumbnail
 axios.post('/api/video/thumbnail', variable)
 .then(response => {
 if (response.data.success) {
 setDuration(response.data.fileDuration)
 setThumbnail(response.data.thumbsFilePath)
 } else {
 alert("Failed to generate a thumbnail");
 }
 })

 } else {
 alert('Failed to save video to the server')
 }
 })
 }