
Recherche avancée
Médias (2)
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
Autres articles (56)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
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 (3769)
-
Urgent Help Needed : FFmpeg Integration in .NET MAUI for Android [closed]
15 juin 2024, par Billy VanegasI'm currently facing a significant challenge with integrating FFmpeg into my .NET MAUI project for Android. While everything works smoothly on Windows with Visual Studio 2022, I'm having a hard time replicating this on the Android platform. Despite exploring various NuGet packages like FFMpegCore, which appear to be wrappers around FFmpeg but don't include FFmpeg itself, I'm still at a loss.


I've tried following the instructions for integrating ffmpeg-kit for Android, but I keep running into issues, resulting in repeated failures and growing confusion. It feels like there is no straightforward way to seamlessly incorporate FFmpeg into a .NET MAUI project that works consistently across both iOS and Android.


The Problem :


I need to convert MP3 files to WAV format using FFmpeg on the Android platform within a .NET MAUI project. I’m using the FFMpegCore library and have downloaded the FFmpeg binaries from the official FFmpeg website.


However, when attempting to use these binaries on an Android emulator, I encounter a permission denied error in the working directory :
/data/user/0/com.companyname.projectname/files/ffmpeg


Here’s the code snippet where the issue occurs :


await FFMpegArguments
 .FromFileInput(mp3Path)
 .OutputToFile(wavPath, true, options => options
 .WithAudioCodec("pcm_s16le")
 .WithAudioSamplingRate(44100)
 .WithAudioBitrate(320000)
 )
 .ProcessAsynchronously();
 



Additional Details :


I've updated AndroidManifest.xml with permissions, but the issue persists.


I've created a method ConvertMp3ToWav to handle the conversion.
I also have a method ExtractFFmpegBinaries to manage FFmpeg binaries extraction, but it seems the permission issue might be tied to how these binaries are accessed or executed.


AndroidManifest.xml :


<?xml version="1.0" encoding="utf-8"?>
<manifest>
 <application></application>
 
 
 
 
</manifest>



Method ConvertMp3ToWav :


private async Task ConvertMp3ToWav(string mp3Path, string wavPath)
{
 try
 {
 // Check directory and create if not exists
 var directory = Path.GetDirectoryName(wavPath);
 if (!Directory.Exists(directory))
 Directory.CreateDirectory(directory!);

 // Check if WAV file exists
 if (!File.Exists(wavPath))
 Console.WriteLine($"File not found {wavPath}, creating empty file.");
 using var fs = new FileStream(wavPath, FileMode.CreateNew);

 // Check if MP3 file exists
 if (!File.Exists(mp3Path))
 Console.WriteLine($"File not found {mp3Path}");

 // Extract FFmpeg binaries
 string? ffmpegBinaryPath = await ExtractFFmpegBinaries(Platform.AppContext);

 // Configure FFmpeg options
 FFMpegCore.GlobalFFOptions.Configure(new FFOptions { BinaryFolder = Path.GetDirectoryName(ffmpegBinaryPath!)! });

 // Convert MP3 to WAV
 await FFMpegArguments
 .FromFileInput(mp3Path)
 .OutputToFile(wavPath, true, options => options
 .WithAudioCodec("pcm_s16le")
 .WithAudioSamplingRate(44100)
 .WithAudioBitrate(320000)
 )
 .ProcessAsynchronously();
 }
 catch (Exception ex)
 {
 Console.WriteLine($"An error occurred during the conversion process: {ex.Message}");
 throw;
 }
}



Method ExtractFFmpegBinaries :


private async Task<string> ExtractFFmpegBinaries(Context context)
{
 var architectureFolder = "x86"; // Adjust according to device architecture
 var ffmpegBinaryName = "ffmpeg"; 
 var ffmpegBinaryPath = Path.Combine(context.FilesDir!.AbsolutePath, ffmpegBinaryName);
 var tempFFMpegFileName = Path.Combine(FileSystem.AppDataDirectory, ffmpegBinaryName);

 if (!File.Exists(ffmpegBinaryPath))
 {
 try
 {
 var assetPath = $"Libs/{architectureFolder}/{ffmpegBinaryName}";
 using var assetStream = context.Assets!.Open(assetPath);
 
 await using var tempFFMpegFile = File.OpenWrite(tempFFMpegFileName);
 await assetStream.CopyToAsync(tempFFMpegFile);

 // Adjust permissions for FFmpeg binary
 Java.Lang.Runtime.GetRuntime()!.Exec($"chmod 755 {tempFFMpegFileName}");
 }
 catch (Exception ex)
 {
 Console.WriteLine($"An error occurred while extracting FFmpeg binaries: {ex.Message}");
 throw;
 }
 }
 else
 {
 Console.WriteLine($"FFmpeg binaries already extracted to: {ffmpegBinaryPath}");
 }

 return tempFFMpegFileName!;
}
</string>


What I Need :


I urgently need guidance on how to correctly integrate and use FFmpeg in my .NET MAUI project for Android. Specifically :


How to properly set up and configure FFmpeg binaries for use on Android within a .NET MAUI project.
How to resolve the permission denied issue when attempting to execute FFmpeg binaries.


Any advice, solutions, or workarounds would be greatly appreciated as this is a critical part of my project and I'm running out of time to resolve it.


Thank you in advance for your help !


-
FFmpeg Integration in .NET MAUI for Android [closed]
15 juin 2024, par Billy VanegasI'm facing a challenge with integrating FFmpeg into my .NET MAUI project for Android. While everything works smoothly on Windows with Visual Studio 2022, I'm having a hard time replicating this on the Android platform. Despite exploring various NuGet packages like FFMpegCore, which appear to be wrappers around FFmpeg but don't include FFmpeg itself, I'm still at a loss.


I've tried following the instructions for integrating ffmpeg-kit for Android, but I keep running into issues, resulting in repeated failures and growing confusion. It feels like there is no straightforward way to seamlessly incorporate FFmpeg into a .NET MAUI project that works consistently across both iOS and Android.


The Problem :


I need to convert MP3 files to WAV format using FFmpeg on the Android platform within a .NET MAUI project. I’m using the FFMpegCore library and have downloaded the FFmpeg binaries from the official FFmpeg website.


However, when attempting to use these binaries on an Android emulator, I encounter a permission denied error in the working directory :
/data/user/0/com.companyname.projectname/files/ffmpeg


Here’s the code snippet where the issue occurs :


await FFMpegArguments
 .FromFileInput(mp3Path)
 .OutputToFile(wavPath, true, options => options
 .WithAudioCodec("pcm_s16le")
 .WithAudioSamplingRate(44100)
 .WithAudioBitrate(320000)
 )
 .ProcessAsynchronously();
 



I've updated AndroidManifest.xml with permissions, but the issue persists.


I've created a method ConvertMp3ToWav to handle the conversion.
I also have a method ExtractFFmpegBinaries to manage FFmpeg binaries extraction, but it seems the permission issue might be tied to how these binaries are accessed or executed.


AndroidManifest.xml :


<?xml version="1.0" encoding="utf-8"?>
<manifest>
 <application></application>
 
 
 
 
</manifest>



Method ConvertMp3ToWav :


private async Task ConvertMp3ToWav(string mp3Path, string wavPath)
{
 try
 {
 // Check directory and create if not exists
 var directory = Path.GetDirectoryName(wavPath);
 if (!Directory.Exists(directory))
 Directory.CreateDirectory(directory!);

 // Check if WAV file exists
 if (!File.Exists(wavPath))
 Console.WriteLine($"File not found {wavPath}, creating empty file.");
 using var fs = new FileStream(wavPath, FileMode.CreateNew);

 // Check if MP3 file exists
 if (!File.Exists(mp3Path))
 Console.WriteLine($"File not found {mp3Path}");

 // Extract FFmpeg binaries
 string? ffmpegBinaryPath = await ExtractFFmpegBinaries(Platform.AppContext);

 // Configure FFmpeg options
 FFMpegCore.GlobalFFOptions.Configure(new FFOptions { BinaryFolder = Path.GetDirectoryName(ffmpegBinaryPath!)! });

 // Convert MP3 to WAV
 await FFMpegArguments
 .FromFileInput(mp3Path)
 .OutputToFile(wavPath, true, options => options
 .WithAudioCodec("pcm_s16le")
 .WithAudioSamplingRate(44100)
 .WithAudioBitrate(320000)
 )
 .ProcessAsynchronously();
 }
 catch (Exception ex)
 {
 Console.WriteLine($"An error occurred during the conversion process: {ex.Message}");
 throw;
 }
}



Method ExtractFFmpegBinaries :


private async Task<string> ExtractFFmpegBinaries(Context context)
{
 var architectureFolder = "x86"; // Adjust according to device architecture
 var ffmpegBinaryName = "ffmpeg"; 
 var ffmpegBinaryPath = Path.Combine(context.FilesDir!.AbsolutePath, ffmpegBinaryName);
 var tempFFMpegFileName = Path.Combine(FileSystem.AppDataDirectory, ffmpegBinaryName);

 if (!File.Exists(ffmpegBinaryPath))
 {
 try
 {
 var assetPath = $"Libs/{architectureFolder}/{ffmpegBinaryName}";
 using var assetStream = context.Assets!.Open(assetPath);
 
 await using var tempFFMpegFile = File.OpenWrite(tempFFMpegFileName);
 await assetStream.CopyToAsync(tempFFMpegFile);

 // Adjust permissions for FFmpeg binary
 Java.Lang.Runtime.GetRuntime()!.Exec($"chmod 755 {tempFFMpegFileName}");
 }
 catch (Exception ex)
 {
 Console.WriteLine($"An error occurred while extracting FFmpeg binaries: {ex.Message}");
 throw;
 }
 }
 else
 {
 Console.WriteLine($"FFmpeg binaries already extracted to: {ffmpegBinaryPath}");
 }

 return tempFFMpegFileName!;
}
</string>


What I Need :


How to correctly integrate and use FFmpeg in my .NET MAUI project for Android ? Specifically :


- 

- How to properly set up and configure FFmpeg binaries for use on Android within a .NET MAUI project.
- How to resolve the permission denied issue when attempting to execute FFmpeg binaries.






-
ffmpeg trouble with NetMaui and Android [closed]
15 juin 2024, par Billy VanegasI find myself in a following predicament. While I work with Visual Studio 2022, ffmpeg performs flawlessly on Windows platform. However, I'm encountering difficulties when attempting to replicate this functionality on Android. Despite exploring NuGet packages like FFMpegCore, which seem to be ffmpeg wrappers but lack ffmpeg itself, I'm still struggling to find a clear path forward. I've even tried integrating ffmpeg-kit for Android as per the instructions, only to face repeated failures and a sense of confusion. I must admit my puzzlement : why isn't there a straightforward method to seamlessly add ffmpeg to a .NET MAUI project that functions consistently across both iOS and Android platforms ?


I want to convert MP3 files to WAV format using FFmpeg on the Android platform within a .NET MAUI project.


I am using the FFmpegCore library and have downloaded the FFmpeg binaries from the official FFmpeg website. However, I encountered issues when attempting to pass the binary folder on the emulator, when I try to pass it, I get
permission denied
in working folder :
/data/user/0/com.companyname.projectname/files/ffmpeg
on this part of code :

await FFMpegArguments
 .FromFileInput(mp3Path)
 .OutputToFile(wavPath, true, options => options
 .WithAudioCodec("pcm_s16le")
 .WithAudioSamplingRate(44100)
 .WithAudioBitrate(320000)
 )
 .ProcessAsynchronously();



This is the
AndroidManifest.xml


<?xml version="1.0" encoding="utf-8"?>
<manifest>
 <application></application>
 
 
 
 
</manifest>



private async Task ConvertMp3ToWav(string mp3Path, string wavPath)
 {
 try
 {
 var directory = Path.GetDirectoryName(wavPath);
 if (!Directory.Exists(directory))
 Directory.CreateDirectory(directory!);
 if (!File.Exists(wavPath))
 Console.WriteLine($"File not found {wavPath}, creating empty file.");
 using var fs = new FileStream(wavPath, FileMode.CreateNew);
 if (!File.Exists(mp3Path))
 Console.WriteLine($"File not found {mp3Path}");

 string? ffmpegBinaryPath = await ExtractFFmpegBinaries(Platform.AppContext);
 FFMpegCore.GlobalFFOptions.Configure(new FFOptions { BinaryFolder = Path.GetDirectoryName(ffmpegBinaryPath!)! });

 await FFMpegArguments
 .FromFileInput(mp3Path)
 .OutputToFile(wavPath, true, options => options
 .WithAudioCodec("pcm_s16le")
 .WithAudioSamplingRate(44100)
 .WithAudioBitrate(320000)
 )
 .ProcessAsynchronously();
 }
 catch (Exception ex)
 {
 Console.WriteLine($"An error occurred during the conversion process: {ex.Message}");
 throw;
 }
 }



private async Task<string> ExtractFFmpegBinaries(Context context)
 {
 var architectureFolder = "x86"; // "armeabi-v7a";
 var ffmpegBinaryName = "ffmpeg"; 
 var ffmpegBinaryPath = Path.Combine(context.FilesDir!.AbsolutePath, ffmpegBinaryName);
 var tempFFMpegFileName = Path.Combine(FileSystem.AppDataDirectory, ffmpegBinaryName);

 if (!File.Exists(ffmpegBinaryPath))
 {
 try
 {
 var assetPath = $"Libs/{architectureFolder}/{ffmpegBinaryName}";
 using var assetStream = context.Assets!.Open(assetPath);
 
 await using var tempFFMpegFile = File.OpenWrite(tempFFMpegFileName);
 await assetStream.CopyToAsync(tempFFMpegFile);

 //new MainActivity().RequestStoragePermission();
 Java.Lang.Runtime.GetRuntime()!.Exec($"chmod 755 {tempFFMpegFileName}");
 }
 catch (Exception ex)
 {
 Console.WriteLine($"An error occurred while extracting FFmpeg binaries: {ex.Message}");
 throw;
 }
 }
 else
 {
 Console.WriteLine($"FFmpeg binaries already extracted to: {ffmpegBinaryPath}");
 }

 return tempFFMpegFileName!;
 }
</string>