
Recherche avancée
Autres articles (23)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)
Sur d’autres sites (5956)
-
Audio decoding using ffms2(ffmegsource)
1er mai 2013, par praks411I'm using ffms2(ffmpegsource) a wrapper around libav to get video and audio frame from a file.
Video decoding is working fine. However I'm facing some issues with audio decoding.
FFMS2 provide a simple functionFFMS_GetAudio(FFMS_AudioSource *A, void *Buf, int64_t Start, int64_t Count, FFMS_ErrorInfo *ErrorInfo);
api to get the decoded buffer. The decoded data is return in buffer provided by user.For single channel the data is interpretation is straight forward with data byte starting from first location of user buffer. However when it comes to two channel there are two possibilities the decoded data could be planar or interleaved depending upon sample format return by FFMS_GetAudioProperties. In my case the sample format is always planar which means that decoded data will in two sperate data plane data[0] and data[1]. And this is what is explained by libav/ffmpeg and also by portaudio which consider planar data to be in two separate data plane.
However FFMS_GetAudio just take single buffer from user. So can I assume for planar data
data[0] = buf, data[1] = buf + offset, where offset is half the length of buffer return by FFMS_GetAudio.FFMS does not provide any good document for this interpretation. It would be great help if some can provide more information on this.
-
FFmpeg detecting the first frame after a commercial
5 novembre 2013, par William Joe BaldwinI've been searching for a way to detect the very first frame after a commercial in FFmpeg.
My recorder records TV shows, approximately 1 second before the sequence.
Therefore the video file starts with few frames of the commercial.By checking the page below, it seems there is a way to detect scene changes :
Extract Thumbnails of Every Camera Change on a Video File
Does anyone know a way to rewrite the code from the link to get the first scene change as frame count ?
Thanks !
-
ffmpeg fails on conversion from .mov to .mp4 fails aT 98%
3 avril 2013, par user2241249Our code is below. When converting a uploaded
.mov
to.mp4
the conversion halts at 98%.Almost all of our other preferred formats encode flawlessly. Anyone has any clue on where we went wrong ? We are struggling on this for a while now so we want to ask the experts, thanks in advance for any help.
<?php
$Path = dirname(__FILE__) . "/";
$url = "http://" . $_SERVER['SERVER_NAME'] . str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'])) . "/";
session_start();
include_once 'inc/config.inc.php';
include_once 'common.php';
include_once 'inc/ffmpegprogressbar.class.php';
ob_flush();
?>
<?php
// Specifie Inputfile for FFMPEG
$count = count($_SESSION['Files']);
// $file = array_pop($_SESSION['Files']);
$FileInstance = array_pop($_SESSION['Files']);
//$FileInstance = $_SESSION['Files'][0];
$file = $FileInstance['FileName'];
$passNeeded = $FileInstance['PassNeeded'];
$fmt = $FileInstance['fmt'];
$FFMPEGInput = $Path . 'data/' . $_SESSION['OldSession'] . "/" . $file;
$timeUnique = time();
//echo "Start:Session holds: ".$_SESSION["cstatus"].", cstatus var = $cstatus";
/* if ($FileInstance['PassNeeded'] == 5) {
$FFMPEGParams = "-r 1000 -ar 11025 -ab 32 -f $fmt -sameq -g 15 -s 1920x1080";
} else if ($FileInstance['PassNeeded'] == 4) {
$FFMPEGParams ="-r 1000 -ar 11025 -ab 32 -f $fmt -sameq -g 15 -s 1280x720";
} else if ($FileInstance['PassNeeded'] == 3) {
$FFMPEGParams = "-r 1000 -ar 11025 -ab 32 -f $fmt -sameq -g 15 -s 854x480";
} else if ($FileInstance['PassNeeded'] == 2) {
$FFMPEGParams = "-r 1000 -ar 11025 -ab 32 -f $fmt -sameq -g 15 -s 640x360";
}
*/
if($fmt=="flv"){
if ($FileInstance['PassNeeded'] == 5) {
$FFMPEGParams = "-r 1000 -ar 11025 -ab 32 -f $fmt -sameq -g 15 -s 1920x1080";
} else if ($FileInstance['PassNeeded'] == 4) {
$FFMPEGParams ="-r 1000 -ar 11025 -ab 32 -f $fmt -sameq -g 15 -s 1280x720";
} else if ($FileInstance['PassNeeded'] == 3) {
$FFMPEGParams = "-r 1000 -ar 11025 -ab 32 -f $fmt -sameq -g 15 -s 854x480";
} else if ($FileInstance['PassNeeded'] == 2) {
$FFMPEGParams = "-r 1000 -ar 11025 -ab 32 -f $fmt -sameq -g 15 -s 640x360";
}
}elseif($fmt=="mp4"){
$FFMPEGParams = " -pix_fmt yuv420p -s 640x360";
}elseif($fmt=="ogv"){
$FFMPEGParams = " -acodec libvorbis -ac 2 -ab 96k -ar 44100 -b 125k -s 640x360";
}elseif($fmt=="webm"){
$FFMPEGParams = " -acodec libvorbis -ac 2 -ab 96k -ar 44100 -b 125k -s 640x360";
//}elseif($fmt!==""){
//-i %1 -s qvga -acodec libfaac -ar 22050 -ab 128k -vcodec libx264 -threads 0 -f ipod %2
//-vcodec mpeg4 -acodec aac output.mp4
//$FFMPEGParams = "-r 20 -ar 44100 -ab 196 -f $fmt -s 480x351";
}
if ($FileInstance['PassNeeded'] > 2) {
$FileInstance['PassNeeded'] = $FileInstance['PassNeeded'] - 1;
array_unshift($_SESSION['Files'], $FileInstance);
}
$flv_rpath = 'data/' . $_SESSION['OldSession'] . "/" . $file. $timeUnique . ".".$fmt;
$FFMPEGOutput = $FFMPEGInput . $timeUnique . ".$fmt";
$_SESSION['ConvertedFiles'][$file][] = array('Pass' => $passNeeded, 'OutFile' => $file . $timeUnique . ".$fmt","fmt"=>$fmt);
if (!$_GET["pkey"]) {
$pkey = rand();
} elseif (file_exists('log/' . $_GET["pkey"] . '.ffmpeg')) {
$pkey = $_GET["pkey"];
} else {
$pkey = rand();
}
// initializing and create ProgressBar
flush();
$FFMPEGProgressBar = &new FFMPEGProgressBar();
flush();
// Show Progressbar
if ($count > 0) {
if ($FileInstance['PassNeeded'] < 3) {
define('FFMPEG_LIBRARY', '/usr/local/bin/ffmpeg ');
$extension = "ffmpeg";
$extension_soname = $extension . "." . PHP_SHLIB_SUFFIX;
$extension_fullname = PHP_EXTENSION_DIR . "/" . $extension_soname;
if (!extension_loaded($extension)) {
dl($extension_soname) or die("Can't load extension $extension_fullname\n");
}
exec(FFMPEG_LIBRARY . " -y -i '" . $FFMPEGInput . "' -vframes 1 -ss 00:00:03 -an -vcodec png -f rawvideo -s 160x90 '$FFMPEGInput.png'");
}
$FFMPEGProgressBar->Show($pkey, $count, $url, $passNeeded, $file, $timeUnique,$fmt);
if (!$_GET["pkey"] || !file_exists('log/' . $_GET["pkey"] . '.ffmpeg')) {
flush();
$FFMPEGProgressBar = &new FFMPEGProgressBar();
flush();
@$FFMPEGProgressBar->execFFMPEG($FFMPEGInput, $FFMPEGOutput, $FFMPEGParams, $pkey);
flush();
$_SESSION['new_space']["video"] = 'data/' . $_SESSION['OldSession'] . "/" . $file;
$_SESSION['new_space']["{$FileInstance['name']}"] = $flv_rpath;
$_SESSION['new_space']["session"] = $_SESSION['OldSession'];
}
//echo "End:Session holds: ".$_SESSION["cstatus"].", cstatus var = $cstatus";
} else {
// header("Location: $url" . "index.php" );
echo "<code class="echappe-js"><script type=\"text/javascript\">window.location.href=&#39;" . $url . "&#39;;</script>No Input " ;
}
// ShowProgressbar
?>