
Recherche avancée
Autres articles (80)
-
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 (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
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 (8470)
-
select audio channels with ffmpeg [on hold]
4 août 2015, par Jeckiim pushing my stream to shoutcast server using ffmpeg to decode the stream , right now im using the following :
ffmpeg -loglevel quiet -i udp ://@224.5.0.122:5000 -eng 96000 -f s16le
-f alsa pcm.pulseim trying to select audio from track2 using
-map 0:1
ffmpeg -loglevel quiet -i -map 0:a:1 udp ://@224.3.0.222:5000 -ar
96000 -f s16le -f alsa pcm.pulseoption and its always give me audio signal delayed
any advise what i’m missing here
Regards
-
using ffmpeg plugin with plugin uploaded
17 avril 2013, par Bruno Ribeirogood he uploads the video registers in the database but does not take the print screen of the video and did not register on the database.
<?
class upload{
public $vide;
public $dir_video;
public $dir_screen;
//public $id_user;
//private function video(){
//return isset($_REQUEST["name"]) ? $_REQUEST["name"] : '';
//}
private function id_user(){
return anti_injection($_GET['id']);
}
private function get_duration(){
$getID3 = new getID3;
$file = $getID3->analyze($this->video);
return $file['playtime_string'];
}
private function rand_duration(){
@list($h, $m, $s) = explode(":", $this->get_duration());
$hms = ($h * 3600) + ($m * 60) + $s;
$rhms = rand(0, $hms);
return date('H:i', mktime(0,0,$rhms,0,0,0));
}
private function rand_name(){
$a = base64_encode($this->video);
return @md5(date('Y-m-d H:i:s') * $a);
}
private function get_resolution(){
$getID3 = new getID3;
$file = $getID3->analyze($this->video);
return $file['video']['resolution_x']."x".$file['video']['resolution_y'];
}
private function get_size(){
$getID3 = new getID3;
$file = $getID3->analyze($this->video);
return $file['filesize'];
}
private function get_printscreen(){
$cmd = "ffmpeg -i ".$this->video." -f mjpeg -an -ss ".$this->rand_duration()." -an -vframes 1 -y ".$this->dir_screen.$this->rand_name().".jpg";
return exec($cmd, $output);
//echo "executed command: [".$cmd."] with result: ".print_r($output, true)."<br />\n";
}
private function get_extension($a){
$arquivo = pathinfo($a);
return $arquivo['extension'];
}
private function verify_extension(){
if($this->get_extension() == "flv"){
return "0";
} else {
return "1";
}
}
public function _build(){
// HTTP headers for no cache etc
/*header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
*/
session_start();
// Settings
//$targetDir = ini_get("upload_tmp_dir") . DIRECTORY_SEPARATOR . "plupload";
$targetDir = $this->dir_video;
//$cleanupTargetDir = false; // Remove old files
//$maxFileAge = 60 * 60; // Temp file age in seconds
// 5 minutes execution time
@set_time_limit(5 * 60);
// Uncomment this one to fake upload time
// usleep(5000);
// Get parameters
$chunk = isset($_REQUEST["chunk"]) ? $_REQUEST["chunk"] : 0;
$chunks = isset($_REQUEST["chunks"]) ? $_REQUEST["chunks"] : 0;
$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : '';
// Clean the fileName for security reasons
$fileName = preg_replace('/[^\w\._]+/', '', $fileName);
// Make sure the fileName is unique but only if chunking is disabled
if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) {
$ext = strrpos($fileName, '.');
$fileName_a = substr($fileName, 0, $ext);
$fileName_b = substr($fileName, $ext);
$count = 1;
while (file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName_a . '_' . $count . $fileName_b))
$count++;
$fileName = $fileName_a . '_' . $count . $fileName_b;
}
// Create target dir
if (!file_exists($targetDir))
@mkdir($targetDir);
// Look for the content type header
if (isset($_SERVER["HTTP_CONTENT_TYPE"]))
$contentType = $_SERVER["HTTP_CONTENT_TYPE"];
if (isset($_SERVER["CONTENT_TYPE"]))
$contentType = $_SERVER["CONTENT_TYPE"];
// Handle non multipart uploads older WebKit versions didn't support multipart in HTML5
if (strpos($contentType, "multipart") !== false) {
if (isset($_FILES['file']['tmp_name']) && is_uploaded_file($_FILES['file']['tmp_name'])) {
// Open temp file
$out = fopen($targetDir . DIRECTORY_SEPARATOR . $fileName, $chunk == 0 ? "wb" : "ab");
if ($out) {
// Read binary input stream and append it to temp file
$in = fopen($_FILES['file']['tmp_name'], "rb");
if ($in) {
while ($buff = fread($in, 4096))
fwrite($out, $buff);
} else
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Failed to open input stream."}, "id" : "id"}');
fclose($in);
fclose($out);
@unlink($_FILES['file']['tmp_name']);
} else
die('{"jsonrpc" : "2.0", "error" : {"code": 102, "message": "Failed to open output stream."}, "id" : "id"}');
} else
die('{"jsonrpc" : "2.0", "error" : {"code": 103, "message": "Failed to move uploaded file."}, "id" : "id"}');
} else {
// Open temp file
$out = fopen($targetDir . DIRECTORY_SEPARATOR . $fileName, $chunk == 0 ? "wb" : "ab");
if ($out) {
// Read binary input stream and append it to temp file
$in = fopen("php://input", "rb");
if ($in) {
while ($buff = fread($in, 4096))
fwrite($out, $buff);
} else
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Failed to open input stream."}, "id" : "id"}');
fclose($in);
fclose($out);
} else
die('{"jsonrpc" : "2.0", "error" : {"code": 102, "message": "Failed to open output stream."}, "id" : "id"}');
}
$photoName = $_FILES['file']['name'];
$exploded_photoName = explode('.', $photoName);
$user_id = $_SESSION['SESS_MEMBER_ID'];
if(!isset($_SESSION[$photoName])) {
$_SESSION[$photoName] = '1';
}
if($chunk==1){
$this->get_printscreen();
mysql_query("INSERT INTO video
(poster_id,video,titulo,extension,screen,duration,resolucao,tamanho)
VALUES
('".$this->id_user()."','$fileName','$exploded_photoName[0]','".$this->get_extension($fileName)."','".$this->rand_name().".jpg','".$this->get_duration()."','".$this->get_resolution()."','".$this->get_size()."')")
or die(mysql_error());
}
// Return JSON-RPC response
die('{"jsonrpc" : "2.0", "result" : null, "id" : "id"}');
//$this->get_printscreen();
//return print $this->video();
//return print $this->rand_name();
}
}
?>I'm using the class to become more organized and clean, but I can not get the information from the video and get the printscreen using the plugin class and uploaded.
-
ffmpeg - Continuously stream webcam to single .jpg file (overwrite)
8 octobre 2016, par GermanunkolI have installed ffmpeg and mjpeg-streamer. The latter reads a .jpg file from /tmp/stream and outputs it via http onto a website, so I can stream whatever is in that folder through a web browser.
I wrote a bash script that continuously captures a frame from the webcam and puts it in /tmp/stream :
while true
do
ffmpeg -f video4linux2 -i /dev/v4l/by-id/usb-Microsoft_Microsoft_LifeCam_VX-5000-video-index0 -vframes 1 /tmp/stream/pic.jpg
doneThis works great, but is very slow ( 1 fps). In the hopes of speeding it up, I want to use a single ffmpeg command which continuously updates the .jpg at, let’s say 10 fps. What I tried was the following :
ffmpeg -f video4linux2 -r 10 -i /dev/v4l/by-id/usb-Microsoft_Microsoft_LifeCam_VX-5000-video-index0 /tmp/stream/pic.jpg
However this - understandably - results in the error message :
[image2 @ 0x1f6c0c0] Could not get frame filename number 2 from pattern '/tmp/stream/pic.jpg'
av_interleaved_write_frame(): Input/output error...because the output pattern is bad for a continuous stream of images.
Is it possible to stream to just one jpg with ffmpeg ?
Thanks...