Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (76)

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (10382)

  • PHP FFMPEG match Instagram aspect ratio requirements

    19 mai 2021, par Linesofcode

    As 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 and height 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 by height.

    


    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 :
enter image description here

    


  • mov : Prioritize aspect ratio values found in pasp atom

    6 avril 2021, par Vittorio Giovara
    mov : Prioritize aspect ratio values found in pasp atom
    

    From the ISO/IEC specification for MP4 :
    The pixel aspect ratio and clean aperture of the video may be specified
    using the ‘pasp’ and ‘clap’ sample entry boxes, respectively. These are
    both optional ; if present, they over-ride the declarations (if any) in
    structures specific to the video codec, which structures should be
    examined if these boxes are absent. For maximum compatibility, these
    boxes should follow, not precede, any boxes defined in or required by
    derived specifications.

    Fixes trac/#7277.

    • [DH] libavformat/mov.c
  • How to change size of watermark image and set Size and Aspect Ratio of Video using fluent-ffmpeg ?

    12 avril 2021, par Kirasiris

    Does anyone knows how to change the size of the watermark image ? ; secondly I tried to use complexFilter() with the size() and aspect() methods but it throws an error of complex-filter can not be used with complexFiltergraph in the same input stream ?

    


    This is my code :

    


    await ffmpeg('tmp/' + file.name)
  .input(waterMarkImage)
  .videoFilter([
    'overlay=10:10',
    'scale=1280:720',
    'aspect=16:9',
    'crop=1280:554:0:90',
  ])
  .output(key)
  .on('progress', function (progress) {
    console.log('Processing: ' + progress.percent + '% done')
  })
  .on('end', function (stdout, stderr) {
    console.log('Finished')
    fs.unlink(dir + file.name, function (err) {
      if (err) throw err
      console.log('File deleted')
    })
  })
  .on('error', function (err) {
    console.log('an error happened: ' + err.message)
    fs.unlink(dir + file.name, function (err) {
      if (err) throw err
      console.log('File deleted')
    })
  })
  .save(dir + key)


    


    Thanks.