
Recherche avancée
Médias (2)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (112)
-
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 (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, 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 (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (11120)
-
PHP FFMPEG match Instagram aspect ratio requirements
19 mai 2021, par LinesofcodeAs stated here, the Instagram API requirements to upload a video are :


- Picture size
- - Maximum columns (horizontal pixels): 1920
- - Minimum aspect ratio [cols / rows]: 4 / 5
- - Maximum aspect ratio [cols / rows]: 16 / 9



I'm having some problems figuring it out if the aspect ratio matches. I grab the
width
andheight
of the video like this :

$ffprobe = \FFMpeg\FFProbe::create();
$video = $ffprobe->streams($file)->videos()->first();
$width = $video->get('width');
$height = $video->get('height');



And then I know the ratio by dividing the
width
byheight
.

The Instagram requirements about Portrait & Landscape videos are :


Portrait - min: 0.8 ; max: 0.99
Landscape - min: 1.01 ; max: 1.78



So why does a video of 848x480 (aspect ratio of 1.76) fails to upload to Instagram by returning "The video format is not supported" and how can I be completely sure that the aspect ratio matches the requirements before trying to upload ?


Edit


The full validation of Instagram requirements :


$video = $ffprobe->streams($file)->videos()->first();
$audio = $ffprobe->streams($file)->audios()->first();
$codec = $video->get('codec_name');
$frameRate = eval('return ' . $video->get('avg_frame_rate') . ';'); // 30/1 -> 30
$width = $video->get('width');
$height = $video->get('height');
$duration = $video->get('duration');

$ratio = round($width / $height, 3);

// Portrait
if ($width < $height)
 if ($ratio < 0.8 || $ratio > 0.99)
 return false;
 
// Landscape
if ($width > $height)
 if ($ratio < 1.01 || $ratio > 1.78)
 return false;


if (!in_array($codec, ['h264', 'hevc']))
 return false;

if ($frameRate < 23 || $frameRate > 60)
 return false;

if ($width > 1920)
 return false;

if ($duration < 3 || $duration > 60)
 return false;

if ($audio)
{
 $aCodec = $audio->get('codec_name');

 if ($aCodec != 'aac')
 return false;
}

return true;



Sample not uploading into Instagram :



-
avcodec/nvenc : make aware of SDK 11.1 driver requirements
8 août 2021, par Timo Rothenpieler -
doc/filters : clarify requirements for subtitles wrap_unicode option
25 mai 2023, par Gyan Doshi