
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (105)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains 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, parPré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, parChaque 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 DelsonI’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 :
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 speedlossThough 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 user1765862I'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;
 ...
 public class MyController : ControllerBase
 {
 public async Task<string> Get()
 { 
 await FFMpegArguments
 .FromPipeInput(new StreamPipeSource(myfile))
 .OutputToPipe(new StreamPipeSink(outputStream), options => options
 .WithVideoCodec("vp9")
 .ForceFormat("webm"))
 .ProcessAsynchronously();
 ...
 } 
 }
</string>


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

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



Update #2
This is my complete 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 \
 && 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 .



-
OSError : [WinError 126] Não foi possível encontrar o módulo especificado. Error loading [closed]
27 août 2024, par FelipesInformações relevantes


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


Tudo isso dentro de um ambiente virtual
**


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


import whisper
import os

# Carregar o modelo
model = whisper.load_model("base") # Pode usar 'small', 'medium', 'large' conforme a necessidade

# Carregar o áudio
audio_path = "audio.mp3" # Substitua pelo caminho do arquivo de áudio extraído
result = model.transcribe(audio_path)

# Obter o texto da transcrição
transcription_text = result['text']

# Salvar a transcrição em um arquivo .txt
with open("transcription.txt", "w") as file:
 file.write(transcription_text)

print("Transcrição salva em 'transcription.txt'")



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


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


É 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.


PS : o msm codigo rodou perfeitamente no Debian 12


Verifiquei o ambiente virtual, reistalei tudo