
Recherche avancée
Autres articles (27)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (5104)
-
ffmpeg converter php script not working as expected
8 juillet 2012, par mintuzI have been looking into a php video converter method and have followed a tutorial on how to get one set up. It can read the source video file fine, my script shows an md5, fps rate, bit rate etc but it does not create the destination file. Any suggestions on why my code is not working.
I have tried both system() ; and exec() ; commands, both do not work and safe_mode is off. I have also tried a more basic command
"/usr/bin/ffmpeg -i /home/mintuz/video.avi /var/www/video.flv"
This command however works through the terminal.
<?php
define('FFMPEG_LIBRARY', '/usr/bin/ffmpeg');
//ALTER STUFF HERE
$srcFile = "/home/mintuz/video.avi"; //source file
$destFile = "/var/www/video.flv"; //destination file
if (strpos($srcFile, '.avi'))
{
$type = "avi";
echo $type;
}
if (strpos($srcFile, '.mp4'))
{
$type = "mp4";
echo $type;
}
if (strpos($srcFile, '.mov'))
{
$type = "mov";
echo $type;
}
//-------------------------------------------------------------------------------------------------------------------
// Create our FFMPEG-PHP class
$ffmpegObj = new ffmpeg_movie($srcFile);
// Save our needed variables
$srcWidth = makeMultipleTwo($ffmpegObj->getFrameWidth());
echo "<br />".$srcWidth."<br />";
$srcHeight = makeMultipleTwo($ffmpegObj->getFrameHeight());
echo $srcHeight."<br />";
$srcFPS = $ffmpegObj->getFrameRate();
echo $srcFPS."<br />";
$srcAB = intval($ffmpegObj->getAudioBitRate()/1000);
$srcAR = $ffmpegObj->getAudioSampleRate();
// Call our convert using exec()
$cmd = FFMPEG_LIBRARY." -i ".$srcFile." -ar ".$srcAR." -ab ".$srcAB." -f flv -s ".$srcWidth."x".$srcHeight." ".$destFile;
system($cmd);
echo "Source File MD5 : ".md5_file($srcFile)."<br />";
echo "Destination File MD5 : ".md5_file($destFile);
// Make multiples function
function makeMultipleTwo ($value)
{
$sType = gettype($value/2);
if($sType == "integer")
{
return $value;
} else {
return ($value-1);
}
}
?> -
grab_image is not working for HD videos ?
21 février 2012, par user1222769I am using ffmpeg command for grab_image of converted videos which are in flv format. All videos images are created except for HD videos. The code which i have written is as follws. Thanks in advance.
function grab_image($filename, $rootpath, $inputpath,$outputpath, $no_of_thumbs, $frame_number, $image_format, $width, $height)
$_rootpath = $rootpath."\ffmpeg";
// Media Size
$size = $width."x".$height;
// I am using static image, you can dynamic it with your own choice.
$out=explode(".",$filename);
$outfile = $out[0].".jpg";
//$ffmpegcmd1="ffmpeg -i ".$inputpath."/".$filename." -ss 1.4 -vframes 1 -f image2 ". $outputpath."/".$outfile;
// in local
$ffmpegcmd1="D:/xampp/htdocs/abc/ffmpeg -i ".$inputpath."/".$filename." -r 1 -ss 1.4 -vframes 1 -f image2 ". $outputpath."/".$outfile;
$ret = exec($ffmpegcmd1);
// Execute this command using exec command or any other tool to grab image from converted flv file.
return $ffmpegcmd1;
} -
FFmpeg AVI recording for H264 @ 1fps not working
27 février 2012, par AlamI am recording H.264 (640x480 @1fps 10seconds) in avi container using FFMPEG. When I play the recorded file in VLC, it plays only first frame and rest of the frames are not played. I am getting
main warning : late picture skipped (555293 > -305)
Output of ffprobe is :
FFprobe version 0.6.2-4:0.6.2-1ubuntu1.1~ppa1~lucid1, Copyright (c) 2007-2010 the Libav developers
built on Jan 3 2012 18:16:35 with gcc 4.4.3
configuration: --extra-version='4:0.6.2-1ubuntu1.1~ppa1~lucid1' --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
[h264 @ 0x9feb230]insane cropping not completely supported, this could look slightly wrong ...
[avi @ 0x9fea010]max_analyze_duration reached
Input #0, avi, from 'h2641fps.avi':
Metadata:
ISFT : Lavf52.7.0
Duration: 00:00:11.00, start: 0.000000, bitrate: 95 kb/s
Stream #0.0: Video: h264, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 1 fps, 1 tbr, 1 tbn, 60 tbc
[h264 @ 0x9feb230]insane cropping not completely supported, this could look slightly wrong ...
[STREAM]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
codec_type=video
codec_time_base=1/60
codec_tag_string=H264
codec_tag=0x34363248
width=640
height=480
has_b_frames=0
sample_aspect_ratio=1:1
display_aspect_ratio=4:3
pix_fmt=yuv420p
r_frame_rate=1/1
avg_frame_rate=1/1
time_base=1/1
start_time=0:00:00.000000
duration=0:00:11.000000
nb_frames=11
[/STREAM]Is there something I am doing wrong ? Same code works perfectly for frame rate above 3