
Recherche avancée
Médias (91)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (22)
-
Création définitive du canal
12 mars 2010, parLorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
A la validation, vous recevez un email vous invitant donc à créer votre canal.
Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)
Sur d’autres sites (3788)
-
fftools/ffmpeg : pass subtitle decoder dimensions to sub2video
14 juin 2023, par Anton Khirnov -
Is there a way to use ffmpeg binary on anroid platform in MAUI project ?
18 août 2023, par MrandCurrently I'm working on my test project about capabilities of MAUI and ffmpeg, so I can create my own applications. I got stuck on problem about using ffmpeg on platforms other than Windows (for example Anroid).


I tried googling the problem, didn't find anything helpful. Right now my ffmpeg for Android binary is situated inside
Platforms/Android/Assets/libs
as AndroidAsset. And I'm using code below to put my binary on Android to execute in the future

protected override void OnCreate(Bundle bundle)
{
 base.OnCreate(bundle);

 if (ContextCompat.CheckSelfPermission(this, Manifest.Permission.ReadExternalStorage) != Permission.Granted 
 || ContextCompat.CheckSelfPermission(this, Manifest.Permission.WriteExternalStorage) != Permission.Granted 
 || ContextCompat.CheckSelfPermission(this, Manifest.Permission.Internet) != Permission.Granted) 
 {
 ActivityCompat.RequestPermissions(this, new string[] {
 Manifest.Permission.ReadExternalStorage, Manifest.Permission.WriteExternalStorage, Manifest.Permission.Internet
 }, 0);
 }

 PrepareFFmpeg();
}

private void PrepareFFmpeg()
{
 var assetManager = Android.App.Application.Context.Assets;
 string path = "libs/ffmpeg";
 string destinationPath = Path.Combine(Android.App.Application.Context.ApplicationInfo.DataDir, "ffmpeg");

 var directoryPath = Path.GetDirectoryName(destinationPath);
 if (!Directory.Exists(directoryPath))
 {
 Directory.CreateDirectory(directoryPath);
 }

 using (var inputStream = assetManager.Open(path))
 {
 if (File.Exists(destinationPath)) 
 {
 File.Delete(destinationPath);
 }

 using (var outputStream = File.Create(destinationPath))
 {
 inputStream.CopyTo(outputStream);
 }
 }

 Java.Lang.JavaSystem.SetProperty("java.io.tmpdir", destinationPath);
 Java.Lang.Runtime.GetRuntime().Exec("chmod 700 " + destinationPath);

 FFmpeg.SetExecutablesPath(destinationPath);
}



public static class FFmpegService
{
 public static async Task ConvertVideoAsync(string inputPath, string outputPath, string format)
 {
 if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
 {
 string ffmpegPath = GetFFmpegPath();
 string arguments = $"-i \"{inputPath}\" \"{outputPath}.{format}\"";

 ProcessStartInfo startInfo = new ProcessStartInfo
 {
 FileName = ffmpegPath,
 Arguments = arguments,
 RedirectStandardOutput = true,
 RedirectStandardError = true,
 UseShellExecute = false,
 CreateNoWindow = true,
 };

 using Process process = new Process { StartInfo = startInfo };
 process.Start();
 await process.WaitForExitAsync();
 }
 else
 {
 //IConversion conversion = await FFmpeg.Conversions.FromSnippet.Convert(inputPath, $"{outputPath}.{f*- .ormat}");
 //string command = $"-i {inputPath} -f {format} {outputPath}";

 //ProcessStartInfo psi = new ProcessStartInfo();
 //psi.FileName = FFmpeg.ExecutablesPath;
 //psi.Arguments = command;
 //psi.RedirectStandardOutput = true;
 //psi.RedirectStandardError = true;
 //psi.UseShellExecute = false;

 //Process process = Process.Start(psi);
 //process.WaitForExit();

 //string output = process.StandardOutput.ReadToEnd();
 //string error = process.StandardError.ReadToEnd();

 string outputPathWithFormat = $"{outputPath}.{format}";
 IConversion conversion = await FFmpeg.Conversions.FromSnippet.Convert(inputPath, outputPathWithFormat);
 IConversionResult result = await conversion.Start();
 }
 }

 private static string GetFFmpegPath()
 {
 //string platformFolder = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "Windows" : "Android";
 //return Path.Combine("Platforms", platformFolder, "ffmpeg", "ffmpeg");
 if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
 {
 return Path.Combine("Platforms", "Windows", "ffmpeg", "ffmpeg");
 }
 else
 {
 return null;
 }
 }
}



I'm trying to use
FFmpegService
to convert video in any desired format I can by passing it in the arguments of the method (Windows works fine).

In my service I also tried to use
Xabe.FFmpeg
but it always givescouldn't find part of path (path here)
. When using more manual approach I face another problem every time :Permission denied
.
For path I tried/data/data/APPNAME
and cache directories. It always results in problems mentioned above.

I downloaded FFmpeg binary from this repository : https://github.com/tomaszzmuda/Xabe.FFmpeg/releases/tag/executables


My goal is to get conversion working for any format and for at least two platforms : Android and Windows, but if you can tell me how to do it on other platforms as well - I would be grateful.


Additional question : If you can tell me the best practice setting standard path for storing converted audio and video, thanks.


If you need more details, please specify I would happily provide them.
P.S. : don't look at the quality of code, I tried to code this for week so I didn't care about quality, I just want to learn how can I do this.


Thanks for your time and attention !


Project : Maui Blazor .Net 7.0


-
avfilter/vf_bwdif : Add neon for filter_line3
4 juillet 2023, par John Cox