Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (49)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

Sur d’autres sites (5505)

  • Build FFMPEG under Cygwin in Windows OS for Android

    8 juin 2017, par Jun Kim

    For the past couple days, I have been trying hard to build FFMPEG for a Android project on Windows Operating System using android-ndk-14d using Cygwin.
    I have followed many tutorials out there, and I ahve encountered so many errors while building FFMPEG using build_android.sh.

    Here are the steps that I have taken so far.

    I downloaded Cygwin and configured all the dependencies that I need for building FFMPEG.

    I opened ffmpeg-3.3.1/configure file with a text editor, and changed to the following lines.

    SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
    LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
    SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'
    SLIB_INSTALL_LINKS='$(SLIBNAME)'

    my build_android.sh is as below

    #!/bin/bash
    NDK=C:/~/ndk-bundle
    SYSROOT=$NDK/platforms/android-21/arch-arm/
    TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64
    function build_one
    {
    ./configure \
       --prefix=$PREFIX \
       --enable-shared \
       --disable-static \
       --disable-doc \
       --disable-ffmpeg \
       --disable-ffplay \
       --disable-ffprobe \
       --disable-ffserver \
       --disable-avdevice \
       --disable-doc \
       --disable-symver \
       --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi-\
       --target-os=android \
       --arch=arm \
       --cpu=armv7-a \
       --enable-cross-compile \
       --sysroot=$SYSROOT \
       --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
       --extra-ldflags="$ADDI_LDFLAGS" \
       $ADDITIONAL_CONFIGURE_FLAG
    make clean
    make
    make install
    }
    CPU=arm
    PREFIX=$(pwd)/android/$CPU
    ADDI_CFLAGS="-marm"
    build_one

    I ran these commands

    dos2unix build_android.sh
    chmod +x build_android.sh
    ./build_android.sh

    and,,,currently getting this error

    c :/users/sonic/appdata/local/android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/p
    rebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-an
    droideabi/bin/ld.exe : error : libavutil/libavutil.so:1:1 : syntax error,
    unexpected ’ !’, exp ecting $end

    c :/users/sonic/appdata/local/android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/p
    rebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-an
    droideabi/bin/ld.exe : error : libavutil/libavutil.so : not an object or
    archive collect2.exe : error : ld returned 1 exit status
    make : *** [library.mak:94 : libswscale/libswscale-4.so] Error 1 LD

    libswscale/libswscale-4.so
    c :/users/sonic/appdata/local/android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/p
    rebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-an
    droideabi/bin/ld.exe : error : libavutil/libavutil.so:1:1 : syntax error,
    unexpected ’ !’, exp ecting $end

    c :/users/sonic/appdata/local/android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/p
    rebuilt/windows-x86_64/bin/../lib/gcc/arm-linux->androideabi/4.9.x/../../../../arm-linux-an
    droideabi/bin/ld.exe : error : libavutil/libavutil.so : not an object or
    archive collect2.exe : error : ld returned 1 exit status make : ***
    [library.mak:94 : libswscale/libswscale-4.so] Error 1

    How to compile ffmpeg-2.5.3 on windows with android-ndk-r10d

    From the comments that were commented on the above link, it seems like it is
    easier to build FFMPEG in Linux/Unix OS. My first can be a dumb question. But If there is anyone who can guide me through this, i will be really appreciated it.

    If I build FFMPEG on Linux for Android, could I possibly copy or move those
    resulted output (The arm/lib folder contains the shared libraries, while arm/include folder contains the header files for libavcodec, libavformat, libavfilter, libavutil, libswscale etc.) to Windows OS and utilize them for
    my Android project ?

    Since my company only provides Windows OS for a project, I have to utilize them on Windows OS.

    Thank you for your time, and if there is any feedback that you can provide it will definitely be helpful.

    For the reference, here is my config.log

    END c :/ffmpegtmp/ffconf.qoBF6X98.c
    C :/Users/sonic/AppData/Local/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc —sysroot=C :/Users/sonic/AppData/Local/Android/sdk/ndk-bundle/platforms/android-9/arch-arm/

    -isysroot C :/Users/sonic/AppData/Local/Android/sdk/ndk-bundle/platforms/android-9/arch-arm/
    -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Dstrtod=avpriv_strtod -DPIC -Os -fpic -marm -march=armv7-a -std=c11 -fomit-frame-pointer -fPIC -marm -pthread -g -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -c -o c :/ffmpegtmp/ffconf.8joa74tC.o

    c :/ffmpegtmp/ffconf.qoBF6X98.c
    check_cflags -fdiagnostics-color=auto test_cflags
    -fdiagnostics-color=auto check_cc -fdiagnostics-color=auto BEGIN c :/ffmpegtmp/ffconf.qoBF6X98.c
    1 int x ; END c :/ffmpegtmp/ffconf.qoBF6X98.c C :/Users/sonic/AppData/Local/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc —sysroot=C :/Users/sonic/AppData/Local/Android/sdk/ndk-bundle/platforms/android-9/arch-arm/

    -isysroot C :/Users/sonic/AppData/Local/Android/sdk/ndk-bundle/platforms/android-9/arch-arm/
    -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Dstrtod=avpriv_strtod -DPIC -Os -fpic -marm -march=armv7-a -std=c11 -fomit-frame-pointer -fPIC -marm -pthread -g -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -fdiagnostics-color=auto -c -o c :/ffmpegtmp/ffconf.8joa74tC.o c :/ffmpegtmp/ffconf.qoBF6X98.c test_cflags -Wmaybe-uninitialized check_cc -Wmaybe-uninitialized BEGIN

    c :/ffmpegtmp/ffconf.qoBF6X98.c
    1 int x ; END c :/ffmpegtmp/ffconf.qoBF6X98.c C :/Users/sonic/AppData/Local/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc —sysroot=C :/Users/sonic/AppData/Local/Android/sdk/ndk-bundle/platforms/android-9/arch-arm/

    -isysroot C :/Users/sonic/AppData/Local/Android/sdk/ndk-bundle/platforms/android-9/arch-arm/
    -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Dstrtod=avpriv_strtod -DPIC -Os -fpic -marm -march=armv7-a -std=c11 -fomit-frame-pointer -fPIC -marm -pthread -g -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -fdiagnostics-color=auto -Wmaybe-uninitialized -c -o c :/ffmpegtmp/ffconf.8joa74tC.o c :/ffmpegtmp/ffconf.qoBF6X98.c

  • Uploading videos on rails website

    16 mai 2017, par Dinukaperera

    I am trying to let my users upload videos on my website(not deployed yet, testing locally). I have it set up in a manner where if the "user information" gets saved, it will take them to the "root_path", which is the homepage. If the user information is not saved, it will render the form again. Before I added the video upload feature, all the information got saved and everything worked well, but after adding the feature, it keeps rendering the same form over and over again since the information is not getting saved. How do I check what’s wrong ? The command line gives me this error : Error screenshot

    The user information form partial :
    `

    <%= simple_form_for @userinfo do |f| %>
     <%= f.input :name, label: 'Full name', error: 'Full name is mandatory' %>
     <%= f.input :username, label: 'Username', error: 'Username is mandatory, please specify one' %>
     <%= f.input :school, label: 'Name of college' %>
     <%= f.input :gpa, label: 'Enter GPA' %>
     <%= f.input :email, label: 'Enter email address' %>
     <%= f.input :number, label: 'Phone number' %>
     <%= f.file_field :video %>
     <%= f.button :submit %>
    <% end %>

    `

    My user controller (This is the user information controller, does not control user email and password. I’m using the devise gem for user sign in, sign out, and sign up) :`

    class UsersController < ApplicationController
       def index
       end

       def show
       end

       def new
           @userinfo = User.new
       end

       def create
           @userinfo = User.new(user_params)
           if @userinfo.save
             redirect_to root_path
           else
             render 'new'
           end
       end

       def edit
       end

       def update
       end

       def destroy
       end

       private
           def user_params
               params.require(:user).permit(:name, :username, :email, :number, :school, :gpa, :major, :video)
           end
    end

    `

    This is the user model (usermain is the model related to user password and email. The user information in the user model belongs to the usermain) : `

    class User < ActiveRecord::Base
       belongs_to :usermain

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

    `

    This is the migration file that creates the user information table :`

    class CreateUsers < ActiveRecord::Migration
     def change
       create_table :users do |t|
         t.string :name
         t.string :username
         t.string :email
         t.string :number
         t.string :school
         t.string :gpa
         t.string :major

         t.timestamps null: false
       end
     end
    end
    This is adding the "video" field to the above created user information table:
    class AddAttachmentVideoToUsers < ActiveRecord::Migration
     def self.up
       change_table :users do |t|
         t.attachment :video
       end
     end

     def self.down
       remove_attachment :users, :video
     end
    end

    `

    I also have paperclip and ffmpeg installed. When I say installed, it’s literally just that. I’m not sure if I have to manipulate paperclip or ffmpeg in any way to make it work with the videos, I have just installed and did nothing else with them. I have been pulling my hair out for the past two days. Any help is appreciated.

  • java.lang.NoClassDefFoundError : Could not initialize class on Linux (Works fine on Windows)

    26 décembre 2016, par Jake Miller

    I’m using a C++ FFmpeg wrapper for Java (org.bytedeco.javacpp). This works perfectly on a Windows machine (my development machine) but throws this error when ran on Linux (Amazon Web Services Elastic Beanstalk) :

    java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.javacpp.avutil
       at java.lang.Class.forName0(Native Method) ~[na:1.8.0_111]
       at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_111]
       at org.bytedeco.javacpp.Loader.load(Loader.java:472) ~[javacpp-1.2.1.jar!/:1.2.1]
       at org.bytedeco.javacpp.Loader.load(Loader.java:417) ~[javacpp-1.2.1.jar!/:1.2.1]
       at org.bytedeco.javacpp.avformat$AVFormatContext.<clinit>(avformat.java:2819) ~[ffmpeg-3.2.1-1.3.jar!/:1.2.1]
       at org.bytedeco.javacv.FFmpegFrameGrabber.startUnsafe(FFmpegFrameGrabber.java:391) ~[javacv-1.3.jar!/:1.3]
       at org.bytedeco.javacv.FFmpegFrameGrabber.start(FFmpegFrameGrabber.java:385) ~[javacv-1.3.jar!/:1.3]
    </clinit>

    I’ve been troubleshooting for the past 2 days and have tried the following to fix the issue :

    • upgrade to Linux to 2.4
    • downgrading javacpp to 1.2.1
    • running mvn clean
    • running mvn -U
    • deleting contents of /.m2/ and redownloading dependencies
    • various combinations of dependency versions
    • git clone on a Linux VM & running mvn install there

    When looking further into the issue, I stumbled upon documentation for avformat$AVFormatContext as it’s in the stack trace posted above (6th line). The documentation for a C++ class named AVFormatContext. Whenever I attempt to view the class in Eclipse, it says Source Not Found.

    My question : could this problem possibly be caused by the C++ libraries on my Linux VM ? None of the above solutions fixed it so this is my only hypothesis as of now.

    Here’s my other Stack Overflow question regarding this subject : Java.lang.NoClassDefFoundError caused by FFmpeg when deployed on Linux as a packaged .war (Works on development machine)