
Recherche avancée
Médias (1)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
Autres articles (98)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (6802)
-
What could be causing processes to be left behind ?
11 novembre 2015, par AlexI’m using the
Process
class to spawn a process (in particular, I’m usingffmpeg.exe
to convert some video files). Thisffmpeg
process spawns more processes (on my computer, the total is 4, I’m guessing one per CPU core ?). If it matters, I’m doing this in a Windows service, although the problem also occurs when just debugging in Visual Studio, so I don’t think it does matter.The main
ffmpeg
process runs as expected and exits, causing theWaitForExit()
call to return. Except, unlike when run normally (i.e. in a command prompt), the three processes that were spawned hang around. And they keep hanging around until the process that spawned the originalffmpeg.exe
process (i.e. my service) is ended.Any ideas what this could be about ?
My `ProcessStartInfo looks like this :
_processStartInfo = new ProcessStartInfo(process, string.Join(" ", parameters))
{
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardOutput = true,
RedirectStandardError = true
};I launch the
Process
like this :_process = Process.Start(_processStartInfo);
_outputReceivedHandler = (sender, e) =>
{
if (OutputData != null) OutputData(e.Data);
};
_process.OutputDataReceived += _outputReceivedHandler;
_errorReceivedHandler = (sender, e) =>
{
if (ErrorData != null) ErrorData(e.Data);
};
_process.ErrorDataReceived += _errorReceivedHandler;
_exitHandler = (sender, e) =>
{
if (Exited != null) Exited();
};
_process.EnableRaisingEvents = true;
_process.Exited += _exitHandler;
_process.Start();
_process.BeginOutputReadLine();
_process.BeginErrorReadLine();If it’s relevant,
OutputData
,ErrorData
andExited
areAction<string></string>
,Action<string></string>
andAction
, respectively.The reason I’m keeping the various handlers around is so that I can do this :
private bool _disposed;
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (_disposed || !disposing) return;
if (_outputReceivedHandler != null) _process.OutputDataReceived -= _outputReceivedHandler;
if (_errorReceivedHandler != null) _process.ErrorDataReceived -= _errorReceivedHandler;
if (_exitHandler != null) _process.Exited -= _exitHandler;
if (_process != null) _process.Dispose();
_disposed = true;
}Though it hasn’t made a difference whether or not I use
Dispose()
, the problem still occurs. -
What the correct args for ffmpeg conversion
8 novembre 2013, par Andrew SimpsonI have a C# app. I am using ffmpge to convert jpgs to an OGG file. I use the process class to write to a stream buffer within my app using piping without having to write the ogg file to a disk. I then upload these bytes to my server where it is written to the hard drive.
On the server side I want to convert it to say an mp4 format. Again, I want to pipe it out to a stream buffer and allow my User to download the file.
This is my code :
Process _serverBuild = null ;
public byte[] EncodeAndUploadImages(string _args1)
{
byte[] _data = null;
try
{
_args1 = "ffmpeg.exe -i \"c:\\Cloud\\Zipped\\000EC902F17F\\f3e45e44-b61c-472b-8dc1-a8e9b9511497_00007.ogg\" avi -";
_serverBuild = new Process();
_serverBuild.StartInfo.WorkingDirectory = Environment.CurrentDirectory;
_serverBuild.StartInfo.Arguments = _args1;
_serverBuild.StartInfo.FileName = @"C:\inetpub\wwwroot\bin\ffmpeg.exe";
_serverBuild.StartInfo.UseShellExecute = false;
_serverBuild.StartInfo.RedirectStandardOutput = true;
_serverBuild.StartInfo.RedirectStandardError = true;
_serverBuild.StartInfo.RedirectStandardInput = true;
_serverBuild.StartInfo.CreateNoWindow = true;
_serverBuild.StartInfo.LoadUserProfile = false;
_serverBuild.ErrorDataReceived += _server_ErrorDataReceived;
_serverBuild.OutputDataReceived += _server_OutputDataReceived;
_serverBuild.Exited += new EventHandler(_server_Exited);
_serverBuild.EnableRaisingEvents = true;
_serverProcessHasFinished = false;
_serverBuild.Start();
mStandardOutput = _serverBuild.StandardOutput.BaseStream;
mStandardOutput.BeginRead(mReadBuffer, 0, mReadBuffer.Length, StandardOutputReadCallback, null);
_serverBuild.WaitForExit();
}
catch (Exception _ex)
{
}
finally
{
_serverBuild.ErrorDataReceived -= _server_ErrorDataReceived;
_serverBuild.OutputDataReceived -= _server_OutputDataReceived;
_serverBuild.Dispose();
}
return _data;
}
byte[] mReadBuffer = new byte[4096];
MemoryStream mStandardOutputMs = new MemoryStream();
Stream mStandardOutput;
private void StandardOutputReadCallback(IAsyncResult ar)
{
try
{
int numberOfBytesRead = mStandardOutput.EndRead(ar);
{
mStandardOutputMs.Write(mReadBuffer, 0, numberOfBytesRead);
mStandardOutput.BeginRead(mReadBuffer, 0, mReadBuffer.Length, StandardOutputReadCallback, null);
}
}
catch (Exception _ex)
{
}
}The error I get (when I test with a bat file and run within a DOS prompt) is :
Obviously my parameters are at fault. I want to keep it simple as I may want to use other formats apart from MP4.
Thanks
-
Windows python can't pass system variables [duplicate]
14 mai 2016, par Soner BThis question already has an answer here :
I can cut video ffmpeg command prompt like this :
ffmpeg -ss 00:41:12.200 -i "the_video.mp4" -t 00:00:03.100 -c:v
libx264 -preset slow -profile:v high -crf 21 "the_video_cut.mp4" -yffmpeg.exe is in C :\Windows\System32
But I try with python.
import subprocess as sp
CRF_VALUE = '21'
PROFILE = 'high'
PRESET = 'slow'
cmd = ['ffmpeg', '-ss', '%s'%start_time, '-i', '"%s"'%inputFile, '-t', '%s'%diffTime, '-c:v', 'libx264', '-preset', PRESET, '-profile:v', PROFILE, '-crf', CRF_VALUE, '"%s_cut.%s"'%('_'.join(file_strip[:-1]),file_strip[-1]), '-y']
sp.call(' '.join(cmd))Error message :
Traceback (most recent call last):
File "test.py", line 81, in <module>
main(sys.argv[1:])
File "test.py", line 76, in main
isle(inputFile, start_time, diffTime)
File "test.py", line 48, in isle
sp.call(' '.join(cmd))
File "C:\Program Files (x86)\Python35-32\lib\subprocess.py", line 560, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Program Files (x86)\Python35-32\lib\subprocess.py", line 950, in __init__
restore_signals, start_new_session)
File "C:\Program Files (x86)\Python35-32\lib\subprocess.py", line 1220, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] Sistem belirtilen dosyayı bulamıyor
</module>with try
sp.call(' '.join(cmd), shell=True)
This error message :
’ffmpeg’ is not recognized as an internal or external command,
operable program or batch file.If i copy ffmpeg.exe in the same folder test.py, it’s okey, working.