Recherche avancée

Médias (1)

Mot : - Tags -/embed

Autres articles (111)

  • Installation en mode ferme

    4 février 2011, par

    Le 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 (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

Sur d’autres sites (8460)

  • Haskell - Converting multiple images into a video file - ffmpeg-lights' frameWriter-function fails

    26 octobre 2017, par oRole

    Situation
    Currently I am working on an application for image-processing that uses ffmpeg-light to fetch all the frames of a given video-file so that the program afterwards can apply grayscaling, as well as edge detection alogrithms to each of the frames.

    With the help of friendly stackoverflowers I was able to set up a method capable of converting several images into one video file using ffmpeg-lights’ frameWriter function.

    Problem
    The application runs fine to the moment it hits the frameWriterfunction and I don’t really know why as there are no errors or exception-messages thrown. (OS : Win 10 64bit)

    What did I try ?
    I tried..

    - different versions of ffmpeg (from 3.2 to 3.4).

    - ffmpeg.exe using the command line to test if there are any codecs missing, but any conversion I tried worked.

    - different EncodingParams-combinations : like.. EncodingParams width height fps (Nothing) (Nothing) "medium"

    Question
    Unfortunately, none of above worked and the web lacks on information to that specific case. Maybe I missed something essential (like ghc flags or something) or made a bigger mistake within my code. That is why I have to ask you : Do you have any suggestions/advice for me ?

    Haskell Packages

    - ffmpeg-light-0.12.0

    - JuicyPixels-3.2.8.3

    Code

    {--------------------------------------------------------------------------------------------
    Applies "juicyToFFmpeg'" and "getFPS" to a list of images and saves the output-video
    to a user defined location.
    ---------------------------------------------------------------------------------------------}    
    saveVideo :: String -> [Image PixelYA8] -> Int -> IO ()
    saveVideo path imgs fps = do
            -- program stops after hitting next line --
            frame <- frameWriter ep path
            ------------------------------------------------
            Prelude.mapM_ (frame . Just) ffmpegImgs
            frame Nothing
            where ep = EncodingParams width height fps (Just avCodecIdMpeg4) (Just avPixFmtGray8a) "medium"
                  width      = toCInt $ imageWidth  $ head imgs
                  height     = toCInt $ imageHeight $ head imgs
                  ffmpegImgs = juicyToFFmpeg' imgs
                  toCInt x   = fromIntegral x :: CInt

    {--------------------------------------------------------------------------------------------
    Converts a single image from JuicyPixel-format to ffmpeg-light-format.
    ---------------------------------------------------------------------------------------------}      
    juicyToFFmpeg :: Image PixelYA8 -> (AVPixelFormat, V2 CInt, Vector CUChar)
    juicyToFFmpeg img = (avPixFmtGray8a, V2 (toCInt width) (toCInt height), ffmpegData)
                     where toCInt   x   = fromIntegral x :: CInt
                           toCUChar x   = fromIntegral x :: CUChar
                           width        = imageWidth img
                           height       = imageHeight img
                           ffmpegData   = VS.map toCUChar (imageData img)

    {--------------------------------------------------------------------------------------------
    Converts a list of images from JuicyPixel-format to ffmpeg-light-format.
    ---------------------------------------------------------------------------------------------}                        
    juicyToFFmpeg' :: [Image PixelYA8] -> [(AVPixelFormat, V2 CInt, Vector CUChar)]
    juicyToFFmpeg' imgs = Prelude.foldr (\i acc -> acc++[juicyToFFmpeg i]) [] imgs

    {--------------------------------------------------------------------------------------------
    Simply calculates the FPS for image-to-video conversion.
    -> frame :: (Double, DynamicImage) where Double is a timestamp of when it got extracted
    ---------------------------------------------------------------------------------------------}
    getFPS :: [(Double, DynamicImage)] -> Int
    getFPS frames = div (ceiling $ lastTimestamp - firstTimestamp) frameCount :: Int
                 where firstTimestamp = fst $ head frames
                       lastTimestamp  = fst $ last frames
                       frameCount     = length frames
  • avcodec/vc1 : fix mquant calculation for interlace field pictures

    18 mai 2018, par Jerome Borsboom
    avcodec/vc1 : fix mquant calculation for interlace field pictures
    

    For interlace field pictures s->mb_height indicates the height of the full
    picture in MBs, i.e. the two fields combined. A single field is half this
    size. When calculating mquant for interlace field pictures, the bottom edge
    is the last MB row of the field.

    Signed-off-by : Jerome Borsboom <jerome.borsboom@carpalis.nl>

    • [DH] libavcodec/vc1_block.c
  • Chrome struggles to play videos

    11 décembre 2017, par Cameron

    I have some video files I want to display on a webpage using the HTML5 video player. The videos were sent to me at 1920x1080 in H.254 MP4 format.

    Using FFMPEG I have converted them so I have a smaller Mp4 file, an OGV file, and a WebM file using the following commands :

    ffmpeg -i FILE.mp4 -vcodec h264 FILE.mp4

    ffmpeg -i FILE.mp4 -acodec libvorbis -vcodec libtheora -f ogv FILE.ogv

    ffmpeg -i FILE.mp4 -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis FILE.webm

    And then the video is embedded into the page like so :

    <video preload="metadata" crossorigin="anonymous" poster="poster.jpg" controls="controls" playsinline="playsinline">
       <source src="FILE.webm" type="video/webm">
       <source src="FILE.ogv" type="video/ogv">
       <source src="FILE.mp4" type="video/mp4">
    </source></source></source></video>

    However when I click to play the video in Chrome, it stops after a few seconds and then if I click play again it restarts. If I right click and open the video in a new tab I just see a tiny player and not the video e.g.
    enter image description here

    The same happens for all three formats. But if I refresh the browser enough times I can get the MP4 file to show up in the new tab though it still suffers from the aforementioned bug of playing for a few seconds before failing.

    I have tested this in Firefox and Safari and it works fine ! In fact it even works in IE and Edge :D And I can also play the videos in a player on the machine itself... e.g. QuickTime.

    Any ideas why Chrome is acting this way ? Or any resolutions ? I’m seeing the same behaviour on Chrome for Windows and Mac. Is the way I have converted the videos using FFMPEG in anyway a cause that could affect Chrome but not other browsers ?

    Chrome version tested on : Version 63.0.3239.84 (Official Build) (64-bit)

    Output from ffprobe as per the comments on the one of the webm files :

    ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers
     built with Apple LLVM version 7.3.0 (clang-703.0.31)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-ffplay --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --enable-openssl --disable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.3.0/include/openjpeg-2.3 --enable-nonfree
     libavutil      55. 78.100 / 55. 78.100
     libavcodec     57.107.100 / 57.107.100
     libavformat    57. 83.100 / 57. 83.100
     libavdevice    57. 10.100 / 57. 10.100
     libavfilter     6.107.100 /  6.107.100
     libavresample   3.  7.  0 /  3.  7.  0
     libswscale      4.  8.100 /  4.  8.100
     libswresample   2.  9.100 /  2.  9.100
     libpostproc    54.  7.100 / 54.  7.100
    Input #0, matroska,webm, from 'FILE.webm':
     Metadata:
       COMPATIBLE_BRANDS: mp42mp41
       MAJOR_BRAND     : mp42
       MINOR_VERSION   : 0
       ENCODER         : Lavf57.83.100
     Duration: 00:00:52.57, start: 0.000000, bitrate: 910 kb/s
       Stream #0:0(eng): Video: vp8, yuv420p(progressive), 1920x1080, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
       Metadata:
         HANDLER_NAME    : Alias Data Handler
         ENCODER         : Lavc57.107.100 libvpx
         DURATION        : 00:00:52.563000000
       Stream #0:1(eng): Audio: vorbis, 48000 Hz, stereo, fltp (default)
       Metadata:
         HANDLER_NAME    : Alias Data Handler
         ENCODER         : Lavc57.107.100 libvorbis
         DURATION        : 00:00:52.568000000