
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (98)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
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 (...)
Sur d’autres sites (8335)
-
Merge all .h264 files in directory in alphabetical order
9 mars 2017, par nicolashahnI have a camera that records in 5 second clips with filenames that are timestamps :
2017-03-08-09-54-27.334326-000000.h264
2017-03-08-09-54-27.334326-000001.h264
2017-03-08-09-54-27.334326-000002.h264
2017-03-08-09-54-27.334326-000003.h264
...What is the easiest way to merge these in order into one video file on OSX ?
-
Encoding error with Sidekiq
14 mars 2017, par DavidKIm following this tutorial https://www.pubnub.com/blog/2015-12-08-building-video-sharing-app-server-messaging-ruby/ on Building a Video Sharing App. Its a bit outdated and Ive already had to fix a view issues to get this far but Im pretty lost now with this latest issue. I believe its something to do with sidekiq. When I try uploading a video it seems to work and shows up on the database, but I get a "Video is still being encoded." message.
This is the log :
2017-03-13T22:00:14.729Z 11109 TID-ova30dq94 WebmVideoEncoder JID-540aa74110e63e334a712719 INFO: fail: 0.122 sec
2017-03-13T22:00:14.730Z 11109 TID-ova30dq94 WARN: {"context":"Job raised exception","job":{"class":"WebmVideoEncoder","args":[3],"retry":true,"queue":"default","jid":"540aa74110e63e334a712719","created_at":1489441065.533313,"enqueued_at":1489442414.60714,"error_message":"exception class/object expected","error_class":"TypeError","failed_at":1489441065.541595,"retry_count":6,"retried_at":1489442414.7293491},"jobstr":"{\"class\":\"WebmVideoEncoder\",\"args\":[3],\"retry\":true,\"queue\":\"default\",\"jid\":\"540aa74110e63e334a712719\",\"created_at\":1489441065.533313,\"enqueued_at\":1489442414.60714,\"error_message\":\"exception class/object expected\",\"error_class\":\"TypeError\",\"failed_at\":1489441065.541595,\"retry_count\":5,\"retried_at\":1489441667.7081149}"}
2017-03-13T22:00:14.730Z 11109 TID-ova30dq94 WARN: TypeError: exception class/object expected
2017-03-13T22:00:14.730Z 11109 TID-ova30dq94 WARN: /Users/David/rubyProjects/videouploader/videouploader/app/workers/webm_video_encoder.rb:14:in `raise'
/Users/David/rubyProjects/videouploader/videouploader/app/workers/webm_video_encoder.rb:14:in `perform'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:158:in `execute_job'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:138:in `block (4 levels) in process'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq.rb:36:in `block in '
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:133:in `block (3 levels) in process'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:128:in `block in invoke'
/Users/David/.rvm/gems/ruby-2.3.0/bundler/gems/sidetiq-7bec4084165f/lib/sidetiq/middleware/history.rb:8:in `call'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/server/retry_jobs.rb:74:in `call'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/logging.rb:32:in `with_context'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/server/logging.rb:7:in `call'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:133:in `invoke'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:132:in `block (2 levels) in process'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:174:in `stats'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:131:in `block in process'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/rails.rb:106:in `block in call'
/Users/David/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/execution_wrapper.rb:85:in `wrap'
/Users/David/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/reloader.rb:68:in `block in wrap'
/Users/David/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/execution_wrapper.rb:85:in `wrap'
/Users/David/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/reloader.rb:67:in `wrap'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/rails.rb:105:in `call'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:126:in `process'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:82:in `process_one'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:70:in `run'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/util.rb:17:in `watchdog'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/util.rb:26:in `block in safe_thread'
2017-03-13T22:00:50.877Z 11109 TID-ova3gyd4k ThumbnailCutter JID-d0c693e39e06c2cccdec7d33 INFO: start
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `ffmpeg -i /Users/David/rubyProjects/videouploader/videouploader/public/system/videos/video_files/000/000/002/original/Heart_of_Gold_-_Neil_Young_cover_with_harmonica.1_(1).mp4 -ss 00:00:01.000 -vframes 1 /tmp/1489442450881632.png'
2017-03-13T22:00:50.902Z 11109 TID-ova3gyd4k ThumbnailCutter JID-d0c693e39e06c2cccdec7d33 INFO: fail: 0.025 sec
2017-03-13T22:00:50.903Z 11109 TID-ova3gyd4k WARN: {"context":"Job raised exception","job":{"class":"ThumbnailCutter","args":[2],"retry":true,"queue":"default","jid":"d0c693e39e06c2cccdec7d33","created_at":1489437193.246615,"enqueued_at":1489442450.8759801,"error_message":"exception class/object expected","error_class":"TypeError","failed_at":1489437193.254677,"retry_count":7,"retried_at":1489442450.901133},"jobstr":"{\"class\":\"ThumbnailCutter\",\"args\":[2],\"retry\":true,\"queue\":\"default\",\"jid\":\"d0c693e39e06c2cccdec7d33\",\"created_at\":1489437193.246615,\"enqueued_at\":1489442450.8759801,\"error_message\":\"exception class/object expected\",\"error_class\":\"TypeError\",\"failed_at\":1489437193.254677,\"retry_count\":6,\"retried_at\":1489441044.6660218}"}
2017-03-13T22:00:50.903Z 11109 TID-ova3gyd4k WARN: TypeError: exception class/object expected
2017-03-13T22:00:50.903Z 11109 TID-ova3gyd4k WARN: /Users/David/rubyProjects/videouploader/videouploader/app/workers/thumbnail_cutter.rb:13:in `raise'
/Users/David/rubyProjects/videouploader/videouploader/app/workers/thumbnail_cutter.rb:13:in `perform'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:158:in `execute_job'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:138:in `block (4 levels) in process'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq.rb:36:in `block in '
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:133:in `block (3 levels) in process'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:128:in `block in invoke'
/Users/David/.rvm/gems/ruby-2.3.0/bundler/gems/sidetiq-7bec4084165f/lib/sidetiq/middleware/history.rb:8:in `call'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/server/retry_jobs.rb:74:in `call'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/logging.rb:32:in `with_context'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/server/logging.rb:7:in `call'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:133:in `invoke'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:132:in `block (2 levels) in process'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:174:in `stats'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:131:in `block in process'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/rails.rb:106:in `block in call'
/Users/David/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/execution_wrapper.rb:85:in `wrap'
/Users/David/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/reloader.rb:68:in `block in wrap'
/Users/David/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/execution_wrapper.rb:85:in `wrap'
/Users/David/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/reloader.rb:67:in `wrap'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/rails.rb:105:in `call'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:126:in `process'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:82:in `process_one'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:70:in `run'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/util.rb:17:in `watchdog'
/Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/util.rb:26:in `block in safe_thread'thumbnail_cutter.rb
class ThumbnailCutter
include Sidekiq::Worker
def perform(video_id)
video = Video.find(video_id)
output = "/tmp/#{Time.now.getutc.to_f.to_s.delete('.')}.png"
_command = `ffmpeg -i #{video.video_file.path} -ss 00:00:01.000 -vframes 1 #{output}`
if $?.to_i == 0
video.thumbnail = File.open(output, 'r')
video.save
FileUtils.rm(output)
else
raise $?
end
end
end -
what is the good function php to deal with ffmpeg and progress bar [duplicate]
17 mai 2014, par Abed SolimanThis question already has an answer here :
I ask about ffmpeg and progressbar
I used exec function with ffmpeg and output the result to txt file
and using some of code I found here to
<center>
<?php
define('RAPIDLEECH', 'yes');
define('CONFIG_DIR', 'configs/');
require_once('configs/config.php');
define ( 'TEMPLATE_DIR', 'templates/'.$options['template_used'].'/' );
// Include other useful functions
require_once('classes/other.php');
error_reporting(0);
login_check();
include(TEMPLATE_DIR.'header.php');
echo ('<br /><br /><br /><b>AudioXtractor</b>, un complemento <br /> que te permite extraer el audio de tus videos.<br /><br /><br />');
putenv('GDFONTPATH=' . realpath('.')); ?>
<br />
<form method="post"><center>
<table>
<td>Movie:
<select>
<?php
$exts=array(".ac3", ".avi", ".f4v", ".flv", ".mkv", ".mov", ".mp4", ".mpg", ".mpeg", ".rmvb", ".srt", ".swf", ".wav", ".wmv");
$ext="";
function vidlist($dir)
{
$results = array();
$handler = opendir($dir);
while ($file = readdir($handler))
{
if (strrchr($file,'.')!="")
{
$ext=strtolower(strrchr($file,'.'));
}
if ($file != '.' && $file != '..' && in_array($ext,$GLOBALS["exts"]))
{
$results[] = $file;
}
}
closedir($handler);
sort($results);
return $results;
}
function Output($command) {
$output = array($command);
exec($command.' 2>&1', $output);
return ($output);
}
$files = vidlist("./files/");
foreach($files as $file)
{
echo '<option value="'.$file.'">'.$file.'</option>';
}
?>
</select></td></table>
<br /> >
New MP3's name:
<input type="text" value="nuevoaudio" />
<br /> >
<br />
<br />
<center><input type="submit" style="font-size:16px; font-weight:bold; cursor:pointer;" value="Extract" />
</center></center></form>
<?php
if ($_POST['video']!="")
$video = 'files/';
$video=array();
$video[0] = $_POST['video'];
if ($_POST['nvdo']!="")
$nvdo = 'files/';
$nvdo=array();
$nvdo[0] = $_POST['nvdo'];
foreach ($video as $vdo)
foreach ($nvdo as $nvd)
if (isset($_POST["analize"])) {
exec("ffmpeg -i files/$vdo -ab 192k files/$nvd.mp3 -y 2> files/$nvd.txt");
$ext=strtolower(strrchr($vdo,'.'));
/////////////////////////////////////////////////////my code //////////////////////////////////////////
$content = @file_get_contents("files/$nvd.txt");
//get duration of source
preg_match("/Duration: (.*?), start:/", $content, $matches);
$rawDuration = $matches[1];
//rawDuration is in 00:00:00.00 format. This converts it to seconds.
$ar = array_reverse(explode(":", $rawDuration));
$duration = floatval($ar[0]);
if (!empty($ar[1])) $duration += intval($ar[1]) * 60;
if (!empty($ar[2])) $duration += intval($ar[2]) * 60 * 60;
//get the time in the file that is already encoded
preg_match_all("/time=(.*?) bitrate/", $content, $matches);
$rawTime = array_pop($matches);
//this is needed if there is more than one match
if (is_array($rawTime)){$rawTime = array_pop($rawTime);}
//rawTime is in 00:00:00.00 format. This converts it to seconds.
$ar = array_reverse(explode(":", $rawTime));
$time = floatval($ar[0]);
if (!empty($ar[1])) $time += intval($ar[1]) * 60;
if (!empty($ar[2])) $time += intval($ar[2]) * 60 * 60;
//calculate the progress
$progress = round(($time/$duration) * 100);
echo '<br /><br />¡Su video fue convertido correctamente! <br /><br />Link al archivo:';
echo ' <a href="http://stackoverflow.com/feeds/tag/files/'.$nvd.'.mp3">'.$nvd.'.mp3</a><br />' . "<br />";
echo "Duration: " . $duration . "<br />";
echo "Current Time: " . $time . "<br />";
echo "Progress: " . $progress . "%" . "<br />";
//////////////////////////////////////my coed //////////////////////////////////////////////
}
?>
<br /><br /><a href="http://stackoverflow.com/feeds/tag/index.php">Volver al RapidLeech</a>
<br /><br /><br />Formatos Aceptados: <br /><b>.ac3, .avi, .f4v, .flv, .mkv, .mov, .mp3,<br /> .mp4, .mpg, .mpeg, .rmvb, .srt, .swf, .wav, .wmv</b>
<br /><br />
</center>
<?php
?>so i ask some one he told me the exec stop php script and never give me
You can't get the progress directly if you are using exec, because the php script is stopped until ffmpeg closes. (Because exec returns the whole execution output)
You should use popen, for being able to get the output from the process in real time (without reading any file) for parse and show the progressbar
Here is a example for get the output:
When you get the progress info from ffmpeg, you can use your code for parse it and show your progressbarthis is my popen script
<?php
$handle = popen ("ffmpeg.exe -i files/fz.mp4 -ab 192k files/vdf.mp3 2>&1 ", 'r');
$handles = (string)$handle;
$line = "";
while (false !== ($char = fgetc($handle)))
{
if ($char == "\r")
{
// You could now parse the $line for status information.
echo "$line\n";
$line = "";
} else {
$line .= $char;
}
ob_flush();
flush();
}
pclose ($handle);
//get duration of source
preg_match("/Duration: (.*?), start:/", $handles, $matches);
$rawDuration = $matches[1];
//rawDuration is in 00:00:00.00 format. This converts it to seconds.
$ar = array_reverse(explode(":", $rawDuration));
$duration = floatval($ar[0]);
if (!empty($ar[1])) $duration += intval($ar[1]) * 60;
if (!empty($ar[2])) $duration += intval($ar[2]) * 60 * 60;
//get the time in the file that is already encoded
preg_match_all("/time=(.*?) bitrate/", $handles, $matches);
$rawTime = array_pop($matches);
//this is needed if there is more than one match
if (is_array($rawTime)){$rawTime = array_pop($rawTime);}
//rawTime is in 00:00:00.00 format. This converts it to seconds.
$ar = array_reverse(explode(":", $rawTime));
$time = floatval($ar[0]);
if (!empty($ar[1])) $time += intval($ar[1]) * 60;
if (!empty($ar[2])) $time += intval($ar[2]) * 60 * 60;
//calculate the progress
$progress = round(($time/$duration) * 100);
echo '<br /><br />¡Su video fue convertido correctamente! <br /><br />Link al archivo:';
echo "Duration: " . $duration . "<br />";
echo "Current Time: " . $time . "<br />";
echo "Progress: " . $progress . "%" . "<br />";
//////////////////////////////////////my coed //////////////////////////////////////////////
?>so i dont under stand what is good for ffmpeg progressbAR
is exec or popen
so please give me hints for ffmpeg real time progressbar
what is good for progressbar
is html5 progress bar
or javascript progress bar