
Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (71)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
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" (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
Sur d’autres sites (13058)
-
Install ffmpeg in windows 7 x64
9 avril 2013, par Bruno RibeiroI have a problem to install ffmpeg, I tried several tutorials but did not.
I tried using the dll and executables but could not get the result is always."Fatal error: Call to undefined function dl ()"
I went on the official website and downloaded the dlls did the procedure in playing in system32 and php / ex and declared the extension in php.ini but does not work.
I am using the version of php 5.3.13.
I was thinking it was the version of php what do you think ? I'm using WampServer observation -
Shaking/trembling in video slideshow generated by frames from an image
18 mai 2017, par razielI have a PHP program which is used to generate a video slideshow from the series of images. Basically, I just need to smoothly ‘move’ from one image area to the another one according to the specified top/left coordinates and width/height area of the image. In order to do smooth movement, I use easing functions during the coordinates calculations for the each of video frame. I make an jpeg image frame based on these calculations using PHP’s Imagick library, then I combine all the generated frames into a single video using ffmpeg command.
<?php
const TEMP_FRAMES_DIR = __DIR__;
const VIDEO_WIDTH = 1080;
const VIDEO_HEIGHT = 720;
const FPS = 30;
const MOVEMENT_DURATION_SECONDS = 3;
const IMAGE_PATH = __DIR__ . '/test_image.png';
$start_coords = [
'x' => 100,
'y' => 100,
'width' => 480,
'height' => 270
];
$end_coords = [
'x' => 400,
'y' => 200,
'width' => 480,
'height' => 270
];
$timeline = make_timeline($start_coords, $end_coords);
render_frames(IMAGE_PATH, $timeline);
render_video_from_frames();
function make_timeline($start_coords, $end_coords) {
$timeline = [];
$total_frames = MOVEMENT_DURATION_SECONDS * FPS;
$x_change = $end_coords['x'] - $start_coords['y'];
$y_change = $end_coords['y'] - $start_coords['y'];
$width_change = $end_coords['width'] - $start_coords['width'];
$height_change = $end_coords['height'] - $start_coords['height'];
for ($i = 0; $i < $total_frames; $i++) {
$timeline[$i] = [
'x' => easingOutExpo($i, $start_coords['x'], $x_change, $total_frames),
'y' => easingOutExpo($i, $start_coords['y'], $y_change, $total_frames),
'width' => easingOutExpo($i, $start_coords['width'], $width_change, $total_frames),
'height' => easingOutExpo($i, $start_coords['height'], $height_change, $total_frames)
];
}
return $timeline;
}
function render_frames($image_path, $timeline) {
$image = new Imagick($image_path);
//remove frames from the previous render
array_map('unlink', glob( TEMP_FRAMES_DIR . "/frame*" ));
foreach ($timeline as $frame_number => $frame) {
$frame_img = clone $image;
$frame_img->cropImage($frame["width"],$frame["height"], $frame["x"],$frame["y"]);
$frame_img->resizeImage(VIDEO_WIDTH, VIDEO_HEIGHT, imagick::FILTER_LANCZOS, 0.9);
$frame_img->writeImage(TEMP_FRAMES_DIR. "/frame$frame_number.jpg");
}
}
function render_video_from_frames() {
$fps = FPS;
$frames_dir = TEMP_FRAMES_DIR;
$SEP = DIRECTORY_SEPARATOR;
$video_file = $frames_dir. $SEP . 'video.mp4';
if (file_exists($video_file)) unlink($video_file);
system("ffmpeg -framerate $fps -i $frames_dir{$SEP}frame%01d.jpg $video_file");
}
function easingOutExpo($t, $b, $c, $d) {
return $c * ( -pow( 2, -10 * $t/$d ) + 1 ) + $b;
}The problem is that I have annoying shaking/trembling when I need to move at a low speed (like at the end of easing out expo function).
Here you can get the test video with the problem, the test image which was used and the PHP script :
https://drive.google.com/drive/u/1/folders/0B9FOrF6IlWaGeHJCS1h6djhVZ28You can see this shaking starting from the middle of the test video ( 1.5 sec).
How can I avoid shaking in such kind of situations ? Thanks in advance !
-
FPS drop in FFMPEG streaming processes to FB from production server
30 janvier 2017, par Aakash GuptaI have made a rails app that can stream live videos to facebook rtmp server and deployed it on AWS. I have used nginx as web server. The major problem that I am encountering after viewing log files of FFMpeg processes is that sometimes the FPS of FFmpeg process starts to drop. In some cases, it remains stable at 25 FPS but in some cases, it remains at 25 only for sometime, and after that it starts to drop and sometimes it falls to even 3-4 FPS which is unacceptable during live streaming. As FFMpeg process is quite heavy, I would also like to share my CPU info as well.
CPU information is :
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 63
model name : Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
stepping : 2
microcode : 0x25
cpu MHz : 2400.070
cache size : 30720 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm xsaveopt fsgsbase bmi1 avx2 smep bmi2 erms invpcid
bogomips : 4800.14
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:FFMPEG log file with unstable fps : https://drive.google.com/open?id=0B1gtp1iXJppkUndFamk4M0lRYzA
FFMPEG log file with stable fps : https://drive.google.com/open?id=0B1gtp1iXJppkMkVCZEJjYWJrVTA
When FPS was stable, I also tried to run another parallel FFMpeg process from the same server which resulted in FPS dropping of both the processes to 13-14 FPS.
I am currently using this FFMPEG command :
ffmpeg -loop 1 -re -y -f image2 -i "image_path" -i "audio_path.aac" -acodec copy -bsf:a aac_adtstoasc -pix_fmt yuv420p -profile:v high -s 1280x720 -vb 400k -maxrate 400k -minrate 400k -bufsize 600k -deinterlace -vcodec libx264 -preset veryfast -g 30 -r 30 -t 14400 -strict -2 -f flv "rtmp_server_link"
I never face this problem when I try to stream to FB using app on my localhost.
So, my questions are :
- What can be the reason for this FPS drop ?
- Can upscaling production server help me fix this issue ?
- Can I run multiple FFMpeg processes for streaming from same server without performance drop ?
Thanks in advance :)