
Recherche avancée
Médias (1)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (58)
-
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...) -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Encodage et transformation en formats lisibles sur Internet
10 avril 2011MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)
Sur d’autres sites (5981)
-
Running an FFprobe process in Xcode to return file duration data
24 octobre 2019, par NCrusherUsing this example, I was able to create a process to run ffmpeg from the main resource bundle of a MacOS app. The fact that I was able to get it to work, however, was really dumb luck.
But now I need to be able to do something similar with ffprobe, along the lines of what is discussed in this post, to get the duration of an audio file in order to trim a set number of seconds off the end of it, using these arguments :
ffprobe -v 0 -show_entries format=duration -of compact=p=0:nk=1 input.m4b
But I don’t know how to implement it. This is basically what I want to accomplish :
func insertTrimArguments() {
conversionSelection()
if trimStartEndClipsCheckbox.state == .on {
ffmpegArguments.insert(contentsOf: ["-ss", "00:00:02.000", /*"-t", "duration minus 4.2secs"]*/, at: 3)
}
else {
}
}I haven’t been coding in Swift long and processes are entirely new for me and not something that was ever covered in any of the "fundamentals" tutorials I studied before I began my project. Taking the monkey-see/monkey-do approach from the first example I linked, I can sort of make a start imitating it for my ffprobe function, but I have no idea if I’m doing it right or where to go with it from here.
This is all I have so far.
// get file duration and subtract 4.2 seconds if "trim audible clips is enabled, then insert additional arguments into conversionSelection arrays
func getFileDuration() {
guard let ffprobePath = Bundle.main.path(forResource: "ffprobe", ofType: "") else { return }
do {
let ffprobeTask: Process = Process()
ffprobeTask.launchPath = ffprobePath
ffprobeTask.arguments = [
"-v", "error",
"-show_entries",
"format=duration", "-of",
"compact=p=0:nk=1",
"\(inputFilePath)"]
ffprobeTask.standardInput = FileHandle.nullDevice
ffprobeTask.launch()
ffprobeTask.waitUntilExit()
}
}How do I adapt this process so that instead of converting and outputing a new file, it returning the duration of the input file so that I can do the necessary math and include it in my arguments ?
-
fftools/ffmpeg_mux_init : only process -enc_time_base if the stream is encoded
28 mai 2023, par Anton Khirnov -
.NET Process - Redirect stdin and stdout without causing deadlock
21 juillet 2017, par user1150856I’m trying to encode a video file with FFmpeg from frames generated by my program and then redirect the output of FFmpeg back to my program to avoid having an intermediate video file.
However, I’ve run into what seems to be a rather common problem when redirecting outputs in System.Diagnostic.Process, mentioned in the remarks of the documentation here, which is that it causes a deadlock if run synchronously.
After tearing my hair out over this for a day, and trying several proposed solutions found online, I still cannot find a way to make it work. I get some data out, but the process always freezes before it finishes.
Here is a code snippet that produces said problem :
static void Main(string[] args)
{
Process proc = new Process();
proc.StartInfo.FileName = @"ffmpeg.exe";
proc.StartInfo.Arguments = String.Format("-f rawvideo -vcodec rawvideo -s {0}x{1} -pix_fmt rgb24 -r {2} -i - -an -codec:v libx264 -preset veryfast -f mp4 -movflags frag_keyframe+empty_moov -",
16, 9, 30);
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardInput = true;
proc.StartInfo.RedirectStandardOutput = true;
FileStream fs = new FileStream(@"out.mp4", FileMode.Create, FileAccess.Write);
//read output asynchronously
using (AutoResetEvent outputWaitHandle = new AutoResetEvent(false))
{
proc.OutputDataReceived += (sender, e) =>
{
if (e.Data == null)
{
outputWaitHandle.Set();
}
else
{
string str = e.Data;
byte[] bytes = new byte[str.Length * sizeof(char)];
System.Buffer.BlockCopy(str.ToCharArray(), 0, bytes, 0, bytes.Length);
fs.Write(bytes, 0, bytes.Length);
}
};
}
proc.Start();
proc.BeginOutputReadLine();
//Generate frames and write to stdin
for (int i = 0; i < 30*60*60; i++)
{
byte[] myArray = Enumerable.Repeat((byte)Math.Min(i,255), 9*16*3).ToArray();
proc.StandardInput.BaseStream.Write(myArray, 0, myArray.Length);
}
proc.WaitForExit();
fs.Close();
Console.WriteLine("Done!");
Console.ReadKey();
}Currently i’m trying to write the output to a file anyway for debugging purposes, but this is not how the data will eventually be used.
If anyone knows a solution it would be very much appreciated.