
Recherche avancée
Autres articles (50)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
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 -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
Sur d’autres sites (8992)
-
Real time ffmpeg output from terminal in php
8 novembre 2014, par user2978381I am using this code to get real time update from windows terminal. It doesn’t output anything in the browser but process the command and in the background and completes the conversion.
set_time_limit(0);
$ffmpegCommand = 'C:\\ffmpeg\\bin\\ffmpeg';
$handle = popen($ffmpegCommand." -i upload/1415292048.mp4 -ar 22050 -ab 32 -f flv -s 640x320 -vcodec libx264 -vsync 1 -bt 50k converted/video001.flv", "r");
if (ob_get_level() == 0)
ob_start();
while(!feof($handle)) {
$buffer = fread($handle, 4096);
$buffer = trim(htmlspecialchars($buffer));
echo "<pre>";
echo $buffer ;
echo str_pad('', 4096);
echo "</pre>";
ob_flush();
flush();
sleep(1);
}
pclose($handle);
ob_end_flush();But when the same code I am using for youtube_dl it updates in the real time.
header('Content-Encoding: none;');
set_time_limit(0);
$handle = popen("python -m youtube_dl -F http://vimeo.com/30261818", "r");
if (ob_get_level() == 0)
ob_start();
while(!feof($handle)) {
$buffer = fread($handle, 4096);
$buffer = trim(htmlspecialchars($buffer));
echo "<pre>";
echo $buffer ;
echo str_pad('', 4096);
echo "</pre>";
ob_flush();
flush();
sleep(1);
}
pclose($handle);
ob_end_flush();So if I want to show output of ffmpeg in the browser what should I do ?
-
How do I use ffprobe in Terminal ?
9 avril 2020, par WesticleWhen I use ffmpeg I use it like this :



./ffmpeg -ss 00:30:00 -i inputvideo.mp4 -t 00:00:20 -c:v copy -c:a copy outputvideo.mp4




So how to I use ffprobe ? I've tried this but I can't get it to work :



./ffmpeg ffprobe -v error -show_frames inputvideo.mp4



-
Debian ffmpeg working in terminal but not in php
30 octobre 2013, par user2938660I reinstalled ffmpeg on debian and php exec doesn't work for me anymore when called from php. I'm using :
if ($success_msg)
{
$tmp_parts = explode('.', $file['name']);
$ext = array_pop($tmp_parts);
$ext = strtolower($ext);
if($ext == "avi" && $convert_avi == true)
{
$convert_source = _VIDEOS_DIR_PATH.$new_name;
$conv_name = substr(md5($file['name'].rand(1,888)), 2, 10).".mp4";
//$conv_name2 = substr(md5($file['name'].rand(1,888)), 2, 10).".mp4";
$converted_file = _VIDEOS_DIR_PATH.$conv_name;
//$fastarted_file = _VIDEOS_DIR_PATH.$conv_name2;
$ffmpeg_command = 'ffmpeg -i '.$convert_source.' -r 20 -g 40 -acodec libfaac -ar 44100 -ab 96k -vcodec libx264 -sameq '.$converted_file;
//$faststart_command = "qt-faststart ".$converted_file." ".$fastarted_file;
shell_exec($ffmpeg_command);
unlink($convert_source);
//shell_exec($faststart_command);
$sql = "UPDATE pm_temp SET url = '".$conv_name."' WHERE url = '".$new_name."' LIMIT 1";
$result = @mysql_query($sql);
}
echo $success_msg;this code to convert videos and ffmpeg output is :
root@1tb:~# ffmpeg -version
ffmpeg version git-2013-10-28-f1f0b01
built on Oct 29 2013 02:05:45 with gcc 4.4.5 (Debian 4.4.5-8)
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
libavutil 52. 48.100 / 52. 48.100
libavcodec 55. 39.100 / 55. 39.100
libavformat 55. 19.104 / 55. 19.104
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 90.100 / 3. 90.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
root@1tb:~#in terminal it works fine just via php not im sure this is server problem and exec is enabled.