
Recherche avancée
Autres articles (85)
-
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 ;
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
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 ) (...)
Sur d’autres sites (9427)
-
FFmpeg : Audio Filter taking too long
29 novembre 2018, par Prashant_SarinI am using the code below to apply a volume filter in ffmpeg, but it is taking too long. A 5-minute audiofile filter takes 3 minutes. Can someone give advice on how I can speed it up.
My command is :
var command = "-i $audioPath -af volume=enable='between(t,5,10)+between(t,15,20)':volume=0.25:eval=frame $outputFile"
Logs are :
2018-11-29 16:58:22.487 23387-23387/com.example.prashants.ffmpegtest D/com.example.prashants.ffmpegtest.service.AudioOverlayService: onProgress - ---AudioVolume---- size= 1537kB time=00:01:40.41 bitrate= 125.4kbits/s speed=1.13x
2018-11-29 16:58:22.489 23387-23387/com.example.prashants.ffmpegtest D/com.example.prashants.ffmpegtest.service.AudioOverlayService: onProgress ----AudioVolume---- video:0kB audio:1518kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.260607%
2018-11-29 16:58:22.490 23387-23387/com.example.prashants.ffmpegtest D/com.example.prashants.ffmpegtest.service.AudioOverlayService: onProgress ----AudioVolume---- bench: utime=86.707s
2018-11-29 16:58:22.491 23387-23387/com.example.prashants.ffmpegtest D/com.example.prashants.ffmpegtest.service.AudioOverlayService: onProgress ----AudioVolume---- bench: maxrss=65792kB
2018-11-29 16:58:22.492 23387-23387/com.example.prashants.ffmpegtest D/com.example.prashants.ffmpegtest.service.AudioOverlayService: onProgress ----AudioVolume---- [aac @ 0xb1ce4400] Qavg: 17415.965
2018-11-29 16:58:22.493 23387-23387/com.example.prashants.ffmpegtest D/com.example.prashants.ffmpegtest.service.AudioOverlayService: AudioVolume success--------- -benchmark -threads 4 -i /storage/emulated/0/FFmpegTest/looped.m4a -af volume=enable='between(t,5,10)+between(t,15,20)':volume=0.25:eval=frame
/storage/emulated/0/FFmpegTest/filtered_audio.m4a -
Video duration is the double of what it should be
12 juin 2019, par lulasI was trying to record my computer screen, for that I am using Accord.
I had everything working fine with the Accord version 3.8.0.0, but when I upgraded to the version 3.8.2.0-alpha my recording videos are slow down, and they take approximately the double to finish.
So a 10 second video actually takes 20 seconds to play (in the video player the duration of the video is also 10 seconds).
I searched in google and didn’t managed to find anything usefull. Probably due to the alpha version of the release.
I managed to find a project from one of the maintainers of the Accord project that uses this 3.8.2.0-alpha version : https://github.com/cesarsouza/screencast-capture
I downloaded the zip file, extracted the project, built the project, fixed a compilation error (change a
Dispose()
toStop()
) and then ran the application, but the problem still exists... the generated video files are still slow down...The main methods of my code with the 3.8.2.0-alpha version are these (they were taken from the previous project I downloaded) :
public void StartRecording()
{
if (IsRecording || !IsPlaying)
return;
int height = area.Height;
int width = area.Width;
Rational framerate = new Rational(1000, screenStream.FrameInterval);
int videoBitRate = 1200 * 1000;
OutputPath = Path.Combine(main.CurrentDirectory, fileName);
RecordingStartTime = DateTime.MinValue;
videoWriter = new VideoFileWriter();
videoWriter.BitRate = videoBitRate;
videoWriter.FrameRate = framerate;
videoWriter.Width = width;
videoWriter.Height = height;
videoWriter.VideoCodec = VideoCodec.H264;
videoWriter.VideoOptions["crf"] = "18";
videoWriter.VideoOptions["preset"] = "veryfast";
videoWriter.VideoOptions["tune"] = "zerolatency";
videoWriter.VideoOptions["x264opts"] = "no-mbtree:sliced-threads:sync-lookahead=0";
videoWriter.Open(OutputPath);
HasRecorded = false;
IsRecording = true;
}
void VideoPlayer_NewFrameReceived(object sender, Accord.Video.NewFrameEventArgs eventArgs)
{
DateTime currentFrameTime = eventArgs.CaptureFinished;
// Encode the last frame at the same time we prepare the new one
Task.WaitAll(
Task.Run(() =>
{
lock (syncObj) // Save the frame to the video file.
{
if (IsRecording)
{
if (RecordingStartTime == DateTime.MinValue)
RecordingStartTime = DateTime.Now;
TimeSpan timestamp = currentFrameTime - RecordingStartTime;
if (timestamp > TimeSpan.Zero)
videoWriter.WriteVideoFrame(this.lastFrame, timestamp, this.lastFrameRegion);
}
}
}),
Task.Run(() =>
{
// Adjust the window according to the current capture
// mode. Also adjusts to keep even widths and heights.
CaptureRegion = AdjustWindow();
// Crop the image if the mode requires it
if (CaptureMode == CaptureRegionOption.Fixed ||
CaptureMode == CaptureRegionOption.Window)
{
crop.Rectangle = CaptureRegion;
eventArgs.Frame = croppedImage = crop.Apply(eventArgs.Frame, croppedImage);
eventArgs.FrameSize = crop.Rectangle.Size;
}
//// Draw extra information on the screen
bool captureMouse = Settings.Default.CaptureMouse;
bool captureClick = Settings.Default.CaptureClick;
bool captureKeys = Settings.Default.CaptureKeys;
if (captureMouse || captureClick || captureKeys)
{
cursorCapture.CaptureRegion = CaptureRegion;
clickCapture.CaptureRegion = CaptureRegion;
keyCapture.Font = Settings.Default.KeyboardFont;
using (Graphics g = Graphics.FromImage(eventArgs.Frame))
{
g.CompositingQuality = CompositingQuality.HighSpeed;
g.SmoothingMode = SmoothingMode.HighSpeed;
float invWidth = 1; // / widthScale;
float invHeight = 1; // / heightScale;
if (captureMouse)
cursorCapture.Draw(g, invWidth, invHeight);
if (captureClick)
clickCapture.Draw(g, invWidth, invHeight);
if (captureKeys)
keyCapture.Draw(g, invWidth, invHeight);
}
}
})
);
// Save the just processed frame and mark it to be encoded in the next iteration:
lastFrame = eventArgs.Frame.Copy(lastFrame);
lastFrameRegion = new Rectangle(0, 0, eventArgs.FrameSize.Width, eventArgs.Frame.Height);
}Anyone knows what might be problem causing this slow down ?
EDIT :
I think I managed to find my problem :
pts:4.032000e+003 pts_time:0.252 dts:2.016000e+003 dts_time:0.126 duration:6.720000e+002 duration_time:0.042 stream_index:0
pts:6.720000e+003 pts_time:0.42 dts:3.360000e+003 dts_time:0.21 duration:6.720000e+002 duration_time:0.042 stream_index:0
pts:1.075200e+004 pts_time:0.672 dts:5.376000e+003 dts_time:0.336 duration:6.720000e+002 duration_time:0.042 stream_index:0
pts:1.344000e+004 pts_time:0.84 dts:6.720000e+003 dts_time:0.42 duration:6.720000e+002 duration_time:0.042 stream_index:0
pts:1.612800e+004 pts_time:1.008 dts:8.064000e+003 dts_time:0.504 duration:6.720000e+002 duration_time:0.042 stream_index:0
pts:1.881600e+004 pts_time:1.176 dts:9.408000e+003 dts_time:0.588 duration:6.720000e+002 duration_time:0.042 stream_index:0
pts:2.150400e+004 pts_time:1.344 dts:1.075200e+004 dts_time:0.672 duration:6.720000e+002 duration_time:0.042 stream_index:0
pts:2.553600e+004 pts_time:1.596 dts:1.276800e+004 dts_time:0.798 duration:6.720000e+002 duration_time:0.042 stream_index:0
pts:2.822400e+004 pts_time:1.764 dts:1.411200e+004 dts_time:0.882 duration:6.720000e+002 duration_time:0.042 stream_index:0
pts:3.091200e+004 pts_time:1.932 dts:1.545600e+004 dts_time:0.966 duration:6.720000e+002 duration_time:0.042 stream_index:0
pts:3.494400e+004 pts_time:2.184 dts:1.747200e+004 dts_time:1.092 duration:6.720000e+002 duration_time:0.042 stream_index:0
pts:3.897600e+004 pts_time:2.436 dts:1.948800e+004 dts_time:1.218 duration:6.720000e+002 duration_time:0.042 stream_index:0
pts:4.166400e+004 pts_time:2.604 dts:2.083200e+004 dts_time:1.302 duration:6.720000e+002 duration_time:0.042 stream_index:0
pts:4.704000e+004 pts_time:2.94 dts:2.352000e+004 dts_time:1.47 duration:6.720000e+002 duration_time:0.042 stream_index:0
pts:5.107200e+004 pts_time:3.192 dts:2.553600e+004 dts_time:1.596 duration:6.720000e+002 duration_time:0.042 stream_index:0The PTS is always the double of DTS, that’s why the video is presented in a slow down way.
Unfortunately I have no idea why this happens... Anyone has any clue ?
-
windows CMD send CRLF inside double quote
23 octobre 2022, par uingteaI want to pass multiple headers for ffplay or ffmpeg, it say I need to split with CRLF. on linux I can use
\
or$'\r\n'
but how for windows ?


SET CRLF=^
ffplay -v debug -i "http://example.com/test" -headers "Accept-Language: en-US,en;q=0.5%CRLF%Connection: keep-alive"




debug log :
Connection: keep-alive
is not sent


[http @ 04df3f40] No trailing CRLF found in HTTP header.
[http @ 04df3f40] request: GET /test HTTP/1.1 0KB sq= 0B f=0/0
User-Agent: Lavf/57.37.101
Accept: */*
Range: bytes=0-
Connection: close
Host: example.com
Icy-MetaData: 1
Accept-Language: en-US,en;q=0.5




thanks