Recherche avancée

Médias (91)

Autres articles (24)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

Sur d’autres sites (4955)

  • Android ffmpeg using

    6 juin 2012, par Vardan Gevorgyan

    I have successfully compiled ffmpeg for android.
    I have wrote simple application which just open mp4 file :

    int main(int argc, char * argv[])
    {
       av_register_all();

       __android_log_write(ANDROID_LOG_INFO, "NDK", "Opening file: /sdcard/test.mp4...");

       if (avformat_open_input(&pFormatCtx, "/sdcard/test.mp4", NULL, NULL) != 0) {
           __android_log_write(ANDROID_LOG_INFO, "NDK", "file not opened\n");
           return -1;
       }
       __android_log_write(ANDROID_LOG_INFO, "NDK", "file opened\n");
    }

    When I run this code the C code crashes here :

    06-06 18:22:42.629: I/DEBUG(31):          #00  pc 00159804  /data/data libffmpeg.so
    06-06 18:22:42.629: I/DEBUG(31):          #01  lr 809465dc  /data/data libffmpeg.so

    ndk-stack write :

    Stack frame #00  pc 00159804  /data/data/.../lib/libffmpeg.so: Routine av_opt_set_dict in libavutil/opt.c:552

    Which is av_opt_set_dict function :

    int av_opt_set_dict(void *obj, AVDictionary **options)
    {
       AVDictionaryEntry *t = NULL;
       AVDictionary    *tmp = NULL;
       int ret = 0;

       while ((t = av_dict_get(*options, "", t, AV_DICT_IGNORE_SUFFIX))) {
           ret = av_set_string3(obj, t->key, t->value, 1, NULL);
           if (ret == AVERROR_OPTION_NOT_FOUND)
               av_dict_set(&tmp, t->key, t->value, 0);
           else if (ret < 0) {
               av_log(obj, AV_LOG_ERROR, "Error setting option %s to value %s.\n", t->key, t->value);
               break;
           }
           ret = 0;
       }
       av_dict_free(options);
       *options = tmp;
       return ret;
    }

    552 line is :

    while ((t = av_dict_get(*options, "", t, AV_DICT_IGNORE_SUFFIX))) {

    This code working on my linux machine (of course with .so for linux, for android I use ndk built .so file), but not under android.

    Also, it's working on my rooted HTC Desire Z, but not on emulator or un-rooted device.

    Here I found the post that I need to change libavformat/file.c file_check function :

    static int file_check(URLContext *h, int mask)
    {
       struct stat st;
       int ret = stat(h->filename, &st);
       if (ret < 0)
           return AVERROR(errno);

       ret |= st.st_mode&S_IRUSR ? mask&AVIO_FLAG_READ  : 0;
       ret |= st.st_mode&S_IWUSR ? mask&AVIO_FLAG_WRITE : 0;

       return ret;
    }

    to

    static int file_check(URLContext *h, int mask)
    {
       struct stat st;
       int ret = stat(h->filename, &st);
       if (ret < 0)
           return AVERROR(errno);

       ret |= st.st_mode&S_IRUSR ? mask&AVIO_FLAG_READ  : 0;
       ret |= st.st_mode&S_IRGRP ? mask&AVIO_FLAG_READ  : 0;
       ret |= st.st_mode&S_IROTH ? mask&AVIO_FLAG_READ  : 0;
       ret |= st.st_mode&S_IWUSR ? mask&AVIO_FLAG_WRITE : 0;
       ret |= st.st_mode&S_IWGRP ? mask&AVIO_FLAG_WRITE  : 0;
       ret |= st.st_mode&S_IWOTH ? mask&AVIO_FLAG_WRITE  : 0;


       return ret;
    }

    but it wasn't help.

    Any suggestions ?

    Thanks

  • Revision 79003 : Pipeline "afficher_contenu_objet" : prendre en compte le cas où ...

    30 novembre 2013, par tcharlss@… — Log

    Pipeline "afficher_contenu_objet" : prendre en compte le cas où l’identifiant de l’objet n’est pas donné par $fluxargs ?id_objet ? mais par $fluxargs ?contexte ?id ?.
    Problème constaté sur la fiche d’une commande.
    ps : De plus, l’exemple du site http://programmer.spip.net/afficher_contenu_objet,434 récupère l’identifiant avec $fluxargs ?id ?

  • Getting error on video with Ruby on Rails 4 App

    30 avril 2016, par D.Graves

    So this is the error I get right after I try and upload my video

    enter image description here

    This is my post show

    <%= video_tag @post.video.url(:medium), controls: true, style: "max-width: 100%;" %>

    <p>
     <strong>Description:</strong>
    &lt;%= @post.description %>
    </p>
     &lt;% if @post.user == current_user %>
     &lt;%= link_to 'Edit', edit_post_path(@post) %>
    &lt;% end %>|
    &lt;%= link_to 'Back', posts_path %>

    This is my post model

    class Post &lt; ActiveRecord::Base
    belongs_to :user

    has_attached_file :video, styles: {
       :medium => {
         :geometry => "640x480",
         :format => 'mp4'
       },
       :thumb => { :geometry => "160x120", :format => 'jpeg', :time => 10}
    }, :processors => [:transcoder]
    validates_attachment_content_type :video, content_type: /\Avideo\/.*\Z/
    end

    I am curious if anyone has run into this before and I am wondering if I can get any help on how to fix this. I am using paperclip av-transcoder gem, ffmpeg and paperclip gem. I can add any more information if needed

    Here is my post controller if this helps

    def index
    @posts = Post.all
    end

    def show
    end

    def new
    @post = current_user.posts.build
    end

    def edit
    end

    def create
    @post = current_user.posts.build(post_params)
    if @post.save
     redirect_to @post, notice: 'Post was successfully created.'
    else
     render :new
    end
    end

    def update
    if @post.update(post_params)
     redirect_to @post, notice: 'Post was successfully updated.'
    else
     render :edit
    end
    end

    def destroy
    @post.destroy
    redirect_to posts_url
    end

    private
    def set_post
     @post = Post.find_by(id: params[:id])
    end

    def correct_user
     @post = current_user.posts.find_by(id: params[:id])
     redirect_to posts_path, notice: "Not authorized to edit this post" if @post.nil?
    end

    def post_params
     params.require(:post).permit(:description, :video)
    end


    end