
Recherche avancée
Autres articles (11)
-
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)
Sur d’autres sites (5285)
-
ffmpeg -vf transpose not working for output as .mp4 file
5 août 2014, par user3909162I want to rotate iPhone/iPad video to 90 degree, i am using following code
$input = 'video1.mp4';
$output = 'output.mp4';
$command = "ffmpeg -i $input -vf transpose=1 $output";
exec( $command, $ret );the above code is not working for
$output = 'output.mp4'; //(mp4 file)
but its working fine when i use
$output = 'output.avi'; //(avi file)
Please tell me solution for this i want also compress video in mp4 video.
-
using FFMPEG to convert to MP4 with maximum browsers compatibilty
6 mars 2016, par KarimI’m converting from
WMV
toFLV
usingFFMPEG
, and my problem is that theFLV
videos are so big ! the 15 minutes video’s size ranges between 150MB and 1GB !
I’m using the followingFFMPEG
command to convert and splitWMV
videos :nohup nice -1 ffmpeg -y -ss 00:00:00 -t 00:15:00 -async 1 -i INPUT.WMV -acodec libmp3lame OUTPUT.FLV
And I’ve tried converting to
MP4
before and the video size was much smaller than theFLV
video.So my questions are :
- Would the
MP4
videos have any
compatibility issues browsers ? - Would it work on iPhone, iPad ? (I
knowFLV
videos doesn’t work on
iPhones or iPads) - What is the best
FFMPEG
command to
convert toMP4
without losing the
quality of the video ?
- Would the
-
FFMpeg gets stuck while using c# but not shell
18 juin 2024, par InternalI'm working on a C# project where I need to run FFmpeg commands to process videos. The FFmpeg command works perfectly fine when executed directly in the shell, but it hangs when run from my C# application. I suspect the issue is related to the output pipes getting full.


Here is the FFmpeg command I'm using :


shell

C:\path\to\ffmpeg.exe -f concat -safe 0 -i "C:\path\to\list.txt" -vf "scale=1080x1920,setsar=1" -c:v libx264 -pix_fmt yuv420p -c:a aac -ar 44100 -ac 2 "C:\path\to\output.mp4"


And here is my C# code :


private static async Task _ExecuteFfmpegCommand(string arguments) {
 const string EXECUTABLE_NAME = "ffmpeg.exe";
 var executableFile = FfmpegPath.File(EXECUTABLE_NAME);
 await DownloadSercvice.EnsureFileExist(executableFile, FfmpegURI);
 arguments = $"-loglevel quiet {arguments}";

 using var process = new Process {
 StartInfo = new ProcessStartInfo {
 FileName = executableFile.FullName,
 Arguments = arguments,
 UseShellExecute = false,
 CreateNoWindow = true,
 RedirectStandardOutput = true,
 RedirectStandardError = true
 }
 };

 var command = $"{process.StartInfo.FileName} {process.StartInfo.Arguments}";
 Console.WriteLine($"This is my process command: {command}");

 var outputTask = new TaskCompletionSource<string>();
 var errorTask = new TaskCompletionSource<string>();

 process.OutputDataReceived += (sender, e) => {
 if (e.Data == null) 
 outputTask.SetResult(null); 
 else 
 Console.WriteLine(e.Data); 
 };

 process.ErrorDataReceived += (sender, e) => {
 if (e.Data == null) 
 errorTask.SetResult(null); 
 else 
 Console.WriteLine(e.Data); 
 };

 process.Start();
 process.BeginOutputReadLine();
 process.BeginErrorReadLine();

 await process.WaitForExitAsync();

 var output = await outputTask.Task;
 var error = await errorTask.Task;

 if (process.ExitCode != 0 || !string.IsNullOrWhiteSpace(error)) {
 throw new InvalidOperationException($"FFMPEG Error(0x{process.ExitCode:X8}): {error}") {
 Data = {
 { "Output", output },
 { "Error", error },
 { "ExitCode", process.ExitCode }
 }
 };
 }
}
</string></string>


Issue :
The process hangs and does not complete execution. I suspect the FFmpeg process's output pipes (stdout and stderr) are getting full, causing the hang. I've tried setting the log level to error, but it didn't resolve the issue.
I got that info from here : ffmpeg hangs when run in background
Solutions Tried :


Set -loglevel error in the FFmpeg command to reduce verbosity.
Set -loglever quiet in the FFmpeg command (to test if that may work)


Handled OutputDataReceived and ErrorDataReceived events to read the output asynchronously.
Questions :


How can I prevent the FFmpeg process from hanging due to full output pipes ?
Are there better ways to handle the stdout and stderr of the FFmpeg process in C# ?
Any help or suggestions on how to resolve this issue would be greatly appreciated !