
Recherche avancée
Médias (91)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
-
USGS Real-time Earthquakes
8 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (89)
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
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 (...)
Sur d’autres sites (4638)
-
Video has no audio when played using HTML5
4 mai 2013, par vertigoelectricI have a media site where I can upload video files. After upload, they are converted to MP4 using ffmpeg and then ffmpeg2theora converts that to OGV.
I have recently discovered that some videos that I upload do not play any sound when using the HTML5 player in Firefox/Chrome, but do have sound when using the fallback Flash player in IE.
I've downloaded and checked the processed files and they both still have sound, so the issue seems to be related to the HTML5 player rather than loss of audio during processing.
I double-checked my ffmpeg command line and realized I didn't specify any audio options :
ffmpeg2 -i "inputfile" -vcodec libx264 -profile:v baseline -level 3 "outputfile" 2>&1'
Since only some of the files didn't play audio while some did, this led me to believe that the audio track was being copied directly during the processing and if the original file didn't have audio supported by HTML5, then it output file would have the same result.
I realized this means I have to force re-encoding of the audio stream, so I tried a few things but had no success with any.
I tried 'libfaac' as many online posts suggested, but this resulted in an 'unknown codec' error. Further reading led me to find that 'libfaac' was no longer included with ffmpeg builds. I must have gotten mine after that.
I tried the "Native AAC" codec by simply using the following options :
ffmpeg2 -i "inputfile" -vcodec libx264 -profile:v baseline -level 3 -acodec aac "outputfile" 2>&1'
With this I got the following error : "Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height".
The only codec that didn't give me some sort of error was 'libvo_aacenc'. However, even though the processing completed without error, I still got no audio when played in the HTML5 player.
What am I doing wrong ?
NOTE (just in case this is relevant) : This is currently being run on a Windows host using the ffmpeg executable, but we will soon be moving to a Linux host.
-
ffmpeg binary for android not working
29 juillet 2014, par Abdul QadirI’ve copied the ffmpeg binary provided here in the
res/raw
folder into my project’s assets folder. Whenever I need to run ffmpeg commands, I copy the binary intodata/data/my-package-name/
and run the following command to check if everything works.Process process = Runtime.getRuntime().exec(ffmpegBinaryFilePath + " -version");
I get the output by logging the stream by
process.getInputStream()
. Everything works as expected. But the binary provided in the project is old (version 0.11.1) and I also need to enable lame library to work with mp3 extension. So I decided to build my own binary. I’ve build using this script and also another script showed here. When I place the build binary into my project’s assets folder. I get no output when I run the code above i.e. the log is empty. I’ve also tried building with this script but it doesn’t create any binary i.e. there is nobin
folder when compilation is finished.I’ve made ndk related changes to these scripts i.e. changed NDK, PLATFORM and PREBUILT variables (I have ndk10 64bit) and changed
--enable-shared --disable-static
to--disable-shared --enable-static
. Also cleared any references to other libraries in the--extra-cflags
and--extra-ldflags
. Do I need to make any more changes ? Any help would be appreciated !!EDIT :
here’s the log file of my latest build
http://justpaste.it/gfeb -
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