
Recherche avancée
Autres articles (74)
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
MediaSPIP : Modification des droits de création d’objets et de publication définitive
11 novembre 2010, parPar défaut, MediaSPIP permet de créer 5 types d’objets.
Toujours par défaut les droits de création et de publication définitive de ces objets sont réservés aux administrateurs, mais ils sont bien entendu configurables par les webmestres.
Ces droits sont ainsi bloqués pour plusieurs raisons : parce que le fait d’autoriser à publier doit être la volonté du webmestre pas de l’ensemble de la plateforme et donc ne pas être un choix par défaut ; parce qu’avoir un compte peut servir à autre choses également, (...) -
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
Sur d’autres sites (7261)
-
php sequential exec() processes not working (ffmpeg encode)
26 juillet 2012, par Allen HallI am trying to run a php script from shell that will query a table of videos, check if the encoded version of that video exists, and if not, encode one. I have tested all of the contents of the exec() commands outside of php so I know they work fine. My problem is when the ffmpeg line runs, it finishes but the script quits. I want it to run the next exec() and I don't understand why it won't.
Also to avoid confusion, I am not trying to run these simultaneously, and I don't care about running in the background since this is running from the shell anyway. I just want these 4 commands to execute sequentially and then continue to the next file.
include 'inc/functions.php';
$result = mysql_query("SELECT * FROM videos") or die(mysql_error());
while ($row = mysql_fetch_array($result)) {
if(!file_exists('/opt/lampp/htdocs/videos/'.$row['file_folder'].'/'.$row['file_name'].'.mp4')) {
exec('ffmpeg -i "/opt/lampp/htdocs/videos/'.$row['file_folder'].'/'.$row['file_name'].'" -vcodec libx264 -vpre fast -b 512k -acodec libfaac -ab 128k -ac 2 "/opt/lampp/htdocs/videos/'.$row['file_folder'].'/output.mp4"') or die('could not encode movie');
exec('/usr/lib/qt-faststart "/opt/lampp/htdocs/videos/'.$row['file_folder'].'/output.mp4" "/opt/lampp/htdocs/videos/'.$row['file_folder'].'/'.$row['file_name'].'.mp4"') or die('could not move mp4 atoms');
exec('rm -f "/opt/lampp/htdocs/videos/'.$row['file_folder'].'/output.mp4"') or die('could not delete original encode');
exec('ffmpeg -ss 00:00:30.00 -i "/opt/lampp/htdocs/videos/'.$row['file_folder'].'/'.$row['file_name'].'" -y -f image2 -vcodec mjpeg -vframes 1 "'.$row['file_name'].'.jpg"') or die('could not create screenshot');
}
} -
sws_scale screws up last pixel row in smaller x264 mp4 encoding
23 juillet 2012, par TheSHEEEPI am muxing pictures in the PIX_FMT_ARGB format into an mp4 video.
All of it works well, except that the last pixel row of the outgoing image is screwed up, in most cases the last row is completely black, sometimes there are other colors, it seems somehow dependant on the machine it runs on.
I am absolutely sure that the error must be in sws_scale, as I am saving the images before and after the scaling. The input images do not have the error, but after the sws_scale() I save the yuv image and the error is apparent.
Here is an example :
Original
Yuvfile (after sws_scale)
At the bottom of the Yuvfile, you will see the black row.
This is how I do the scaling (it is after the official ffmpeg examples, more or less) :
static int sws_flags = SWS_FAST_BILINEAR | SWS_ACCURATE_RND;
if (img_convert_ctx == NULL)
{
img_convert_ctx = sws_getContext( srcWidth, srcHeight,
PIX_FMT_ARGB,
codecContext->width, codecContext->height,
codecContext->pix_fmt,
sws_flags, NULL, NULL, NULL );
if (img_convert_ctx == NULL)
{
av_log(c, AV_LOG_ERROR, "%s","Cannot initialize the conversion context\n");
exit(1);
}
}
fill_image(tmp_picture, pic, pic_size, frame_count, ptr->srcWidth, ptr->srcHeight );
sws_scale(img_convert_ctx, tmp_picture->data, tmp_picture->linesize,
0, srcHeight, picture->data, picture->linesize);I also tried a number of different SWS_ flags, but all yield the same result.
Could this be a bug in sws_scale or am I doing something wrong ? I am using the latest version of the ffmpeg libraries.
-
CRF vs CPU usage for x264
1er novembre 2013, par user2945312Im looking for help about the CPU usage and CRF (constant rate factor ![enter image description here][1]). I measured the CPU usage percentil for many CRF value and the result shows that the CPU usage increase when CRF increase ; that means when bitrate and quality decrease.
I used x264 with preset ultrafast and tune zerolatency to encode a stream and store it to the disk.
What Im looking to understand is why CPU usage increases when CRF increase ?
Thx.