Recherche avancée

Médias (91)

Autres articles (60)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (9056)

  • avcodec/nvenc : make aware of SDK 11.1 driver requirements

    8 août 2021, par Timo Rothenpieler
    avcodec/nvenc : make aware of SDK 11.1 driver requirements
    
    • [DH] libavcodec/nvenc.c
  • 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

    


  • Add useHTML5Audio note to basic template

    31 juillet 2011

    m demo/template/index.html Add useHTML5Audio note to basic template