
Recherche avancée
Médias (91)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
-
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
Autres articles (42)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...)
Sur d’autres sites (7137)
-
Concatenate multiple video files alongside delayed audio files
28 mars 2022, par Spartan 117I am currently working on a utility that is responsible for pulling audio and video files from the cloud and merging them together via FFMPEG. As I am new to FFMPEG, I am going to split the question into an FFMPEG part and a C# part just so people can answer either 1 part or the other (or both !).


FFMPEG Part


Currently, I have a working FFMPEG arg if there is only 1 video file present and it needs to be merged with multiple files.


ffmpeg -i input1.mkv -i input1.mka -i input2.mka -i input3.mka -i input4.mka -filter_complex "[1:a]adelay=0s:all=1[a1pad];[2:a]adelay=20s:all=1[a2pad];[3:a]adelay=30s:all=1[a3pad];[4:a]adelay=40s:all=1[a4pad];[a1pad][a2pad][a3pad][a4pad]amix=inputs=4:weights=1|1|1|1[aout]" -map [aout] -map 0:0 output4.mkv



The delays you see in there are determined by subtracting the start time of each file from the start time of the earliest created audio or video file. I know that if I wanted to create a horizontal stack of multiple videos, i could just do


ffmpeg -i input1.mkv -i input1.mka -i input2.mkv -i input2.mka -i input3.mka -i input4.mka
-filter_complex 
"[2:v]tpad=start_duration=120:color=black[vpad]; 
 [3:a]adelay=120000:all=1[a2pad]; 
 [4:a]adelay=180000:all=1[a3pad];
 [5:a]adelay=200000:all=1[a4pad]; 
 [0:v][vpad]hstack=inputs=2[vout]; 
 [1:a][a2pad][a3pad][a4pad]amix=inputs=4:weights=1|1|1|1[aout]" 
 -map [vout] -map [aout] 
 output.mkv



but what I want to do is both keep those delays for the audio and video files AND concatenate (not stack) those videos, how would i go about doing that ?


C# Part


You see that giant arg up there ? The utility is supposed to generate that based on a List of recordings. Here is the model.


List<filemodel> _records;
public class FileModel {
 public string Id { get; set; }
 public string FileType { get; set; }
 public string StartTime { get; set; }
}
</filemodel>


The utility has to then go through that list and create the arg (as seen in the FFMPEG part) to be executed by the Xabe.FFMPEG package. The way i was thinking to approach this is to basically create 2 string builders. 1 string builder will be responsible for dealing with the inputs, the other string builder. Here is what i have so far


private async Task CombineAsync()
 {
 var minTime = _records.Min(y => Convert.ToDateTime(y.StartTime));
 var frontBuilder = new StringBuilder("-y ");
 var middleBuilder = new StringBuilder("-filter_complex \"");
 var endString = $" -map [vout] -map [aout] {_folderPath}\\CombinedOutput.mkv";

 for (var i = 0; i < _records.Count; i++)
 {
 var type = _records[i].FileType.ToLower();
 var delay = (Convert.ToDateTime(_records[i].StartTime).Subtract(minTime)).TotalSeconds;
 frontBuilder.Append($"-i {_folderPath + "\\" + _records[i].Id} ");
 var addColon = i != _records.Count - 1 ? ";" : "";
 middleBuilder.Append(type.Equals("video") ? $"[{i}:v]tpad=start_duration={delay}:color=black[v{i}pad]{addColon} " : $"[{i}:a]adelay={delay}s:all=1[a{i}pad]{addColon} ");
 }
 middleBuilder.Append("\"");
 Console.WriteLine(frontBuilder.ToString() + middleBuilder.ToString() + endString);
 // var args = frontBuilder + middleBuilder + endString;
 // try
 // {
 // var conversionResult = await FFmpeg.Conversions.New().Start(args);
 // Console.WriteLine(JsonConvert.SerializeObject(conversionResult));
 // }
 // catch (Exception e)
 // {
 // Console.WriteLine(e);
 // }
 }



- 

-
Is this the correct way to go about building the argument out ?


-
How in god's name do i get something like this in there, since it relies on naming and total count for the piping and inputs=


[0:v][vpad]hstack=inputs=2[vout]; // This part will change for video concatenation depending on what gets answered above
 [1:a][a2pad][a3pad][a4pad]amix=inputs=4:weights=1|1|1|1[aout]









-
-
On upload rename the file to input.mp4 not working
7 septembre 2014, par T.A.R.D.I.S_wolfOk so i’m trying to make it to were the file is uploaded then renamed to input.mp4 so that it over rights the old one. But its not working ?
But it still keeps uploading with the original file name.
Or is there a way to just delete the files in the folder uploads after 30 min ? Both the uploaded file and output file.<?php
$fileName = $_FILES["file1"]["name"]; // The file name
$fileTmpLoc = $_FILES["file1"]["tmp_name"]; // File in the PHP tmp folder
$fileType = $_FILES["file1"]["type"]; // The type of file it is
$fileSize = $_FILES["file1"]["size"]; // File size in bytes
$fileErrorMsg = $_FILES["file1"]["error"]; // 0 for false... and 1 for true
if (!$fileTmpLoc) { // if file not chosen
echo "ERROR: Please browse for a file before clicking the upload button.";
exit();
}
$newfilename = $fileName . input.mp4';
rename($fileName, $newfilename);
if(move_uploaded_file($fileTmpLoc, "uploads/$newfilename")){
echo "Starting ffmpeg... <br />";
echo shell_exec("ffmpeg -y -i uploads/".$newfilename." uploads/output.mp3");
echo "Done. <br /><br />";
echo '<a href="http://test.tw-wcs.com:82/ffmpeg/MP4_To_MP3/uploads/output.mp3" target="_blank">Click Here</a> To open your file in a new tab.';
} else {
echo "move_uploaded_file function failed";
}
?> -
On upload rename the file to input.mp4 not working
7 mars 2018, par 57_WolveOk so i’m trying to make it to were the file is uploaded then renamed to input.mp4 so that it over rights the old one. But its not working ?
But it still keeps uploading with the original file name.
Or is there a way to just delete the files in the folder uploads after 30 min ? Both the uploaded file and output file.<?php
$fileName = $_FILES["file1"]["name"]; // The file name
$fileTmpLoc = $_FILES["file1"]["tmp_name"]; // File in the PHP tmp folder
$fileType = $_FILES["file1"]["type"]; // The type of file it is
$fileSize = $_FILES["file1"]["size"]; // File size in bytes
$fileErrorMsg = $_FILES["file1"]["error"]; // 0 for false... and 1 for true
if (!$fileTmpLoc) { // if file not chosen
echo "ERROR: Please browse for a file before clicking the upload button.";
exit();
}
$newfilename = $fileName . input.mp4';
rename($fileName, $newfilename);
if(move_uploaded_file($fileTmpLoc, "uploads/$newfilename")){
echo "Starting ffmpeg... <br />";
echo shell_exec("ffmpeg -y -i uploads/".$newfilename." uploads/output.mp3");
echo "Done. <br /><br />";
echo '<a href="http://test.tw-wcs.com:82/ffmpeg/MP4_To_MP3/uploads/output.mp3" target="_blank">Click Here</a> To open your file in a new tab.';
} else {
echo "move_uploaded_file function failed";
}
?>