Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (65)

  • Les images

    15 mai 2013
  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

Sur d’autres sites (7195)

  • POST http://localhost:3000/api/video/thumbnail 500 (Internal Server Error) MongoDB and FFmpeg

    5 juillet 2022, par VoicedCreator

    I am trying to insert a thumbnail on my page using POST and im getting this error
I want to screenshot a video using FFmpeg

    


    const express = require('express');
const router = express.Router();
const multer = require('multer');
var ffmpeg = require('fluent-ffmpeg');
const { User } = require("../models/User");

const { auth } = require("../middleware/auth");
const storage = multer.diskStorage({
    destination: function (req, file, cb) {
      cb(null, 'uploads/')
    },
    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 !== '.wmv'){
            return cb(res.status(400).end('Solo archivos mp4-mov-wmv son aceptados'), false);
        }
        cb(null, true)
    }
  })
  
  const upload = multer({ storage: storage }).single("file")


//=================================
//             User
//=================================

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

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

});

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


    let filePath = ""
    let fileDuration = ""


    ffmpeg.ffprobe(req.body.url, function (err, metadata) {
        console.dir(metadata); // all metadata
        console.log(metadata.format.duration);
        console.log(metadata) 
        fileDuration = metadata.format.duration
    });


    ffmpeg(req.body.url)
        .on('filenames', function (filenames) {
            console.log('Will generate ' + filenames.join(', '))
            console.log(filenames)


            filePath = "uploads/thumbnails/" + filenames[0]
        })
        .on('end', function () {
            console.log('Screenshots taken');
            return res.json({ success: true, url: filePath, fileName: filenames, fileDuration: fileDuration });
        })
        .on('error', function (err) {
            console.error(err);
            return res.json({ success: false, err });
        })
        .screenshots({
            // Will take screenshots at 20%, 40%, 60% and 80% of the video
            count: 3,
            folder: 'uploads/thumbnails',
            size: '320x240',
            //'%b': input basename (filename w/o extension)
            filename: 'thumbnail-%b.png'
        })
});




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


    let filePath = ""
    let fileDuration = ""


    ffmpeg(req.body.url)
        .on('filenames', function (filenames) {
            console.log('Will generate ' + filenames.join(', '))
            console.log(filenames)


            filePath = "uploads/thumbnails/" + filenames[0]
        })
        .on('end', function () {
            console.log('Screenshots taken');
            return res.json({ success: true, url: filePath, fileName: filenames, fileDuration: fileDuration });
        })
        .on('error', function (err) {
            console.error(err);
            return res.json({ success: false, err });
        })
        .screenshots({
            // Will take screenshots at 20%, 40%, 60% and 80% of the video
            count: 3,
            folder: 'uploads/thumbnails',
            size: '320x240',
            //'%b': input basename (filename w/o extension)
            filename: 'thumbnail-%b.png'
        })
});



module.exports = router;


    


    Error : POST http://localhost:3000/api/video/thumbnail 500 (Internal Server Error)
TypeError : Cannot read properties of undefined (reading 'format')

    


    I think is because ffmpeg is not connecting to mongodb

    


  • avcodec/wnv1 : Move temporary variables from context to stack

    29 août 2020, par Andreas Rheinhardt
    avcodec/wnv1 : Move temporary variables from context to stack
    

    Here it even leads to the complete removal of the context.

    Reviewed-by : Paul B Mahol <onemda@gmail.com>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavcodec/wnv1.c
  • mp4 video on Android

    9 février 2016, par matthewbaskey

    I wanted to convert some old Flash videos to 1 video format so the content will show on a mobile phone. I got some mp4 and it doesn’t work on Android, specifically Chrome 32 running on Android 4.3.

    Click this link to a fiddle

    It is loading the mp4 file on Chrome 32 on Android 4.3, but I thought there is no support for H.256

    Then I went to a this site http://techslides.com/sample-webm-ogg-and-mp4-video-files-for-html5/

    and the mp4 video there works on Android/Chrome.

    I used VLC to check the codecs and they look the same

    H264 - MPEG-4 AVC (part 10) (avc1)
    Resolution: is different (working one is 560x320
    Resolution: mp4 not working is 640x480
    Framerate: working is 30, not working is 12
    Decoded format: Planar4:2:0 YUV

    I then searched the codec then with ffmpeg and I see that
    there is a property called
    compatible_brands : mp42icomavc1

    which is different than the non-working mp4 which has this property set to
    compatible : mp42mp41

    The file sizes are quite different as well. Could this be an issue.

    When I load http://html5test.com the Chrome on Android browser says MPEG-4 is not supported by H.264 is. it doesn’t say anything about the container.

    ok here is some source code, I thought chrome on android doesn’t support mp4 files, but when I load the following on Chrome 32 running on Sony Xperia Tablet running Android 4.3. I had an mp4 file that I converted to webm, but chrome still could not run it. It is 8 MB so perhaps the size is an issue....this mp4 has a different size and frameframe. Other than that I only see compatible version different as mentioned above.

       


       <h4>This is mp4 video</h4>
       <video controls="controls" autoplay="autoplay" preload="auto">
           <source src="http://techslides.com/demos/sample-videos/small.mp4" type="video/mp4">
       </source></video>