
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (76)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (14784)
-
How to buffer videojs so preload won't show ?
9 septembre 2015, par toyI’m building video cutting tool using videojs. In order to give the feedback to user right away instead of using ffmpeg to merge the video right away. I just swap the videos instead. However, during the swapping you would see the loading icon when the second video is being loaded. Is there any tricks that would tell videojs to load the video before so when the video plays it would just play right away.
http://jsfiddle.net/noppanit/odwqqoss/2/
Here’s my code
<div>
<video preload="auto" class="vjs-tech" src="http://www.w3schools.com/html/mov_bbb.mp4">
<source src="http://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
</source></video>
</div>
<div>
<div>
<label>From</label>
<input type="text" class="start-time" />
</div>
<div>
<label>To</label>
<input type="text" class="stop-time" />
</div>
<div>
<input type="button" value="Select" />
</div>
</div>
<div>
<video preload="auto" class="vjs-tech" src="http://www.w3schools.com/html/mov_bbb.mp4">
<source src="http://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
</source></video>
</div>
<div>
<div>
<label>From</label>
<input type="text" class="start-time-video1" />
</div>
<div>
<label>To</label>
<input type="text" class="stop-time-video1" />
</div>
<div>
<input type="button" value="Select" />
</div>
</div>
<div>
<input type="button" value="Cut!" />
</div>
<div></div>
(function ($) {
$('#cut-video').on('click', function () {
var video = videojs("example_video_1");
var startTime = $('.start-time');
var stopTime = $('.stop-time');
video.currentTime(startTime.val());
video.play();
video.on('timeupdate', function (e) {
if (video.currentTime() >= stopTime.val()) {
video.pause();
}
});
});
$('#cut-video1').on('click', function () {
var video = videojs("example_video_2");
var startTime = $('.start-time-video1');
var stopTime = $('.stop-time-video1');
video.currentTime(startTime.val());
video.play();
video.on('timeupdate', function (e) {
if (video.currentTime() >= stopTime.val()) {
video.pause();
}
});
});
$('#cut').on('click', function () {
var video = $('<video></video>');
video.attr('id', 'result1');
video.addClass('video-js vjs-default-skin');
video.attr('width', 300);
var source = $('<source></source>');
source.attr('src', 'http://www.w3schools.com/html/mov_bbb.mp4');
source.attr('type', 'video/mp4');
video.append(source);
$('#result').append(video);
var player = videojs("result1");
var startTime = $('.start-time');
var stopTime = $('.stop-time');
player.currentTime(startTime.val());
player.play();
player.on('timeupdate', function (e) {
if (player.currentTime() >= stopTime.val()) {
player.src({
"type": "video/mp4",
src: 'http://www.w3schools.com/html/mov_bbb.mp4'
});
var startTime1 = $('.start-time-video1');
var stopTime1 = $('.stop-time-video1');
player.currentTime(startTime1.val());
player.play();
player.on('timeupdate', function (e1) {
if (player.currentTime() >= stopTime1.val()) {
player.pause();
}
});
}
});
});
})(jQuery); -
ffprobe does not show packet size of a mpeg transport stream as 188 bytes
16 octobre 2015, par CompNetI created a transport stream from a
H.264
encoded file using the followingffmpeg
command :ffmpeg -i encoded.mp4 -c copy -map 0 -vbsf h264_mp4toannexb mpegts sample.ts
Now I want to check the frames and packets within the transport stream. I used
ffprobe -show_frames
which shows the frame details for audio and video frames. But I’m confused about the
pkt_size
field. Is it the actual frame size of each elementary stream of audio and video (I/B/P frames) ?Also, when I run
ffprobe -show_packets
is it supposed to give each packet details in the transport stream ? Because the
size
field of each packet is not 188 bytes, rather it is same as thepkt_size
I got with-show_frames
.Could someone please explain why the size in
-show_packets
of transport stream is not 188 bytes ? Did I do anything wrong while multiplexingmp4
toTS
? -
How to Show result after uploaded file in PHP
23 avril 2022, par i0x4rI have a script that uploads the video to a server, everything is correct but there is a problem, after the upload of the video to the server is completed
it shows all the uploaded files in the (uploads) folder as array !


I only want the result of the file I just uploaded, and it doesn't show me the previous files !
I need ffmpeg to improve video quality


index.php


<?php
//index.php

?>


 
 
 
 <code class="echappe-js"><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

 
<script src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.5.1/dropzone.js"></script>

 
 
 



 
 
 








 



<script>&#xA;&#xA;$(document).ready(function(){&#xA; &#xA; Dropzone.options.dropzoneFrom = {&#xA; autoProcessQueue: true,&#xA; timeout: 300000,&#xA; acceptedFiles:"video/*",&#xA; init: function(){&#xA; var submitButton = document.querySelector(&#x27;#submit-all&#x27;);&#xA; myDropzone = this;&#xA; submitButton.addEventListener("click", function(){&#xA; myDropzone.processQueue();&#xA; });&#xA; this.on("complete", function(){&#xA; if(this.getQueuedFiles().length == 0 &amp;&amp; this.getUploadingFiles().length == 0)&#xA; {&#xA; var _this = this;&#xA; _this.removeAllFiles();&#xA; }&#xA; list_image();&#xA; });&#xA; },&#xA; };&#xA;&#xA; list_image();&#xA;&#xA; function list_image()&#xA; {&#xA; $.ajax({&#xA; url:"upload.php",&#xA; success:function(data){&#xA; $("#preview").html(data);&#xA; }&#xA; });&#xA; }&#xA;&#xA; $(document).on(&#x27;click&#x27;, &#x27;.remove_image&#x27;, function(){&#xA; var name = $(this).attr(&#x27;id&#x27;);&#xA; $.ajax({&#xA; url:"upload.php",&#xA; method:"POST",&#xA; data:{name:name},&#xA; success:function(data)&#xA; {&#xA; list_image();&#xA; }&#xA; })&#xA; });&#xA; &#xA;});&#xA;</script>



upload.php


<?php

//upload.php

$folder_name = 'upload/';
$tumb_name = 'thumb/';
$imageext = '.png';

if(!empty($_FILES))
{

 $temp_file = $_FILES['file']['tmp_name'];
 $location = $folder_name . $_FILES['file']['name'];
 move_uploaded_file($temp_file, $location);
 $upload = $_FILES['file']['name'];
 $uploadStr = str_replace(" ", "\ ",$upload);
 $locationStr = str_replace(" ","\ ",$location);
 $cmd = "ffmpeg -y -i {$locationStr} -ss 00:00:15 -vframes 1 thumb/{$uploadStr}.png 2>&1";
 echo shell_exec($cmd);
}

if(isset($_POST["name"]))
{
 $filename = $folder_name.$_POST["name"];
 $imagename = $thumb_name.$_POST["name"].$imageext;
 unlink($filename);
 unlink($imagename);
}

$result = array();

$files = scandir('upload');

$output = '<div class="row">';

if(false !== $files)
{
 foreach($files as $file)
 {
 if('.' != $file && '..' != $file)
 {
 $output .= '
 <a href="http://stackoverflow.com/view.php?file=&#x27;.$file.&#x27;" target="_blank"> <img src="http://stackoverflow.com/feeds/tag/thumb/&#x27;.$file.&#x27;.png" class="img-thumbnail" width='246' height='138' /></a>
 <button type="button" class="btn btn-link remove_image">Remove</button>
 ';
 }
 }
}
$output .= '</div>';
echo $output;

?>



EDIT :
I put the example on an Array, I don't want it, I just want it to show the downloaded video I just uploaded as a result.


EDIT 2 :
There are some who say type $location and it displays the downloaded file, but this does not work !!!
I just tried more than once and with several uses, there is no display where the text is empty


This is an example of that


<?php

//upload.php

$folder_name = 'upload/';
$tumb_name = 'thumb/';
$imageext = '.png';

if(!empty($_FILES))
{

 $temp_file = $_FILES['file']['tmp_name'];
 $location = $folder_name . $_FILES['file']['name'];
 move_uploaded_file($temp_file, $location);
 $upload = $_FILES['file']['name'];
 $uploadStr = str_replace(" ", "\ ",$upload);
 $locationStr = str_replace(" ","\ ",$location);
 $cmd = "ffmpeg -y -i {$locationStr} -ss 00:00:15 -vframes 1 thumb/{$uploadStr}.png 2>&1";
 echo shell_exec($cmd);
}

if(isset($_POST["name"]))
{
 $filename = $folder_name.$_POST["name"];
 $imagename = $thumb_name.$_POST["name"].$imageext;
 unlink($filename);
 unlink($imagename);
}


$output .= 'Successfly file is "'.$location.'"';
echo $output;

?>



Result : Successfly file is ""
no name file :(


EDIT 3 :


this code upload.php
functions not working


<?php

//upload.php

$folder_name = 'upload/';
$tumb_name = 'thumb/';
$imageext = '.png';

if(!empty($_FILES))
{

 $temp_file = $_FILES['file']['tmp_name'];
 $location = $folder_name . $_FILES['file']['name'];
 move_uploaded_file($temp_file, $location);
 $upload = $_FILES['file']['name'];
 $uploadStr = str_replace(" ", "\ ",$upload);
 $locationStr = str_replace(" ","\ ",$location);
 $cmd = "ffmpeg -y -i {$locationStr} -ss 00:00:15 -vframes 1 thumb/{$uploadStr}.png 2>&1";
 echo shell_exec($cmd);
}


echo "The file " . $location . " has been uploaded";
// not working
echo "<br />";
echo "The file " . $upload . " has been uploaded";
// not working
echo "<br />";
echo "The file " . $uploadStr . " has been uploaded";
// not working
echo "<br />";
echo "The file " . $locationStr . " has been uploaded";
// not working

?>





this error :
[23-Apr-2022 12:31:56 Asia/Riyadh] PHP Notice : Undefined variable : location in /home/prdix/public_html/test/upload.php on line 38


line 38 : echo $location ;


About the developer solution Markus AO


I did the experiment and it is quite good, but dropzone is still missing, because I will upload a large video and the normal upload compresses the video before uploading, here is a picture from my mobile while uploading, but this does not happen with dropzone



I want to implement this in dropzone as well, because this library does not compress the video, but upload it in full size.


Thank you bro.