Recherche avancée

Médias (0)

Mot : - Tags -/organisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (111)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin 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, par

    La 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 (11278)

  • Haskell - Turning multiple image-files into one video-file using the ffmpeg-light package

    25 avril 2021, par oRole

    Background
    
I wrote an application for image-processing which uses the ffmpeg-light package to fetch all the frames of a given video-file so that the program afterwards is able to apply grayscaling, as well as edge detection alogrithms to each of the frames.

    


    Now I'm trying to put all of the frames back into a single video-file.

    


    Used Libs
    
ffmpeg-light-0.12.0
    
JuicyPixels-3.2.8.3
    
...

    


    What have I tried ?
    
I have to be honest, I didn't really try anything because I'm kinda clueless where and how to start. I saw that there is a package called Command which allows running processes/commands using the command line. With that I could use ffmpeg (not ffmpeg-light) to create a video out of image-files which I would have to save to the hard drive first but that would be kinda hacky.

    
Within the documentation of ffmpeg-light on hackage (ffmpeg-light docu) I found the frameWriter function which sounds promising.

    


    frameWriter :: EncodingParams -> FilePath -> IO (Maybe (AVPixelFormat, V2 CInt, Vector CUChar) -> IO ()) 


    


    I guess FilePath would be the location where the video file gets stored but I can't really imagine how to apply the frames as EncodingParams to this function.

    


    Others
    
I can access :

    


      

    • r, g, b, a as well asy. a values
    • 


    • image width / height / format
    • 


    


    Question
    
Is there a way to achieve this using the ffmpeg-light package ?

    


    As the ffmpeg-light package lacks of documentation when it comes to conversion from images to video, I really would appreciate your help. (I do not expect a fully working solution.)

    


    Code
    
The code that reads the frames :

    


    -- Gets and returns all frames that a given video contains
getAllFrames :: String -> IO [(Double, DynamicImage)]
getAllFrames vidPath = do 
  result <- try (imageReaderTime $ File vidPath) :: IO (Either SomeException (IO (Maybe (Image PixelRGB8, Double)), IO()))
  case result of 
    Left ex -> do 
                 printStatus "Invalid video-path or invalid video-format detected." "Video" 
                 return []
    Right (getFrame, _) -> addNextFrame getFrame [] 

-- Adds up all available frames to a video.
addNextFrame :: IO (Maybe (Image PixelRGB8, Double)) -> [(Double, DynamicImage)] -> IO [(Double, DynamicImage)]
addNextFrame getFrame frames = do
  frame <- getFrame
  case frame of 
    Nothing -> do 
                 printStatus "No more frames found." "Video"
                 return frames
    _       -> do                             
                 newFrameData <- fmap ImageRGB8 . swap . fromJust <$> getFrame 
                 printStatus ("Frame: " ++ (show $ length frames) ++ " added.") "Video"
                 addNextFrame getFrame (frames ++ [newFrameData]) 


    


    Where I am stuck / The code that should convert images to video :

    


    -- Converts from several images to video
juicyToFFmpeg :: [Image PixelYA8] -> ?
juicyToFFmpeg imgs = undefined


    


  • When I use Fluent-Ffmpeg to access Ffmpeg, there are two different threads but I dont want it

    25 mars 2019, par Ahmet Hakan Billur

    I try to broadcast with rtsp live stream from IP camera on web app that is improved with node.js-jsmpeg([a link]https://www.npmjs.com/package/fluent-ffmpeg !), web socket, html5(canvas).Everything ok that live streaming works but missing frame and high CPU usaged by streaming on web app and I try to reduce so I can intervene ffmpeg with fluent-ffmpeg but when I monitor CPU usaged I can see there 2 different threads following as and look at screenshot of CPU ;
    enter image description here

    ffmpeg -rtsp_trasport tcp -i rtsp ://10.6.0.225 -f mpeg1video - is worked by jsmpeg and canvas/html5
    index.html

       

       
       
       
       

       <div><canvas width="640" height="360"></canvas></div>
       div><canvas width="640" height="360"></canvas>  
       <code class="echappe-js">&lt;script type=&quot;text/javascript&quot; src='http://stackoverflow.com/feeds/tag/jsLib/jsmpeg.js'&gt;&lt;/script&gt;

    &lt;script type=&quot;text/javascript&quot; src='http://stackoverflow.com/feeds/tag/jsLib/ffmpegUtil.js'&gt;&lt;/script&gt;

    &lt;script type=&quot;text/javascript&quot;&gt;<br />
         var canvas = document.getElementById('videoCanvas');<br />
         var ws = new WebSocket(&quot;ws://10.6.0.206:9999&quot;)<br />
         var player = new jsmpeg(ws, {canvas:canvas, autoplay:true,audio:false,loop: true});<br />
       &lt;/script&gt;

    other one /usr/bin/ffmpeg -i rtsp ://10.6.0.225 -y out.ts is work by following piece of code in app.js

    Stream = require('node-rtsp-stream');
    stream = new Stream({
       name: 'name',
       streamUrl: 'rtsp://10.6.0.225',
       wsPort: 9999
    });

    var ffmpeg = require('fluent-ffmpeg');
    var proc = new ffmpeg();

    proc
    .addInput('rtsp://10.6.0.225')
    .on('start', function(ffmpegCommand) {
       /// log something maybe
       console.log('start-->'+ffmpegCommand)
    })
    .on('progress', function(data) {
       /// do stuff with progress data if you want
       console.log('progress-->'+data)
    })
    .on('end', function() {
       /// encoding is complete, so callback or move on at this point
       console.log('end-->')
    })
    .on('error', function(error) {
       /// error handling
       console.log('error-->'+error)

    })
    .output('out.ts')
    .run();

    and then I don’t want to get two different ffmpeg command threads in there.
    Does anyone have an idea ?
    Thanks in advice.

  • Anomalie #2985 (Nouveau) : Les docs attachés à un auteur ne sont pas visibles pour les rédacs dans...

    26 avril 2013, par Suske -

    Voir http://forum.spip.net/fr_251736.html

    Je confirme.

    Par contre ils s’afficheraient dans le public, ce que je veux bien croire mais pas testé.

    Une question d’autorisation j’imagine.