Recherche avancée

Médias (91)

Autres articles (10)

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

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

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

Sur d’autres sites (3178)

  • How to set a timeout for FFmpegFrameGrabber grab() method in JavaCV

    18 janvier 2019, par Null Pointer

    I’m trying to create a player in Java using JavaCV. But .grab() method takes different amounts of time for each grab. How can I discard a grab() operation when it takes too much time ?

    In detail : I’m working on a project to display rtsp streams. To do this, I use JavaCV and its FFmpegFrameGrabber class. Inside a loop I call its .grab() method to grab frames and then I print them on a panel.
    (Not knowing the reason) grab() method takes much more time in some calls. For example :

    1. grab : 15ms,
    2. grab : 13ms,
    3. grab : 14ms,
    4. grab : 95ms,
    5. grab : 12ms, ...

    I wish not to wait for a grab, in case it is taking too long like in this fourth call.

    (Sorry for not providing a working code, it’s all over different huge classes)

    I use the following grabber options (selected by some other colleague) :

    grabber.setImageHeight(480);
    grabber.setImageWidth(640);
    grabber.setOption("reconnect", "1");
    grabber.setOption("reconnect_at_eof", "1");
    grabber.setOption("reconnect_streamed", "1");
    grabber.setOption("reconnect_delay_max", "2");
    grabber.setOption("preset", "veryfast");
    grabber.setOption("probesize", "192");
    grabber.setOption("tune", "zerolatency");
    grabber.setFrameRate(30.0);
    grabber.setOption("buffer_size", "" + this.bufferSize);
    grabber.setOption("max_delay", "500000");
    grabber.setOption("stimeout", String.valueOf(6000000));
    grabber.setOption("loglevel", "quiet");
    grabber.start();

    Also I tried to do the grab() in another thread and not wait for that to end in case it takes too long. But this time I get an EXCEPTION_ACCESS_VIOLATION when I call .grab() method before the previous one did not end yet. "Calling .release() ; and .restart() ; methods before trying to grab again" also did not solve the access violation.

    Is there a setting option to cancel unordinarily long grabs ? (Or wouldn’t it work without these frames (because of a reason that I don’t know))

    Thanks

  • Working directory in Dockerfile is not what is expected to be

    31 mai 2022, par user1765862

    I have following Dockerfile

    


    FROM public.ecr.aws/lambda/dotnet:6 AS base

FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim as build
WORKDIR /src
COPY ["AWSServerless.csproj", "AWSServerless/"]
RUN dotnet restore "AWSServerless/AWSServerless.csproj"

WORKDIR "/src/AWSServerless"
COPY . .
RUN dotnet build "AWSServerless.csproj" --configuration Release --output /app/build

FROM build AS publish

RUN apt-get update && apt-get install -y apt-utils libgdiplus libc6-dev

RUN apt-get install -y ffmpeg

RUN dotnet publish "AWSServerless.csproj" \
            --configuration Release \ 
            --runtime linux-x64 \
            --self-contained false \ 
            --output /app/publish \
            -p:PublishReadyToRun=true  

FROM base AS final
WORKDIR /var/task

CMD ["AWSServerless::AWSServerless.LambdaEntryPoint::FunctionHandlerAsync"]
COPY --from=publish /app/publish .


    


    As per ffmpeg docs In order to use ffmpeg I need to set its binary folder
for example with

    


    {
  "BinaryFolder": "/var/task",
  "TemporaryFilesFolder": "/tmp"
}


    


    Error

    


    


    An error occurred trying to start process './ffmpeg' with working
directory '/var/task'. No such file or directory

    


    


    What is the working directory here ?

    


    Update :
Actual error is being thrown when I try to execute following command (FFMpegCore package) from my api controller

    


    public class MyController : ControllerBase&#xA;{&#xA;    public async Task<string> Get()&#xA;    {    &#xA;         await FFMpegArguments&#xA;               .FromPipeInput(new StreamPipeSource(myfile))&#xA;               .OutputToPipe(new StreamPipeSink(outputStream), options => options&#xA;                  .WithVideoCodec("vp9")&#xA;                  .ForceFormat("webm"))&#xA;                  .ProcessAsynchronously();&#xA;         ...&#xA;    }    &#xA;}&#xA;</string>

    &#xA;

  • Cannot find the class in php oop [duplicate]

    30 décembre 2018, par mr stark

    This question already has an answer here :

    I’m trying to make a class for video streaming with FFMpeg Php package.

    I’m getting this error on browser :

    Fatal error : Uncaught Error : Class ’Classes\Video’ not found in C :\xampp\htdocs\php\index.php:5 Stack trace : #0 main thrown in C :\xampp\htdocs\php\index.php on line 5

    this is my index.php :

     use Classes\Video;

     $video = new Video();

     $video->videoStreaming("video.mp4",320,240,"myVideo","WMV");

    and Video in Classes directory :

       namespace Classes;
       use FFMpeg\Coordinate\Dimension;
       use FFMpeg\FFMpeg;
       use FFMpeg\Format\Video\WMV;
       require "../vendor/autoload.php";

       class Video
       {
           private $ffmpeg;
           private $video;

    public function __construct()
    {
       $this->ffmpeg = FFMpeg::create([
           'ffmpeg.binaries' => 'C:\ffmpeg\ffmpeg.exe',
           'ffprobe.binaries' => 'C:\ffmpeg\ffprobe.exe',
           'timeout' => 3600,
           'ffmpeg.threads' => 12,
       ]);
    }

    public function videoStreaming($videoPath,$width,$height,$newName,$newExtension)
    {
       $this->video = $this->ffmpeg->open($videoPath);
       if ($width &amp;&amp; $height) {
           $this->video->filters()->resize(new Dimension($width,$height))->synchronize();
       }
       $this->video->save(new WMV(), $newName . $newExtension);
    }

       }