
Recherche avancée
Médias (9)
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (104)
-
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 (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
Sur d’autres sites (11824)
-
C# .net mvc Process return encoding progress (FFMpeg) to client initiated with ajax
19 décembre 2014, par user1585895I am using FFMpeg to encode wav to mp3s, and on completion download the final .zip to the client.
All works great, and I can Debug.WriteLine the progress of the encoding, but I would like to return _percentage back to the client to do some UI updates based on the value of _percentage and if all encoding is done, Im not sure how to approach this.
My thinking is as follows :
- ajax post to CreateAndDownloadAlbum(List trackIds, int productId)
- loop through List and create a new Process, run
— parse StdError to get encoding percentage in myProcess_ErrorData(object source, DataReceivedEventArgs e)
— send _percentage value at timed intervals back to CreateAndDownloadAlbum
— update UI based on value of _percentage, when all is complete break and call public ActionResult SendFileDownload()
Any input would be great.
Thanks !
front end AJAX call to post list of file Ids to download
var data = $('#downloadAlbum').serialize();
$.ajax({
url: "/Admin/CreateAndDownloadAlbum",
method: "POST",
data: data,
dataType: 'json',
success: function(result) {
// wait here for _percentage
// if not 100, call again to get new _percentage value
// if 100, update UI, move to next file being encoded
// if all encoding is complete, call SendFileDownload() in controller
}
});then the controller code
[HttpPost]
public void CreateAndDownloadAlbum(List<trackstodownload> trackIds, int productId)
{
_numTracksToDownload = trackIds.Count;
var product = _productRepository.GetProductById(productId);
var artist = _artistRepository.GetArtistById(product.ArtistId);
var folderGuid = Guid.NewGuid();
_zipFolder = string.Concat(artist.ArtistName.ToUpper().Replace(" ", "_"), "[", product.ProductName.ToUpper().Replace(" ", "_"), "].zip");
_mp3FolderPath = Server.MapPath("/Files/" + productId + "/" + folderGuid);
_zipDownloadPath = Server.MapPath("/Delivery/" + _zipFolder);
if (!Directory.Exists(Server.MapPath("/Files/" + productId + "/" + folderGuid)))
{
Directory.CreateDirectory(Server.MapPath("/Files/" + productId + "/" + folderGuid));
}
foreach (var z in trackIds)
{
var track = _trackRepository.GetTrackById(z.TrackId);
var process = new Process();
var startInfo = new ProcessStartInfo
{
WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden,
FileName = "F:\\Development\\ffmpeg\\ffmpeg.exe",
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false
};
var startFile = Path.Combine("F:\\Development","Files", track.ProductId.ToString(), track.TrackFileName);
var endFile = Path.Combine("F:\\Development", "Files", track.ProductId.ToString(), folderGuid.ToString(), track.TrackFileName.Replace(".wav", ".mp3"));
startInfo.Arguments = "-i " + startFile + " -b:a 320k " + endFile + " -stats";
process.StartInfo = startInfo;
process.EnableRaisingEvents = true;
process.Exited += myProcess_exited;
process.OutputDataReceived += myProcess_OutputData;
process.ErrorDataReceived += myProcess_ErrorData;
try
{
process.Start();
process.BeginOutputReadLine();
process.BeginErrorReadLine();
if (process.HasExited == false)
{
process.WaitForExit();
}
}
catch (Exception)
{
throw;
}
}
SendFileDownload();
}
public ActionResult SendFileDownload()
{
// zip and move to delivery folder
using (var zip = new ZipFile())
{
zip.AddDirectory(_mp3FolderPath, _zipFolder);
zip.Save(_zipDownloadPath);
}
// delete items in temp guid folder
var downloadedMessageInfo = new DirectoryInfo(_mp3FolderPath);
foreach (var f in downloadedMessageInfo.GetFiles())
{
f.Delete();
}
// delete temp folder
Directory.Delete(_mp3FolderPath);
// download file
string file = _zipDownloadPath;
return File(file, "application/force-download", Path.GetFileName(file));
}
public void myProcess_exited(Object source, EventArgs e)
{
Debug.WriteLine("myProcess_exited ===================================");
_duration = new TimeSpan(0, 0, 0);
_frameTime = new TimeSpan(0, 0, 0);
_percentage = 0;
_numEncodedTracks++; // using this to tell me if all tracks have been encoded
}
public void myProcess_OutputData(object source, DataReceivedEventArgs e)
{
}
public void myProcess_ErrorData(object source, DataReceivedEventArgs e)
{
string strMessage = e.Data;
if (!string.IsNullOrEmpty(strMessage) && (strMessage.Contains("Duration: ") || strMessage.Contains("size=")))
{
if (_duration != null)
{
if (strMessage.Contains("Duration: "))
{
_strDuration = strMessage.Substring(strMessage.IndexOf("Duration: ") + ("Duration: ").Length,
("00:00:00.00").Length);
char[] d_delHrMn = new char[] { ':' };
string[] d_tempHrMn = _strDuration.Split(d_delHrMn, StringSplitOptions.RemoveEmptyEntries);
char[] d_delSec = new char[] { '.' };
string[] d_tempSec = d_tempHrMn[2].Split(d_delSec, StringSplitOptions.RemoveEmptyEntries);
var d_hour = d_tempHrMn[0] == "0" ? 0 : Convert.ToInt32(d_tempHrMn[0]);
var d_min = d_tempHrMn[1] == "0" ? 0 : Convert.ToInt32(d_tempHrMn[1]);
var d_sec = d_tempSec[0] == "0" ? 0 : Convert.ToInt32(d_tempSec[0]);
_duration = new TimeSpan(d_hour, d_min, d_sec);
}
}
if (strMessage.Contains("size="))
{
_strFrameTime = strMessage.Substring(strMessage.IndexOf("time=") + ("time=").Length,
("00:00:00.00").Length);
char[] f_delHrMn = new char[] { ':' };
string[] f_tempHrMn = _strFrameTime.Split(f_delHrMn, StringSplitOptions.RemoveEmptyEntries);
char[] f_delSec = new char[] { '.' };
string[] f_tempSec = f_tempHrMn[2].Split(f_delSec, StringSplitOptions.RemoveEmptyEntries);
var f_hour = f_tempHrMn[0] == "0" ? 0 : Convert.ToInt32(f_tempHrMn[0]);
var f_min = f_tempHrMn[1] == "0" ? 0 : Convert.ToInt32(f_tempHrMn[1]);
var f_sec = f_tempSec[0] == "0" ? 0 : Convert.ToInt32(f_tempSec[0]);
_frameTime = new TimeSpan(f_hour, f_min, f_sec);
}
if (_strDuration != "00:00:00.00" && _strFrameTime != "00:00:00.00" && _percentage < 100)
{
_percentage = _frameTime.TotalMilliseconds / _duration.TotalMilliseconds * 100;
Debug.WriteLine(_percentage + " || " + _frameTime + " " + _duration);
}
}
}
</trackstodownload> -
FFMPEG - Doesn't show -vstats
22 juillet 2015, par Mateusz KasprzakI’m working with ffmpeg library and PHP. I want to get informations about video.mp4.
The problem is that it works on my localhost( Windows 7/ Xampp ) , but on my linux server it doesn’t... I’m able to convert videos, but I’m not able to use :-vstats
I’m using that command :
$output = shell_exec( '/usr/bin/ffmpeg -i video.mp4 -vstats 2>&1');
And I can get proper output on localhost, but not on my server. What could be the problem here ? I’m trying to finish it, but it seems it’s impossible...
Best Regards,
Mateusz
-
ffmpeg doesn't accept input in script
21 octobre 2022, par Eberhardtthis is a beginner's question but i can't figure out the answer after looking into it for several days :


I want ffmpeg to extract the audio portion of a video and save it in an .ogg container. If i run the following command in terminal it works as expected :


ffmpeg -i example.webm -vn -acodec copy example.ogg



For convenience, i want to do this in a script. However, if i pass a variable to ffmpeg it apparently just considers the first word and produces the error "No such file or directory".


I noticed that my terminal escapes spaces by a \ so i included this in my script. This doesn't solve the problem though.


Can someone please explain to me, why ffmpeg doesn't consider the whole variable that is passed to it in a script while working correctly when getting passed the same content in the terminal ?


This is my script that passes the filename with spaces escaped by \ to ffmpeg :


#!/bin/bash

titelschr=$(echo $@ | sed "s/ /\\\ /g")
titelohne=$(echo $titelschr | cut -d. -f 1)
titelogg=$(echo -e ${titelohne}.ogg) 

ffmpeg -i $titelschr -vn -acodec copy $titelogg



Thank you very much in advance !