Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP

Autres articles (105)

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

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

Sur d’autres sites (8600)

  • Picturebox from AForge FFMPEG empty - C#/WinForms

    1er août 2017, par Jake Delson

    I’ve done a ton of research and looked at a lot of questions here but can’t seem to find anything to help me. I should preface I’m very new to C#, Windows Forms, and SO ! I’m a 1st year CompSci student coming from C++ experimenting with my own projects for the summer. I’m trying to display a series of bitmaps from a .avi using the AForge.Video.FFMPEG video file reader.

    It seems to be finding the file, getting its’ data (console prints dimensions, framerate, and codec) and creating the picturebox, but the picturebox comes up blank/empty. I get the bitmap from the frames of a .avi :

    From AForge example code here

    Then I’m trying to display it with a picture box :

    From MS example code here as well

    And here’s my code. Essentially a combination of the two :

       public class Simple : Form
    {
       Bitmap videoFrame;

       public Simple()
       {
           try
           {
               // create instance of video reader
               VideoFileReader reader = new VideoFileReader();
               // open video file
               reader.Open(@"C:\Users\User\Desktop\ScanTest3.AVI");
               // check some of its attributes
               Console.WriteLine("width:  " + reader.Width);
               Console.WriteLine("height: " + reader.Height);
               Console.WriteLine("fps:    " + reader.FrameRate);
               Console.WriteLine("codec:  " + reader.CodecName);

               PictureBox pictureBox1 = new PictureBox();

               // read 100 video frames out of it
               for (int i = 0; i < 100; i++)
               {
                   videoFrame = reader.ReadVideoFrame();

                   pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
                   pictureBox1.ClientSize = new Size(videoFrame.Width, videoFrame.Height);
                   pictureBox1.Image = videoFrame;

                   // dispose the frame when it is no longer required
                   videoFrame.Dispose();
               }

               reader.Close();
           }

           catch
           {
               Console.WriteLine("Nope");
           }

       }
    }

    class MApplication
    {
       public static void Main()
       {
           Application.Run(new Simple());
       }
    }

    So that’s it pretty much. Just a blank picture box coming up, when it should have the first frame of the video, even though no exception caught (though I’m pretty confident I’m using the try/catch very poorly), and the console printing the correct data for the file :

    width:  720
    height: 480
    fps:    29
    codec:  dvvideo
    [swscaler @ 05E10060] Warning: data is not aligned! This can lead to a speedloss

    Though if anyone could tell me what that warning means, that would be great as well, but I’m mainly just lost as to why there’s no picture printing to the screen.

    Thanks !

  • Package is installed inside docker but actual command provide exception

    1er juin 2022, par user1765862

    I'm trying to use ffmpeg core package inside .net 6 dockerized project. I install ffmpeg core inside Dockerfile, reference actual package FFMpegCore inside solution but when I try to apply any of the commands from the ffmpeg core lib I'm getting error

    


    


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

    


    


    Docker build is done with no error.

    


    Dockerfile

    


    FROM public.ecr.aws/lambda/dotnet:6 AS base
....
RUN apt-get install -y ffmpeg
....
FROM base AS final
WORKDIR /var/task
COPY --from=publish /app/publish .


    


    As per ffmpeg core docs in order to use ffmpeg I need to set its binary folder, so I add ffmpeg.config.json

    


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


    


    Actual error is being thrown when I try to execute following command

    


    


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

    


    


    This is the place where error gets triggered

    


     using FFMpegCore;&#xA; ...&#xA; 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;

    Update :&#xA;After changing BinaryFolder location to /usr/bin I'm getting following error

    &#xA;

    An error occurred trying to start process &#x27;/usr/bin/ffmpeg&#x27; with working directory &#x27;/var/task&#x27;. No such file or directory&#xA;

    &#xA;

    Update #2&#xA;This is my complete Dockerfile

    &#xA;

    FROM public.ecr.aws/lambda/dotnet:6 AS base&#xA;&#xA;FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim as build&#xA;WORKDIR /src&#xA;COPY ["AWSServerless.csproj", "AWSServerless/"]&#xA;RUN dotnet restore "AWSServerless/AWSServerless.csproj"&#xA;&#xA;WORKDIR "/src/AWSServerless"&#xA;COPY . .&#xA;RUN dotnet build "AWSServerless.csproj" --configuration Release --output /app/build&#xA;&#xA;FROM build AS publish   &#xA;&#xA;RUN apt-get update \&#xA;    &amp;&amp; apt-get install -y apt-utils libgdiplus libc6-dev \&#xA;    &amp;&amp; apt-get install -y ffmpeg&#xA;&#xA;RUN dotnet publish "AWSServerless.csproj" \&#xA;            --configuration Release \ &#xA;            --runtime linux-x64 \&#xA;            --self-contained false \ &#xA;            --output /app/publish \&#xA;            -p:PublishReadyToRun=true  &#xA;&#xA;FROM base AS final&#xA;WORKDIR /var/task&#xA;&#xA;CMD ["AWSServerless::AWSServerless.LambdaEntryPoint::FunctionHandlerAsync"]&#xA;COPY --from=publish /app/publish .&#xA;

    &#xA;

  • OSError : [WinError 126] Não foi possível encontrar o módulo especificado. Error loading [closed]

    27 août 2024, par Felipes

    Informações relevantes

    &#xA;

    **&#xA;SO : Windowns 11&#xA;Dependencias : torch —extra-index-url https://download.pytorch.org/whl/cpu ;&#xA;openai-whisper ;&#xA;ffmpeg-python&#xA;Microsoft Visual C++ Redistributable

    &#xA;

    Tudo isso dentro de um ambiente virtual&#xA;**

    &#xA;

    Então... eu to com o seguinte codigo em python :

    &#xA;

    import whisper&#xA;import os&#xA;&#xA;# Carregar o modelo&#xA;model = whisper.load_model("base")  # Pode usar &#x27;small&#x27;, &#x27;medium&#x27;, &#x27;large&#x27; conforme a necessidade&#xA;&#xA;# Carregar o &#xE1;udio&#xA;audio_path = "audio.mp3"  # Substitua pelo caminho do arquivo de &#xE1;udio extra&#xED;do&#xA;result = model.transcribe(audio_path)&#xA;&#xA;# Obter o texto da transcri&#xE7;&#xE3;o&#xA;transcription_text = result[&#x27;text&#x27;]&#xA;&#xA;# Salvar a transcri&#xE7;&#xE3;o em um arquivo .txt&#xA;with open("transcription.txt", "w") as file:&#xA;    file.write(transcription_text)&#xA;&#xA;print("Transcri&#xE7;&#xE3;o salva em &#x27;transcription.txt&#x27;")&#xA;

    &#xA;

    Basicamente é pegar um arquivo .mp3 e salvar a transcrisão no em arquivo txt&#xA;mas ao rodar o codigo eu recebo o seguinte erro :

    &#xA;

    Traceback (most recent call last):&#xA;  File "C:\Users\Felipe Bezerra\Documents\ytDownload\transcrisao.py", line 2, in <module>&#xA;    import whisper&#xA;  File "C:\Users\Felipe Bezerra\Documents\ytDownload\venv\Lib\site-packages\whisper\__init__.py", line 8, in <module>&#xA;    import torch&#xA;  File "C:\Users\Felipe Bezerra\Documents\ytDownload\venv\Lib\site-packages\torch\__init__.py", line 148, in <module>&#xA;    raise err&#xA;OSError: [WinError 126] N&#xE3;o foi poss&#xED;vel encontrar o m&#xF3;dulo especificado. Error loading "C:\Users\Felipe Bezerra\Documents\ytDownload\venv\Lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.&#xA;</module></module></module>

    &#xA;

    É como se as dependências não estivecem instaladas, já verifiquei a variavél de ambiente, criei outro ambiente virtual, e sempre caio nesse mesmo erro.

    &#xA;

    PS : o msm codigo rodou perfeitamente no Debian 12

    &#xA;

    Verifiquei o ambiente virtual, reistalei tudo

    &#xA;