Recherche avancée

Médias (91)

Autres articles (88)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (9996)

  • ffmpeg-php loading videos but not generating jpeg (thumbnails)

    16 mars 2021, par Ali Hamdar

    The website is now running on :
finlandbooking.online

    


    Sorry for this noob question first of all.
This is a social media script, when you upload a video, it shows a black thumbnail - you can play the video, but the thumbnail is black. I checked the issue with developers tools, it seems that it's showing error 404 - image not found. ffmpeg, as far as I understood, is supposed to generate an image and display it as a thumbnail. The image is supposed to be located in /uploads/images/ - Kindly check this part of the code and let me know why it's not working :

    


    else if ($action == 'upload_post_video') {
if (empty($cl["is_logged"])) {
    $data['status'] = 400;
    $data['error']  = 'Invalid access token';
}
else {
    $data['err_code'] = "invalid_req_data";
    $data['status']   = 400;
    $post_data        = $me['draft_post'];

    if (not_empty($_FILES['video']) && not_empty($_FILES['video']['tmp_name'])) {
        if (empty($post_data)) {
            $post_id   = cl_create_orphan_post($me['id'], "video");
            $post_data = cl_get_orphan_post($post_id);

            cl_update_user_data($me['id'],array(
                'last_post' => $post_id
            ));
        }

        if (not_empty($post_data) && $post_data["type"] == "video") {
            if (empty($post_data['media'])) {
                $file_info      =  array(
                    'file'      => $_FILES['video']['tmp_name'],
                    'size'      => $_FILES['video']['size'],
                    'name'      => $_FILES['video']['name'],
                    'type'      => $_FILES['video']['type'],
                    'file_type' => 'video',
                    'folder'    => 'videos',
                    'slug'      => 'original',
                    'allowed'   => 'mp4,mov,3gp,webm',
                );

                $file_upload = cl_upload($file_info);
                $upload_fail = false;
                $post_id     = $post_data['id'];

                if (not_empty($file_upload['filename'])) {
                    try {
                        require_once(cl_full_path("core/libs/ffmpeg-php/vendor/autoload.php"));

                        $ffmpeg         =  new FFmpeg(cl_full_path($config['ffmpeg_binary']));
                        $thumb_path     =  cl_gen_path(array(
                            "folder"    => "images",
                            "file_ext"  => "jpeg",
                            "file_type" => "image",
                            "slug"      => "poster",
                        ));

                        $ffmpeg->input($file_upload['filename']);
                        $ffmpeg->set('-ss','3');
                        $ffmpeg->set('-vframes','1');
                        $ffmpeg->set('-f','mjpeg');
                        $ffmpeg->output($thumb_path)->ready();
                    } 

                    catch (Exception $e) {
                        $upload_fail = true;
                    }

                    if (empty($upload_fail)) {
                        $img_id      =  $db->insert(T_PUBMEDIA, array(
                            "pub_id" => $post_id,
                            "type"   => "video",
                            "src"    => $file_upload['filename'],
                            "time"   => time(),
                            "json_data" => json(array(
                                "poster_thumb" => $thumb_path
                            ),true)
                        ));

                        if (is_posnum($img_id)) {
                            $data['status'] =  200;
                            $data['video']  =  array(
                                "source"    => cl_get_media($file_upload['filename']),
                                "poster"    => cl_get_media($thumb_path),
                            );
                        }
                    }
                }
            }
            else {
                $data['err_code'] = "total_limit_exceeded";
                $data['status']   = 400;
            }
        }
        else {
            cl_delete_orphan_posts($me['id']);
            cl_update_user_data($me['id'],array(
                'last_post' => 0
            ));
        }
    }
}


    


    }

    


  • Additional : add netmask validation method (#1955)

    18 avril 2017, par Wang-Sen
    Additional : add netmask validation method (#1955)
    

    Add a method to validate netmask.

    Invalidate-pull-request : #1831 #Add test cases
    Signed-off-by : Wang Sen <wangsen@linux.vnet.ibm.com>

  • avcodec/cbs_av1 : rename enable_intraintra_compound flag

    11 décembre 2019, par Fei Wang
    avcodec/cbs_av1 : rename enable_intraintra_compound flag
    

    rename enable_intraintra_compound to enable_interintra_compound,
    which keep same as AV1 sepc(v1.0.0-errata1).

    Signed-off-by : Fei Wang <fei.w.wang@intel.com>
    Signed-off-by : James Almer <jamrial@gmail.com>

    • [DH] libavcodec/cbs_av1.h
    • [DH] libavcodec/cbs_av1_syntax_template.c
    • [DH] libavformat/av1.c