Recherche avancée

Médias (91)

Autres articles (11)

  • MediaSPIP Init et Diogène : types de publications de MediaSPIP

    11 novembre 2010, par

    À l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
    Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
    Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

Sur d’autres sites (517)

  • How to increase ffmpeg add watermark speed in php-ffmpeg ?

    9 septembre 2020, par Wewillgrow

    I am trying to add watermark in videos of 15-35 seconds duration with 8-10 MB size. The process is taking more than expected time ranging from 30-40 seconds. Here is my code :

    


    

    

    $ffmpeg = FFMpeg\FFMpeg::create(array(
            'ffmpeg.binaries'  => ffmpeg_lib,
            'ffprobe.binaries' => ffprobe_lib,
            'timeout'          => 3600, // The timeout for the underlying process
            'ffmpeg.threads'   => 12,   // The number of threads that FFMpeg should use
        ), null);
        $ffmpeg_string = ffprobe_lib;
        
        
        $tempFile=rand().time();
        $outputFile='tmp/'.$tempFile.'.mp4';
       
        $video = $ffmpeg->open($videoURL);
            
        $watermarkPath = watermark_Path;
        $video
            ->filters()
            ->watermark($watermarkPath, array(
                'position' => 'absolute',
                'x' => 20,
                'y' => 10,
            ));
        $text="@".$username;
        $command = "text='$text': fontcolor=white:fontfile=OpenSans-Bold.ttf: fontsize=18: x=20: y=70:";
        $format = new FFMpeg\Format\Video\X264();
        $format->setAudioCodec("aac");
        
        try
        {
                
                $video->filters()->custom("drawtext=$command");
                $video->save($format, $outputFile);
                
                $array_out = array();
                $array_out[] = 
                array(
                    "download_url" => checkVideoUrl($outputFile)
                );
                
                $output=array( "code" => "200", "msg" => $array_out);
                print_r(json_encode($output, true));
                
        }

    


    


    



    Is I am doing anything wrong with the code ? How speed can be increased ? Any help would be appreciable.

    


  • Documented ffmpeg commands not recognized by ffmpeg

    2 avril 2020, par agconti

    I'm trying to use options like, ldash and http_opts, as the dash muxer docs describe but FFmpeg doesn't recognize them. I'm on the latest released version of ffmpeg, v4.2.2. I see the changes in the ffmpeg master branch but not in the v4.2 release branch. Does ffmpeg not recognize them because they haven't been released yet ?

    



    Here's the dash muxer docs for reference : https://ffmpeg.org/ffmpeg-all.html#dash-2

    



    Here's a minimal example command with uncut output :

    



    Andrews-MacBook-Pro :: dev/test ‹master› » ffmpeg -re -i test.mp4 \                                   
-map 0 -map 0 -c:a libfdk_aac -c:v libx264 \
-b:v:0 800k -b:v:1 300k -s:v:1 320x170 -profile:v:1 baseline \
-profile:v:0 main -bf 1 \
-b_strategy 0 -ar:a:1 22050 \
-adaptation_sets "id=0,streams=v id=1,streams=a" \
-ldash 1 \
-f dash ./output/out.mpd

ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Unrecognized option 'ldash'.
Error splitting the argument list: Option not found


    


  • AccessViolationException in ffmpeg (called from .NET with FFmpeg.AutoGen)

    13 septembre 2022, par zgabi

    I'm trying to "download"/stream an RTSP stream with FFmpeg.Autogen. I receive an AccessViolationException before the actual stream begins.

    


    I tried multiple FFmpeg and FFmpeg.AutoGen version (for example the latest stable FFMpeg version 5.1.1 from gyan.dev site and the latest FFmpeg.Autogen : 5.1.1). I also tried version 4.x (of course both ffmpeg and FFmpeg.AutoGen)

    


    This code works with a lot of Hikvision camera streams, I get the Access Violation with an expensive InfiRay thermal camera. (But anyway if it sends some corrupt data, ffmpeg should not crash.)

    


    My code is (this is only the initialization, since the problem occures there) :

    


    av_log_set_level(AV_LOG_DEBUG);

AVFormatContext* cf = null;

try
{
    cf = avformat_alloc_context();
    if (cf == null)
    {
        throw new Exception("Could not allocate the format context");
    }

    int probeSize = 32768 * 2;
    cf->probesize = probeSize;

    AVDictionary* options = null;
    string probeSizeStr = probeSize.ToString();
    av_dict_set(&options, "analyzeduration", probeSizeStr, 0);
    av_dict_set(&options, "probesize", probeSizeStr, 0);
    av_dict_set(&options, "rtsp_transport", "tcp", 0);

    string url =
        "rtsp://horizontetest:horizontetest@122.5.39.146:7828/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif";
    int ret = avformat_open_input(&cf, url, null, &options);
    if (ret != 0)
    {
        throw new Exception("Could not open the input");
    }

    ret = avformat_find_stream_info(cf, &options);
    Console.WriteLine(probeSizeStr);
    if (ret < 0)
    {
        throw new Exception("Could not find stream info");
    }

    if (cf->streams == null)
    {
        throw new Exception("Could not find stream");
    }
}
finally
{
    if (cf != null)
    {
        avformat_close_input(&cf);
    }
}


    


    Access Violation occures in the avformat_find_stream_info call.