
Recherche avancée
Autres articles (60)
-
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
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 (...)
Sur d’autres sites (4635)
-
PHP Run FFMPEG in background, and find out when it's done [closed]
27 septembre 2012, par toms900Possible Duplicate :
Run a ffmpeg process in the backgroundI was wondering if there's any easy way to runn and ffmpeg process in the background so people can leave the page. And if you do that, then tell if the ffmpeg process is running, and when it's done, update the database to "finished". I'll post my code if I need to. Thanks !
Here's the code on the processing page :<?php
$name = $_FILES['upload_file']['name'];
$type = $_FILES['upload_file']['type'];
$size = $_FILES['upload_file']['size'];
$tmpname = $_FILES['upload_file']['tmp_name'];
if (!$title) {
$title = $name;
}
if (!$description) {
$description = "No description available.";
}
$string = substr(str_shuffle(str_repeat('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',10)),0,10);
$videoname = "$string.mp4";
$date = date("F d, Y"); // October 09, 2010
$srcFile = $tmpname;
mkdir("users/$usercode/uploads/$string");
mkdir("users/$usercode/uploads/$string/HD");
mkdir("users/$usercode/uploads/$string/regular");
mkdir("users/$usercode/uploads/$string/mobile_upload");
mkdir("users/$usercode/uploads/$string/thumbnails");
$destFile1 = "/users/$usercode/uploads/$string/HD/$string.mp4";
$destFile2 = "/users/$usercode/uploads/$string/regular/$string.mp4";
$destFile3 = "/users/$usercode/uploads/$string/mobile_upload/$string.mp4";
$ffmpegPath = "/usr/local/bin/ffmpeg";
$flvtool2Path = "/usr/bin/flvtool2";
$yamdiPath = "/usr/bin/yamdi";
$mp4boxPath = "/usr/local/bin/MP4Box";
// Create our FFMPEG-PHP class
$ffmpegObj = new ffmpeg_movie($srcFile);
// Save our needed variables
$srcWidth = $ffmpegObj->getFrameWidth();
$srcHeight = $ffmpegObj->getFrameHeight();
$srcFPS = $ffmpegObj->getFrameRate();
$srcAB = $ffmpegObj->getAudioBitRate();
$srcAR = $ffmpegObj->getAudioSampleRate();
$res = $srcWidth . "x" . $srcHeight;
// Call our convert using exec()
$iphone1 = getcwd().$destFile1;
$iphone2 = getcwd().$destFile2;
$iphone3 = getcwd().$destFile3;
$low = "854x480";
$local_img = "/users/$usercode/uploads/$string/thumbnails/$string.jpg";
$img = getcwd().$local_img;
$img = preg_replace('/ /','\ ',$img);
$thumb = "$string.jpg";
$cmd = "$ffmpegPath -i $tmpname 2>&1";
if (preg_match('/Duration: ((\d+):(\d+):(\d+))/s', `$cmd`, $time)) {
$total = ($time[2] * 3600) + ($time[3] * 60) + $time[4];
$interval = rand(0, $total);
}
$img = shell_exec("$ffmpegPath -ss $interval -i $tmpname 2>&1 -s 120x90 -f mjpeg -vframes 1 $img");
if ($srcWidth >= 1280 && $srcHeight >= 720) {
$out1 = shell_exec("$ffmpegPath -i $tmpname -f mp4 -vcodec libx264 -vpre normal -ab $srcAB -ar $srcAR -b 5000k -r $srcFPS -s $res -acodec libfaac $iphone1");
$out2 = shell_exec("$mp4boxPath -inter 0.5 $iphone1");
$out3 = shell_exec("$ffmpegPath -i $tmpname -f mp4 -vcodec libx264 -vpre normal -ab $srcAB -ar $srcAR -b 2000k -r $srcFPS -s $low -acodec libfaac $iphone2");
$out4 = shell_exec("$mp4boxPath -inter 0.5 $iphone2");
$out5 = shell_exec("$ffmpegPath -i $tmpname -f mp4 -vcodec libx264 -vpre slow -ab 64k -ar 44100 -b 500k -r 30 -s $low -acodec libfaac $iphone3");
$out6 = shell_exec("$mp4boxPath -inter 0.5 $iphone3");
echo 1;
}
else {
$out3 = shell_exec("$ffmpegPath -i $tmpname -f mp4 -vcodec libx264 -vpre normal -ab 64k -ar 44100 -b 500k -r 30 -s $low -acodec libfaac $iphone2");
$out4 = shell_exec("$mp4boxPath -inter 0.5 $iphone2");
$out5 = shell_exec("$ffmpegPath -i $tmpname -f mp4 -vcodec libx264 -vpre slow -ab 64k -ar 44100 -b 500k -r 30 -s $low -acodec libfaac $iphone3");
$out6 = shell_exec("$mp4boxPath -inter 0.5 $iphone3");
echo 1;
}
function generate_random($number_of_characters)
{
$characters = array();
$randomchar = "";
$x = 0;
for($i = 48; $i < 123; $i++)
{
if(ctype_alnum(chr($i)))
{
$characters[$x] = chr($i);
$x++;
}
}
for($i = 0; $i < $number_of_characters; $i++)
{
$randomchar .= $characters[rand(0, count($characters) - 1)];
}
return $randomchar;
}
?> -
Bad quality output with FFmpeg, bitrate specified [closed]
28 septembre 2012, par Darkman2412I have a static background image where I add 2 videos on top of it using FFmpeg CLI. The output file (
test.avi
in this case), is very bad quality.ffmpeg -loop 1 -i outro.png
-vf "movie='intro.mov' [last], [last]scale=512:288[scaled1], [in][scaled1] overlay=290:396 [tmp];
movie='intro2.mov' [featured], [featured]scale=512:288[scaled2], [tmp][scaled2] overlay=1118:396 [out]" -b 512k -t 10 -r 30 -y test.aviThe first image is the first frame of
test.avi
.
The second one is what it should be.Edit : my question is why it's such bad quality.
Edit2 : Console output :
ffmpeg version N-44601-gcb3591e Copyright (c) 2000-2012 the FFmpeg developers
built on Sep 19 2012 16:31:43 with gcc 4.7.1 (GCC)
configuration: --enable-gpl --enable-version3 --disable-pthreads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 56.100 / 54. 56.100
libavformat 54. 27.101 / 54. 27.101
libavdevice 54. 2.100 / 54. 2.100
libavfilter 3. 16.104 / 3. 16.104
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[image2 @ 0000000001f4fa40] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, image2, from 'outro.png':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0:0: Video: png, rgba64be, 1920x1080, 25 tbr, 25 tbn, 25 tbc
Please use -q:a or -q:v, -qscale is ambiguous
Output #0, avi, to 'test.avi':
Metadata:
ISFT : Lavf54.27.101
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1920x1080, q=2-31, 200 kb/s, 30 tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (png -> mpeg4)
Press [q] to stop, [?] for help
frame= 6 fps=0.0 q=2.0 size= 72kB time=00:00:00.23 bitrate=2527.9kbits/s
frame= 12 fps= 11 q=2.0 size= 115kB time=00:00:00.46 bitrate=2013.6kbits/s
frame= 18 fps= 11 q=2.0 size= 190kB time=00:00:00.70 bitrate=2223.8kbits/s
frame= 24 fps= 11 q=2.0 size= 235kB time=00:00:00.96 bitrate=1987.4kbits/s
frame= 30 fps= 11 q=2.0 size= 314kB time=00:00:01.20 bitrate=2142.8kbits/s
frame= 36 fps= 11 q=2.0 size= 368kB time=00:00:01.43 bitrate=2102.2kbits/s
frame= 42 fps= 11 q=2.0 size= 457kB time=00:00:01.66 bitrate=2247.6kbits/s
frame= 48 fps= 11 q=2.0 size= 510kB time=00:00:01.90 bitrate=2199.8kbits/s
frame= 54 fps= 11 q=2.0 size= 596kB time=00:00:02.16 bitrate=2253.9kbits/s
frame= 60 fps= 11 q=2.0 size= 649kB time=00:00:02.40 bitrate=2216.5kbits/s
frame= 66 fps= 11 q=2.0 size= 718kB time=00:00:02.63 bitrate=2232.9kbits/s
frame= 72 fps= 11 q=2.0 size= 779kB time=00:00:02.86 bitrate=2226.4kbits/s
frame= 78 fps= 11 q=2.0 size= 868kB time=00:00:03.10 bitrate=2293.0kbits/s
frame= 84 fps= 11 q=2.0 size= 956kB time=00:00:03.36 bitrate=2325.8kbits/s
frame= 90 fps= 11 q=2.0 size= 1049kB time=00:00:03.60 bitrate=2386.2kbits/s
frame= 96 fps= 11 q=2.0 size= 1143kB time=00:00:03.83 bitrate=2442.9kbits/s
frame= 101 fps= 11 q=2.0 size= 1224kB time=00:00:04.03 bitrate=2485.2kbits/s
frame= 106 fps= 10 q=2.0 size= 1259kB time=00:00:04.23 bitrate=2436.7kbits/s
frame= 111 fps= 10 q=2.0 size= 1326kB time=00:00:04.43 bitrate=2449.5kbits/s
frame= 116 fps= 10 q=2.0 size= 1355kB time=00:00:04.63 bitrate=2396.5kbits/s
frame= 121 fps= 10 q=2.0 size= 1409kB time=00:00:04.83 bitrate=2388.1kbits/s
frame= 127 fps= 10 q=2.0 size= 1424kB time=00:00:05.06 bitrate=2302.5kbits/s
frame= 133 fps= 10 q=2.0 size= 1480kB time=00:00:05.30 bitrate=2286.8kbits/s
frame= 139 fps= 10 q=2.0 size= 1497kB time=00:00:05.56 bitrate=2203.7kbits/s
frame= 145 fps= 10 q=2.0 size= 1552kB time=00:00:05.80 bitrate=2191.8kbits/s
frame= 151 fps= 10 q=2.0 size= 1567kB time=00:00:06.03 bitrate=2127.6kbits/s
frame= 157 fps= 10 q=2.0 size= 1621kB time=00:00:06.26 bitrate=2119.2kbits/s
frame= 163 fps= 10 q=2.0 size= 1641kB time=00:00:06.50 bitrate=2068.1kbits/s
frame= 169 fps= 10 q=2.0 size= 1710kB time=00:00:06.76 bitrate=2070.3kbits/s
frame= 175 fps= 10 q=2.0 size= 1750kB time=00:00:07.00 bitrate=2047.9kbits/s
frame= 181 fps= 10 q=2.0 size= 1834kB time=00:00:07.23 bitrate=2077.6kbits/s
frame= 187 fps= 10 q=2.0 size= 1876kB time=00:00:07.46 bitrate=2058.4kbits/s
frame= 193 fps= 10 q=2.0 size= 1962kB time=00:00:07.70 bitrate=2087.7kbits/s
frame= 199 fps= 10 q=2.0 size= 2005kB time=00:00:07.96 bitrate=2061.5kbits/s
frame= 205 fps= 10 q=2.0 size= 2088kB time=00:00:08.20 bitrate=2086.1kbits/s
frame= 211 fps= 10 q=2.0 size= 2126kB time=00:00:08.43 bitrate=2065.0kbits/s
frame= 217 fps= 10 q=2.0 size= 2201kB time=00:00:08.66 bitrate=2080.5kbits/s
frame= 223 fps= 10 q=2.0 size= 2230kB time=00:00:08.90 bitrate=2052.8kbits/s
frame= 229 fps= 10 q=2.0 size= 2293kB time=00:00:09.16 bitrate=2049.5kbits/s
frame= 235 fps= 10 q=2.0 size= 2307kB time=00:00:09.40 bitrate=2010.4kbits/s
frame= 241 fps= 10 q=2.0 size= 2366kB time=00:00:09.63 bitrate=2011.8kbits/s
frame= 247 fps= 10 q=2.0 size= 2409kB time=00:00:09.86 bitrate=2000.1kbits/s
frame= 250 fps= 10 q=2.0 Lsize= 2438kB time=00:00:10.00 bitrate=1997.2kbits/s
video:2425kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.523809% -
Error ffmpeg and libvpx to convert to webm [closed]
6 avril 2016, par Olaf ErlandsenI have a problems with Ffmpeg and Libvpx on Centos6 Server.
Command :
ffmpeg -y -i /var/www/f1ccd3a27d36270492ce660da358b436.mp4 -t 99 acodec copy -vcodec libvpx -f webm /var/www/f1ccd3a27d36270492ce660da358b436.webm 2<&1
Output :
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
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
Seems stream 1 codec frame rate differs from container frame rate: 59.94 (2997/50) -> 29.97 (30000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/vhosts/f1ccd3a27d36270492ce660da358b436.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isomavc1mp42
Duration: 00:04:16.32, start: 0.000000, bitrate: 650 kb/s
Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16, 108 kb/s
Stream #0.1(und): Video: h264, yuv420p, 480x360 [PAR 1:1 DAR 4:3], 539 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
Unknown encoder 'libvpx'Ffmpeg configuration :
--prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
Problem :
Unknown encoder 'libvpx'