Recherche avancée

Médias (1)

Mot : - Tags -/publishing

Autres articles (97)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • 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 (15825)

  • FFmpeg Node.js live web streaming

    12 mars 2018, par Dmitry

    I’m trying to create some kind of proxy server to get IP cameras feeds and stream it over http using FFmpeg and hapi.js
    The main thing is that must exist outside http-server routes regardless of being watched. So I create feed like that

    let ffmpeg = require('fluent-ffmpeg')

    let ffproc = ffmpeg()
       .input('some_link')
       .format('flv')
       .videoCodec('copy')
       .noAudio()


     let feed = ffproc.pipe({end: true})

    and http-server

    const Hapi = require('hapi')

    const server = new Hapi.Server({
     host: 'localhost',
     port: 3000
    })

    server.route({
     method: 'GET',
     path: '/live',
     handler: function (request, h) {
         return feed
     }
    })

    server.start((err) => {  
     console.log(`Server running at: ${server.info.uri}`)
    })

    I’ve got my feed using vlc or ffplay but after I disconnect ffproc ends as well so I cannot reconnect later.
    I’ve tryed to clone or pipe stream but it doesn’t help, process still exists but ffplay shows error ’Invalid data found when processing input’ instead of feed. koa server shows same behaviour, express and fastify I did not managed to work.

    What am I doing wrong ?

  • FFMpeg video thumbnail frame extraction

    30 mars 2012, par Simone Margaritelli

    i'm trying to extract a thumbnail from a video with ffmpeg, therefore i'm using the command line :

    ffmpeg -i video.mp4 -vframes 1 -an -f image2 -y thumbmail.png 2>&1

    But in most cases, the first frame is completely black.
    So, what i'm doing is :

    for( $i = 1; $i < MAX_FRAME_CHECKING; $i++ )
    {
     $cmd = sprintf( 'ffmpeg -i video.mp4 -vframes 1 -an -vf select="eq(n\,%d)"-f image2 -y thumbmail.png 2>&1', $i );

     @exec( $cmd, $aOutput, $iReturnValue );

     if( self::isGoodKeyFrame( 'thumbmail.png' ) )
       break;
    }

    Where the isGoodKeyFrame method is defined as :

    private static function isGoodKeyFrame( $sImagePath )
    {
     if( class_exists('Imagick') )
     {
       $hImagick = new Imagick();

       try
       {
         if ( $hImagick->readImage($sImagePath) && $hImagick->valid() )
         {
           $hQuantized = @$hImagick->clone( );
           $hQuantized->quantizeImage( 255, Imagick::COLORSPACE_RGB, 0, TRUE, FALSE );

           return count( $hQuantized->getImageHistogram() ) > self::HISTOGRAM_SIZE_THRESHOLD;
         }
         else
           error_log( "'$sImagePath' is not a valid image." );
       }
       catch( Exception $e )
       {
         error_log( $e->getMessage() );
       }

       $hImagick->clear( );
       $hImagick->destroy( );

     }
     else
       error_log( 'Imagick not installed.' );

     return TRUE;
    }

    So basically what i'm doing is capture 1 to MAX_FRAME_CHECKING frames, check their color histogram and when i find something with much colors than my minimum threshold i break the loop and return that frame.

    Is there a way to do this natively with ffmpeg ?

    Thanks

  • Building FFMPEG library for iOS6.0 ARMv7 Processor

    15 août 2013, par Jimmy

    WARNING :

    I was just informed by another user that there are some legal issues revolving around using FFMPEG for iOS, leaving the link here http://multinc.com/2009/08/24/compatibility-between-the-iphone-app-store-and-the-lgpl/

    I cleaned up my question a little bit, when I wrote it the first time I was flustered. Now I can be more clear after taking a small break.

    Edit : learned that you have to build for ARMv7, ARMv7s and iOS6.0

    I'm trying to use the FFMPEG library in an XCode 4.5.1 project. And I'm trying to build it for ARMv7. What I'm looking for is the exact process, and some explanation. I understand that this is not a well documented problem. But I know that other pople have had the same problem as me.

    What I have been able to do.

    I have been able to build the library for testing.

    1) I have been able to clone ffmpeg. For beginners this will get you started by creating a directory with the ffmpeg source. (Kudos to the guys who wrote it)

    git clone git ://source.ffmpeg.org/ffmpeg.git ffmpeg

    2) I have been able to write a config file that doesn't have any errors. We will go back to this part later. This is the command I attach to ./configure

    ./configure
    —disable-doc
    —disable-ffmpeg
    —disable-ffplay
    —disable-ffserver
    —enable-cross-compile
    —arch=arm
    —target-os=darwin
    —cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2

    —as='gas-preprocessor/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2'

    —sysroot=/applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk

    —cpu=cortex-a8
    —extra-ldflags='-arch=armv7 -isysroot /applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk'
    —enable-pic —disable-bzlib —disable-gpl —disable-shared —enable-static —disable-mmx —disable-debug —disable-neon —extra-cflags='-pipe -Os -gdwarf-2 -isysroot /applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
    -m$thumb_opt :-no-thumb -mthumb-interwork'

    These are some things to note.

    • I had to download ( https://github.com/yuvi/gas-preprocessor ) copy the file gas-preprocessor.pl at /usr/local/bin. Set permissions to read write (777)
    • Make sure I'm using the right GCC compiler : /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2
    • Make sure I'm using the right SDK : /applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk
    • —extra-cflags="-arch armv7" causes : error : unrecognized command line option “-arch”

    Here in lies the problem.

    I can include the library like so

    libavcodec/avcodec.h

    But when I started to write the encoder. I received this warning, and countless errors.

    ignoring file /Users/Jimmy/Development/source.ffmpeg/Library/libavutil.a, file was built for archive which is not the architecture being linked (armv7s) : /Users/Jimmy/Development/source.ffmpeg/Library/libavutil.a

    That means that I didn't build the right binary.

    What I'm looking for is someone whose done it before, to walk all of us through the process of building FFMPEG for iOS6.0 and ARMv7 and the majority of things to look out for. Thanks a ton.