Recherche avancée

Médias (1)

Mot : - Tags -/intégration

Autres articles (57)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (8840)

  • avfilter/vf_overlay : Remove superfluous ;

    21 août 2020, par Andreas Rheinhardt
    avfilter/vf_overlay : Remove superfluous ;
    

    In a function body, a redundant ; is just a null statement that does
    nothing. Yet outside a function body, a superfluous ' ;' like one that
    exists if one adds a ' ;' immediately after a function body's closing
    brace is actually invalid C that compilers happen to accept. Yet when
    compiled in -pedantic mode, both GCC as well as Clang emit warnings for
    this like "ISO C does not allow extra ‘ ;’ outside of a function
    [-Wpedantic]".

    The scenario described above existed in vf_overlay.c as a result of
    macro expansion. This commit fixes it.

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

    • [DH] libavfilter/vf_overlay.c
  • How to stream and play video automatically using PHP FFmpeg Video Streaming libray

    21 août 2020, par kikabi francis

    Am currently new to ffmpeg video streaming and working on a project to stream mp4 videos using ffmpeg libray https://github.com/aminyazdanpanah/PHP-FFmpeg-video-streaming and Video player https://videojs.com/ using DASH.&#xA;Am currently starting the streaming to mpd using commandline, with streaming.php.&#xA;I want to start streaming automatically when dash.html with video playing.&#xA;and i want to switch between different video qualities on the player, currently it play the same quality set in streaming.php&#xA;Here is my code

    &#xA;

         &#xA;    &#xA;    &#xA;    &#xA;    &#xA;    &#xA;    &#xA;    &#xA;    &#xA;    <video height="480" data-setup="&#x27;{&quot;liveui&quot;:" class="video-js vjs-default-skin" controls="controls"></video>&#xA;        <code class="echappe-js">&lt;script src='http://stackoverflow.com/feeds/tag/app/js/plugins/node/video.js/dist/video.js'&gt;&lt;/script&gt;&#xA;        &lt;script src='http://stackoverflow.com/feeds/tag/app/js/plugins/switcher/videojs-resolution-switcher.js'&gt;&lt;/script&gt;&#xA;        &#xA;        &lt;script src='http://stackoverflow.com/feeds/tag/app/js/plugins/node/dashjs/dist/dash.all.min.js'&gt;&lt;/script&gt;&#xA;        &#xA;        &#xA;        &lt;script src='http://stackoverflow.com/feeds/tag/app/js/plugins/node/videojs-contrib-dash/dist /videojs-dash.js'&gt;&lt;/script&gt;&#xA;         &#xA;        &lt;script&gt;&amp;#xA;&amp;#xA;        var player = videojs(&amp;#x27;example-video&amp;#x27;);&amp;#xA;&amp;#xA;        player.ready(function() {&amp;#xA;            player.updateSrc([&amp;#xA;            {&amp;#xA;              src: &amp;#x27;http://localhost/MovieWeb/media/stream/dash-stream.mpd&amp;#x27;,&amp;#xA;              type: &amp;#x27;application/dash&amp;#x2B;xml&amp;#x27;,&amp;#xA;              label: &amp;#x27;144p&amp;#x27;,&amp;#xA;              res: 144&amp;#xA;            },&amp;#xA;            {&amp;#xA;              src: &amp;#x27;http://localhost/MovieWeb/media/stream/dash-stream.mpd&amp;#x27;,&amp;#xA;              type: &amp;#x27;application/dash&amp;#x2B;xml&amp;#x27;,&amp;#xA;              label: &amp;#x27;240p&amp;#x27;,&amp;#xA;              res: 240&amp;#xA;            },&amp;#xA;            {&amp;#xA;              src: &amp;#x27;http://localhost/MovieWeb/media/stream/dash-stream.mpd&amp;#x27;,&amp;#xA;              type: &amp;#x27;application/dash&amp;#x2B;xml&amp;#x27;,&amp;#xA;              label: &amp;#x27;360p&amp;#x27;,&amp;#xA;              res: 360&amp;#xA;            },&amp;#xA;            {&amp;#xA;              src: &amp;#x27;http://localhost/MovieWeb/media/stream/dash-stream.mpd&amp;#x27;,&amp;#xA;              type: &amp;#x27;application/dash&amp;#x2B;xml&amp;#x27;,&amp;#xA;              label: &amp;#x27;480p&amp;#x27;,&amp;#xA;              res: 480&amp;#xA;            },&amp;#xA;            {&amp;#xA;              src: &amp;#x27;http://localhost/MovieWeb/media/stream/dash-stream.mpd&amp;#x27;,&amp;#xA;              type: &amp;#x27;application/dash&amp;#x2B;xml&amp;#x27;,&amp;#xA;              label: &amp;#x27;720p&amp;#x27;,&amp;#xA;              res: 720&amp;#xA;            },&amp;#xA;            {&amp;#xA;              src: &amp;#x27;http://localhost/MovieWeb/media/stream/dash-stream.mpd&amp;#x27;,&amp;#xA;              type: &amp;#x27;application/dash&amp;#x2B;xml&amp;#x27;,&amp;#xA;              label: &amp;#x27;1080p&amp;#x27;,&amp;#xA;              res: 1080&amp;#xA;            }&amp;#xA;          ])&amp;#xA;         &amp;#xA;          player.play();&amp;#xA;        });&amp;#xA;        player.videoJsResolutionSwitcher();&amp;#xA;        &lt;/script&gt; &#xA;    &#xA;    &#xA;&#xA;&#xA;//video.php&#xA;< ?php&#xA;require ('api/libs/ffmpeg_video_stream/vendor/autoload.php') ;&#xA;use Streaming\Representation ;&#xA;$r_144p  = (new Representation)->setKiloBitrate(95)->setResize(256, 144) ;&#xA;$r_240p  = (new Representation)->setKiloBitrate(150)->setResize(426, 240) ;&#xA;$r_360p  = (new Representation)->setKiloBitrate(276)->setResize(640, 360) ;&#xA;$r_480p  = (new Representation)->setKiloBitrate(750)->setResize(854, 480) ;&#xA;$r_720p  = (new Representation)->setKiloBitrate(2048)->setResize(1280, 720) ;&#xA;$r_1080p = (new Representation)->setKiloBitrate(4096)->setResize(1920, 1080) ;&#xA;$config = [&#xA;      'ffmpeg.binaries'  => 'C :/ffmpeg/bin/ffmpeg.exe',&#xA;      'ffprobe.binaries' => 'C :/ffmpeg/bin/ffprobe.exe',&#xA;      'timeout'          => 3600, // The timeout for the underlying process&#xA;      'ffmpeg.threads'   => 12,   // The number of threads that FFmpeg should use&#xA;  ] ;&#xA;$ffmpeg = Streaming\FFMpeg::create($config) ;&#xA;$video = $ffmpeg->open('media/videos/dir686840/1080p_video.mp4') ;&#xA;$video->dash()&#xA;      ->setAdaption('id=0,streams=v id=1,streams=a')&#xA;      ->x264()&#xA;      ->addRepresentations([$r_360p])&#xA;      ->save('media/stream/dash-stream.mpd') ;&#xA; ?>&#xA;

    &#xA;

    Thank you very much !!

    &#xA;

  • Upload screenshots to google cloud storage bucket with Fluent-ffmpeg

    2 janvier 2021, par aarpods

    I 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 ?

    &#xA;

    Back-End Video upload

    &#xA;

    require (&#x27;dotenv&#x27;).config()&#xA;const express = require(&#x27;express&#x27;);&#xA;const router = express.Router();&#xA;const multer = require("multer");&#xA;var ffmpeg = require(&#x27;fluent-ffmpeg&#x27;);&#xA;const multerGoogleStorage = require(&#x27;multer-google-storage&#x27;);&#xA;const { Video } = require("../models/Video");&#xA;const {User} = require("../models/User")&#xA;const { auth } = require("../middleware/auth");&#xA;&#xA;&#xA;var storage = multer({&#xA;    destination: function (req, file, cb) {&#xA;        cb(null, &#x27;videos/&#x27;)&#xA;    },&#xA;    filename: function (req, file, cb) {&#xA;        cb(null, `${Date.now()}_${file.originalname}`)&#xA;    },&#xA;    fileFilter: (req, file, cb) => {&#xA;        const ext = path.extname(file.originalname)&#xA;        if (ext !== &#x27;.mp4&#x27; || ext !== &#x27;.mov&#x27; || ext !== &#x27;.m3u&#x27; || ext !== &#x27;.flv&#x27; || ext !== &#x27;.avi&#x27; || ext !== &#x27;.mkv&#x27;) {&#xA;            return cb(res.status(400).end(&#x27;Error only videos can be uploaded&#x27;), false);&#xA;        }&#xA;        cb(null,true)&#xA;    }&#xA;})&#xA;// Set location to google storage bucket&#xA;var upload = multer({ storage: multerGoogleStorage.storageEngine() }).single("file")&#xA;&#xA;router.post("/uploadfiles", (req, res) => {&#xA;&#xA;    upload(req, res, err => {&#xA;        if (err) {&#xA;            return res.json({sucess: false, err})&#xA;        }&#xA;        return res.json({ success: true, filePath: res.req.file.path, fileName: res.req.file.filename})&#xA;    })&#xA;});&#xA;

    &#xA;

    Back-end thumbnail upload

    &#xA;

    router.post("/thumbnail", (req, res) => {&#xA;&#xA;    let thumbsFilePath = "";&#xA;    let fileDuration = "";&#xA;&#xA;    ffmpeg.ffprobe(req.body.filePath, function (err, metadata) {&#xA;        console.dir(metadata);&#xA;        console.log(metadata.format.duration);&#xA;&#xA;        fileDuration = metadata.format.duration;&#xA;    })&#xA;&#xA;&#xA;    ffmpeg(req.body.filePath)&#xA;        .on(&#x27;filenames&#x27;, function (filenames) {&#xA;            console.log(&#x27;Will generate &#x27; &#x2B; filenames.join(&#x27;, &#x27;))&#xA;            thumbsFilePath = "thumbnails/" &#x2B; filenames[0];&#xA;        })&#xA;        .on(&#x27;end&#x27;, function () {&#xA;            console.log(&#x27;Screenshots taken&#x27;);&#xA;            return res.json({ success: true, thumbsFilePath: thumbsFilePath, fileDuration: fileDuration })&#xA;        })&#xA;        //Can this be uploaded to google storage?&#xA;        .screenshots({&#xA;            // Will take 3 screenshots&#xA;            count: 3,&#xA;            folder: &#x27;/thumbnails/&#x27;,&#xA;            size: &#x27;320x240&#x27;,&#xA;            //Names file w/o extension&#xA;            filename:&#x27;thumbnail-%b.png&#x27;&#xA;        });&#xA;});&#xA;

    &#xA;

    Front-end video upload

    &#xA;

     const onDrop = (files) => {&#xA;        let formData = new FormData();&#xA;        const config = {&#xA;            header: {&#x27;content-type&#x27;: &#x27;multipart/form-data&#x27;}&#xA;        }&#xA;        console.log(files)&#xA;        formData.append("file", files[0])&#xA;&#xA;        axios.post(&#x27;/api/video/uploadfiles&#x27;, formData, config)&#xA;            .then(response => {&#xA;                if (response.data.success) {&#xA;                    let variable = {&#xA;                        filePath: response.data.filePath,&#xA;                        fileName: response.data.fileName&#xA;                    }&#xA;                    setFilePath(response.data.filePath)&#xA;&#xA;                    //Thumbnail&#xA;                    axios.post(&#x27;/api/video/thumbnail&#x27;, variable)&#xA;                        .then(response => {&#xA;                            if (response.data.success) {&#xA;                                setDuration(response.data.fileDuration)&#xA;                                setThumbnail(response.data.thumbsFilePath)&#xA;                            } else {&#xA;                                alert("Failed to generate a thumbnail");&#xA;                            }&#xA;                        })&#xA;&#xA;                } else {&#xA;                    alert(&#x27;Failed to save video to the server&#x27;)&#xA;                }&#xA;            })&#xA;    }&#xA;

    &#xA;