
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (111)
-
Changer son thème graphique
22 février 2011, parLe thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
Modifier le thème graphique utilisé
Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
Il suffit ensuite de se rendre dans l’espace de configuration du (...) -
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 (...) -
Initialisation de MediaSPIP (préconfiguration)
20 février 2010, parLors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)
Sur d’autres sites (10463)
-
Why does ffmpeg output have to be encoded entirely before it can be played ?
17 septembre 2019, par EvesI have an MVC C# application (sort of) that calls an api to get a FileStreamResult from an mp4. At the moment the mp4 is your standard h.264 encoded file and we just create a FileStream of the mp4 file and return a new FileStreamResult of that FileStream. Works fine. The mp4 is immediately available in the html video control. However, I’m looking into whether or not we can work with h.265 encoded files. So I am using ffmpeg to translate the file. Obviously there would be a delay due to the use of libx264 to change the h.265 file to h.264. But the real problem I have is that page just sits there until the entire mp4 is transcoded to h.264 before any part is viewable.
API class variable :
private Process _videoConcatenationProcess;
API code :
if (_videoConcatenationProcess != null && !_videoConcatenationProcess.HasExited)
{
_videoConcatenationProcess.Kill();
_videoConcatenationProcess.Dispose();
}
_videoConcatenationProcess = new Process();
_videoConcatenationProcess.StartInfo.UseShellExecute = false;
_videoConcatenationProcess.StartInfo.RedirectStandardOutput = true;
_videoConcatenationProcess.StartInfo.RedirectStandardError = true;
_videoConcatenationProcess.StartInfo.CreateNoWindow = true;
_videoConcatenationProcess.EnableRaisingEvents = true;
_videoConcatenationProcess.StartInfo.FileName = @"C:\ffmpeg.exe";
_videoConcatenationProcess.OutputDataReceived += (o, k) => System.Diagnostics.Debug.WriteLine(k.Data ?? "NULL", "ffplay");
_videoConcatenationProcess.ErrorDataReceived += (o, k) => System.Diagnostics.Debug.WriteLine(k.Data ?? "NULL", "ffplay");
_videoConcatenationProcess.Exited += (o, k) => System.Diagnostics.Debug.WriteLine("Exited", "ffplay");
_videoConcatenationProcess.StartInfo.Arguments = $" -i \"{videoPath}\" -c:v libx264 -preset ultrafast -maxrate 3000k -bufsize 12000k -pix_fmt yuv420p -g 50 -vf scale=iw/2:-2 -c:a copy -movflags +faststart+frag_keyframe -f mp4 -";
_videoConcatenationProcess.Start();
_videoConcatenationProcess.BeginErrorReadLine();
return new FileStreamResult(_videoConcatenationProcess.StandardOutput.BaseStream, mimeType);Simple html in the cshtml for the video :
<video controls="controls" preload="metadata" controlslist="nodownload">
<source src="@Html.Raw( Model.VideoUrl )" type="@Model.MimeType">
Your browser does not support HTML5 video.
</source></video>I’ve been tweaking the ffmpeg parameters for speed/quality and I am not done with that. However, the real problem is that the page starts up and the video control just sits there with the spinning thing until the entire mp4 file is encoding with h.264. I am using "-movflags +faststart+frag_keyframe" and the video control has preload="metadata" so shouldn’t that have allowed the video to be available at least in part early on ?
So what I am I missing that the video control cannot show the video until it is fully encoded ?
Here is the console output showing that the metadata is generated before the video has been converted :
ffplay: Output #0, mp4, to 'pipe:':
ffplay: Metadata:
ffplay: major_brand : isom
ffplay: minor_version : 512
ffplay: compatible_brands: isomiso2mp41
ffplay: encoder : Lavf58.20.100
ffplay: Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 960x540, q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
ffplay: Metadata:
ffplay: handler_name : VideoHandler
ffplay: encoder : Lavc58.35.100 libx264
ffplay: Side data:
ffplay: cpb: bitrate max/min/avg: 1000000/0/0 buffer size: 2000000 vbv_delay: -1
ffplay: Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s (default)
ffplay: Metadata:
ffplay: handler_name : SoundHandler
ffplay: frame= 8 fps=0.0 q=24.0 size= 0kB time=00:00:00.39 bitrate= 0.7kbits/s speed=0.565x
ffplay: frame= 24 fps= 19 q=36.0 size= 0kB time=00:00:00.95 bitrate= 0.3kbits/s speed=0.766x
... -
Is a any way of piping input to deepspeech under Linux ?
24 octobre 2019, par Unreal AdminI am trying to continually stream audio from my IP camera to a server running deepspeech to decode the audio stream to text in realtime using FFMPEG.
I am using the following command :
$ffmpeg -i rtsp ://192.168.1.249:8080/h264_pcm.sdp -ar 16000 -ac 1 -acodec pcm_s16le -vn -f wav - |
deepspeech —model deepspeech-0.5.1-models/output_graph.pbmm —alphabet deepspeech-0.5.1-models/alphabet.txt —lm deepspeech-0.5.1-models/lm.binary —trie deepspeech-0.5.1-models/trie —audio -Deepspeech : FileNotFoundError : [Errno 2] No such file or directory : ’-’
deepspeech doesn’t like the ’—audio -’ specifier.
Is there any way of achieving the above goal using this approach ? Perhaps deepspeech just isn’t designed to do this ?
Are there any other suggestions as to how this might be achieved ?
ffmpeg can be directed to write a .wav file. Deepspeech and transcode this file. But I wish to continually stream and transcode the audio.
-
AJAX upload file with progres + FFMPEG progress
24 octobre 2019, par Сергей БарахтенкоThe task is to implement the following :
1. On the page there is a form for downloading a file, the file should be loaded asynchronously, without rebooting with the help of AJAX and displaying the upload progress
2. If the file is successfully downloaded, send a command to the server, which should check the queue, and if the queue is empty, inform the client that the processing of the file has begun, then start the processing itself
3. If processing has begun, then show the progress of this processingWhat did you manage to implement
File upload was successfully implemented, after a successful upload, the server issues a line with the status successfully, and the full path of the downloaded fileUpload JS snippet
$.ajax({
url: 'api/upload/load',
type: 'post',
data: fd,
contentType: false,
processData: false,
xhr: function() {
var xhr = new window.XMLHttpRequest();
xhr.upload.addEventListener("progress", function(evt) {
if (evt.lengthComputable) {
var percent = Math.ceil((evt.loaded / evt.total) * 100);
console.log(percent) // Upload progress
}
}, false);
return xhr;
},
success: function(data){
var response = JSON.parse(data);
if(response.status == 'success'){
//if upload success, run command
startConversion(response.path)
}
}
});Reponse from api/upload/load
{"status":"success","path":"<path>"}
</path>In the AJAX script, I do a check : if the response.status == ’success’, then we call the startConversion function, which takes the full path of the newly loaded file as an argument. This function sends another AJAX request to the server, where the queue check is in progress.
startConversion JS Snippet
function startConversion(path){
$.ajax({
url: '/api/upload/conversion',
type: 'POST',
data: { path: path },
success: function(data){
var response = JSON.parse(data);
// if response.status == 'start', run checkConversion function
}
})Code /api/upload/conversion
$queue = $this->model->getQueue();
if($queue < 5){
// If queue is empty, notify browser
$output = array('progress' => 'start');
echo json_encode($output);
// Then start shell_ecxec
$cmd = 'some_command';
shell_exec('ffmpeg.exe -i ' . $path . ' ' . $cmd . ' 1>log.txt 2>&1 ');
} else {
$output = array('progress' => 'waiting');
echo json_encode($output);
}Here, for some reason, a message is already not being displayed stating that processing has begun (echo before $cmd)
Full linkAnd here the most interesting begins. It would seem that it would be possible in the method to success call the check on the status of the processing (start, queue or an error) and if the processing began to call the third function, which, again AJAX, polls the server returns the progress of the processing
But in reality, the following happens : as soon as the second function sends the request, nothing is returned in response, but processing is in progress, and in the console it shows the status of the request - PENDING. As soon as the server completes processing, a response is issued from the server that the queue is empty and you can start processing the progress, although the processing has already been completed
There are suggestions that further execution of the script is blocked by the command shell_exec() until the end of her work
Also, it is not clear to me why the response from the server is not issued when the echo is clearly registered in it, and why the browser is waiting for the complete completion of the work shel_exec() because after it, the code does not have one. What should be done, that is, as if according to the logic of things and by the code, the server should give an answer in the form of a JSON string, the browser should show that the request has completed with the status of 200, and the server, in the meantime, should start the conversion, but for some reason this does not happen...