
Recherche avancée
Médias (91)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
-
Les Miserables
4 juin 2012, par
Mis à jour : Février 2013
Langue : English
Type : Texte
-
Ne pas afficher certaines informations : page d’accueil
23 novembre 2011, par
Mis à jour : Novembre 2011
Langue : français
Type : Image
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Richard Stallman et la révolution du logiciel libre - Une biographie autorisée (version epub)
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (50)
-
Participer à sa documentation
10 avril 2011La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
Pour ce faire, vous pouvez vous inscrire sur (...) -
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 (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)
Sur d’autres sites (5606)
-
(osx) ffmpeg combining mp3 and png to mp4 resulting in mp4 with no audio
18 juin 2016, par Ian HI’m writing a python script that uses unix commands to do some file conversions/renderings. I’m trying to join some mp3 files with png files to get mp4s that are the picture with the mp3 playing over them. However, I’ve tried this with lots of different codecs and settings, and the output mp4 video never seems to have audio in it. I’ve looked at any answer to any question even related to ffmpeg and haven’t found a solution.
Some commands I’m trying to get working currently :
ffmpeg -loop 1 -i slide_shot%d.png -i %s -c:v libx264 -pix_fmt yuv420p
-s 720x540 -t %.3f -c:a aac -b:a 192k -shortest out%d.mp4"
% (i, aud, slideTime, i)
ffmpeg -loop 1 -i slide_shot%d.png -i %s -shortest -t %.3f -write_xing
0 -c:v libx264 -c:a libmp3lame -pix_fmt yuv420p -tune stillimage out%d.mp4"
% (i, aud, slideTime, i)
ffmpeg -loop 1 -i slide_shot%d.png -i %s -shortest -t %.3f -write_xing
0 -c:v libx264 -c:a copy -pix_fmt yuv420p -tune stillimage out%d.mp4"
% (i, aud, slideTime, i)I’m currently using the third one. However, none of them are giving me any audio. For reference, i is a loop iterator for naming consistency, aud is the audio filepath, and slideTime is the number of seconds the video should take.
Using this command, I’m currently getting this output in the Terminal :
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 7.0.2 (clang-700.1.81)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0.2 --enable-shared
--enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-
tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --
enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --
enable-vda
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, png_pipe, from 'slide_shot16.png':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: png, rgba(pc), 720x540, 25 fps, 25 tbr, 25 tbn, 25
tbc
[mp3 @ 0x7fe4f1817e00] Skipping 0 bytes of junk at 0.
[mp3 @ 0x7fe4f1817e00] Estimating duration from bitrate, this may be inaccurate
Input #1, mp3, from 'pres_projects/Cytokine sepsis 13/data/a24x43.mp3':
Duration: 00:02:04.11, start: 0.000000, bitrate: 23 kb/s
Stream #1:0: Audio: mp3, 22050 Hz, mono, s16p, 24 kb/s
[libx264 @ 0x7fe4f1808000] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x7fe4f1808000] profile High, level 3.0
[libx264 @ 0x7fe4f1808000] 264 - core 148 r2668 fd2c324 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:-3:-3 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=2.00:0.70 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-4 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.20
Output #0, mp4, to 'out16.mp4':
Metadata:
encoder : Lavf57.25.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 720x540, q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc57.24.102 libx264
Side data:
unknown side data type 10 (24 bytes)
Stream #0:1: Audio: mp3 (i[0][0][0] / 0x0069), 22050 Hz, mono, 24 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Stream #1:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 132 fps=0.0 q=28.0 size=40kB time=00:00:02.96 bitrate=111.8kbits/
frame= 272 fps=271 q=28.0 size= 61kB time=00:00:08.56 bitrate= 58.2kbits/
frame= 404 fps=269 q=28.0 size= 113kB time=00:00:13.84 bitrate= 66.6kbits/
frame= 537 fps=268 q=28.0 size= 132kB time=00:00:19.16 bitrate= 56.2kbits/
frame= 672 fps=268 q=28.0 size= 184kB time=00:00:24.56 bitrate= 61.3kbits/
frame= 808 fps=268 q=28.0 size= 236kB time=00:00:30.00 bitrate= 64.5kbits/
frame= 943 fps=268 q=28.0 size= 255kB time=00:00:35.40 bitrate= 59.1kbits/
frame= 1087 fps=271 q=28.0 size= 309kB time=00:00:41.16 bitrate= 61.5kbits/
frame= 1219 fps=270 q=28.0 size= 328kB time=00:00:46.44 bitrate= 57.8kbits/
frame= 1355 fps=270 q=28.0 size= 380kB time=00:00:51.88 bitrate= 60.0kbits/frame= 1494 fps=271 q=28.0 size= 400kB time=00:00:57.44 bitrate= 57.1kbits/
frame= 1632 fps=271 q=28.0 size= 453kB time=00:01:02.96 bitrate= 58.9kbits/
frame= 1767 fps=271 q=28.0 size= 472kB time=00:01:08.36 bitrate= 56.6kbits/
frame= 1893 fps=269 q=28.0 size= 523kB time=00:01:13.40 bitrate= 58.4kbits/
frame= 2020 fps=268 q=28.0 size= 541kB time=00:01:18.48 bitrate= 56.5kbits/
frame= 2147 fps=267 q=28.0 size= 592kB time=00:01:23.56 bitrate= 58.1kbits/
frame= 2275 fps=267 q=28.0 size= 611kB time=00:01:28.68 bitrate= 56.4kbits/
frame= 2401 fps=266 q=28.0 size= 661kB time=00:01:33.72 bitrate= 57.8kbits/
frame= 2528 fps=265 q=28.0 size= 680kB time=00:01:38.80 bitrate= 56.4kbits/
frame= 2654 fps=264 q=28.0 size= 731kB time=00:01:43.84 bitrate= 57.6kbits/
frame= 2781 fps=264 q=28.0 size= 749kB time=00:01:48.92 bitrate= 56.3kbits/
frame= 2906 fps=263 q=28.0 size= 799kB time=00:01:53.92 bitrate= 57.5kbits/
frame= 3033 fps=263 q=28.0 size= 818kB time=00:01:59.00 bitrate= 56.3kbits/
frame= 3102 fps=261 q=-1.0 Lsize= 983kB time=00:02:04.08 bitrate= 64.9kbits/s speed=10.5x
video:505kB audio:364kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 13.169518%
[libx264 @ 0x7fe4f1808000] frame I:13 Avg QP:14.07 size: 33159
[libx264 @ 0x7fe4f1808000] frame P:782 Avg QP: 6.24 size: 36
[libx264 @ 0x7fe4f1808000] frame B:2307 Avg QP: 9.67 size: 25
[libx264 @ 0x7fe4f1808000] consecutive B-frames: 0.8% 0.0% 0.0% 9 9.2%
[libx264 @ 0x7fe4f1808000] mb I I16..4: 44.1% 26.2% 29.6%
[libx264 @ 0x7fe4f1808000] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip:100.0%
[libx264 @ 0x7fe4f1808000] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.1% 0.0% 0.0% direct: 0.0% skip:99.9% L0:40.4% L1:59.6% BI: 0.0%
[libx264 @ 0x7fe4f1808000] 8x8 transform intra:26.1% inter:77.7%
[libx264 @ 0x7fe4f1808000] coded y,uvDC,uvAC intra: 23.8% 9.6% 8.1% inter: 0.0% 0.0% 0.0%
[libx264 @ 0x7fe4f1808000] i16 v,h,dc,p: 60% 33% 7% 0%
[libx264 @ 0x7fe4f1808000] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 57% 12% 29% 0% 0% 0% 0% 0% 2%
[libx264 @ 0x7fe4f1808000] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 29% 14% 2% 3% 4% 4% 3% 4%
[libx264 @ 0x7fe4f1808000] i8c dc,h,v,p: 74% 21% 5% 0%
[libx264 @ 0x7fe4f1808000] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7fe4f1808000] ref P L0: 95.4% 1.1% 3.5%
[libx264 @ 0x7fe4f1808000] ref B L0: 8.5% 90.2% 1.3%
[libx264 @ 0x7fe4f1808000] kb/s:33.31Has anyone ran into a similar problem, and if so, how did you go about fixing it ? Thanks in advance for looking at my question.
-
What is Behavioural Segmentation and Why is it Important ?
28 septembre 2023, par Erin — Analytics Tips -
FFMPEG MP4 conversion takes so long its not practical
30 avril 2018, par Chrisco420365I want to start out by saying that I’m not just stating the fact that FFMPEG to MP4 conversion is so slow, but I’m hoping someone here can help me with this as I’ve searched around and haven’t really found out what to do in order to fix my problem.
So I found a script that seems to do the job for me, it inputs several video file formats and will in turn convert to MP4 which I will later allow the web user to watch online.
Two main things are done in this script by FFMPEG, a still image is captured in .jpg format and the video is converted to MP4. After some tweaking the script seems to work but at first I thought that it wasn’t working, that it was simply halting my server.
Let me back up for a minute... I am using FFMPEG on my development server, which is really just my crappy laptop with XAMPP installed on Windows 10 and only 2GB of RAM. Once I have the site working perfectly I will move from my crappy laptop development environment to probably a entry level dedicated server hosting plan from Godaddy or other, since at first I expect the traffic to my website to be very low.
The problem I am having is I am testing out the script that I will show you, and even with a 10MB video, it takes over 2 minutes to finish. Meanwhile the upload progress bar shows 100% since the upload is in fact complete, but no message for the user to know that something is going on behind the scenes. Obviously that I can figure out how to fix myself, maybe even just put a message letting them know that it will be a few minutes. When I tried a video that is 120MB, it took over 5 minutes which means I had to not only modify my php.ini file to allow for such script execution times, but it also makes it so that I can do nothing on the website while this is happening.
Not only can I not even so much as scroll the page up or down, but if I try to open another tab and load my website it just sits there with a blank screen as if its trying to access my site. Obviously it’s because FFMPEG is using up all system resources during its conversion of the video file. If I open file explorer and click once on the video file that is being created, and continue clicking once on it I’ll see the file size of this file slowly get larger and larger, which is obvious since the file is being filled. This problem of course is with no users on it other than myself since its in its development stage, so I wonder what it will be like on a dedicated server with users online. Will the other users not be able to do anything for however many minutes until whoever is uploading a video has their video finished ?
Should it be necessary for me to increase the max execution time in the php.ini file to more than 5 minutes for a 120MB file ? What will happen if a user tries to upload a file larger than 120MB ? Should I cut them off at 500MB perhaps ?
I love the fact that my users will be able to upload videos and I can get thumbnails and even convert to MP4 to display using HTML5 but not thrilled if noone, including the user uploading the video, can use the site as the system resources are pegged. The last time I uploaded a video on YouTube I think I remember a message saying that it would take several minutes to finish but I don’t remember the website just completely stopping for several minutes. Perhaps this is because I’m running on my insignificant laptop ?
While searching for answers to this I did come across some people complaining about it being slow but didn’t find any solutions and in fact don’t think I saw people saying it completely locked up the website until finished. As I said, I’d hate for others not to be able to get to my website or be kicked off simply because someone is uploading a video.
Perhaps this is a common issue that can be resolved with a powerful enough dedicated server once I move to production ? I would greatly appreciate any and all suggestions on how to resolve this so the user may at least continue using other areas of our website, while the conversion is taking place. I can send them an alert once the conversion is finished. If there are any suggestions as to a minimum dedicated server specs that would help alleviate this from happening, I am all ears ! :) Thanks !
Here is the script that I’m currently using :
<?php
include_once($_SERVER['DOCUMENT_ROOT'].'/includes/dbc.php');
// size input prevents buffer overrun exploits.
function sizeinput($input, $len){
(int)$len;
(string)$input;
$n = substr($input, 0,$len);
$ret = trim($n);
$out = htmlentities($ret, ENT_QUOTES);
return $out;
}
//Check the file is of correct format.
function checkfile($input){
$ext = array('mpg', 'wma', 'mov', 'flv', 'mp4', 'avi', 'qt', 'wmv', 'rm');
$extfile = substr($input['name'],-4);
$extfile = explode('.',$extfile);
$good = array();
$extfile = $extfile[1];
if(in_array($extfile, $ext)){
$good['safe'] = true;
$good['ext'] = $extfile;
}else{
$good['safe'] = false;
}
return $good;
}
$user_id = $_SESSION['user_id'];
// if the form was submitted process request if there is a file for uploading
if($_POST && array_key_exists("vid_file", $_FILES)){
//$uploaddir is for videos before conversion
$uploaddir = 'temp/';
//$live_dir is for videos after converted to flv
$live_dir = 'library/';
//$live_img is for the first frame thumbs.
$live_img = 'thumbs/';
$seed = time();
$upload = $seed;
$uploadfile = 'temp/'.$upload.'.mp4';
$vid_title = sizeinput($_POST['vidTitle'], 50);
$vid_title = sanitizeString($vid_title);
$vid_desc = sizeinput($_POST['vidDesc'], 2000);
$vid_desc = sanitizeString($vid_desc);
$vid_cat = (int)$_POST['vidCat'];
$safe_file = checkfile($_FILES['vid_file']);
if($safe_file['safe'] == 1){
if (move_uploaded_file($_FILES['vid_file']['tmp_name'], 'temp/'.$upload.'.mp4')) {
echo "File was successfully uploaded.<br />";
//$base = basename($uploadfile, $safe_file['ext']);
$new_file = $seed.'.mp4';
$new_image = $seed.'.jpg';
$new_image_path = "thumbs/".$seed.'.jpg';
$new_flv = "library/".$new_file;
//exec('ffmpeg -i '.$uploadfile.' -an -ss 00:00:01-r 1 -vframes 1 -f mjpeg -y '.$new_image_path);
exec('ffmpeg -i '.$uploadfile.' -f mjpeg -vframes 1 -s 300x300 -an '.$new_image_path.'');
//ececute ffmpeg generate flv
exec('ffmpeg -i '.$uploadfile.' -f mp4 '.$new_flv);
//execute ffmpeg and create thumb
echo 'Thank You For Your Video!<br />';
//create query to store video
$sql = "INSERT INTO videos (`user_id`, `title`,`desc`, `file`, `thumb`) VALUES('".$user_id."','".$vid_title."','".$vid_desc."','".$new_file."','".$new_image."')";
echo '<img src="http://stackoverflow.com/feeds/tag/'.$new_image_path.'" style='max-width: 300px; max-height: 300px' /><br />
<h3>'.$vid_title.'</h3>';
mysqli_query($link, $sql) or die(mysqli_error($mysql));
} else {
echo "Possible file upload attack!\n";
print_r($_FILES);
}
}else{
echo 'Invalid File Type Please Try Again. You file must be of type
.mpg, .wma, .mov, .flv, .mp4, .avi, .qt, .wmv, .rm';
}
}
?>