Recherche avancée

Médias (91)

Autres articles (104)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • 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 (13007)

  • Apply filters to video while preview and save it with applied filter and original audio in android

    11 juillet 2016, par Rajkumar

    Dear geeks i m newbie to video processing. i want to apply a filter to a video at runtime, and i want to save that video after filter applied.
    Regarding this i m doing a research. I has gone through many libraries but i m struggling to achive my aim.

    Developement environment

    Migw-64 with windows 7 64 bit
    Android Studio 2.1 preview 5
    heap space 4GB
    com.android.tools.build:gradle:2.1.0
    android-ndk-r12-win-x86_64
    com.android.tools.build:gradle-experimental:0.7.0 —> to build NDK

    I have tried

    1)AndroidFastImageprocessingLibrary

    Chrisbatt -> AndroidFastImageProcessing in github
    github.com/chrisbatt/AndroidFastImageProcessing
    This library use GLSurfaceview to display filters but we could not save it to mp4 file

    so i found another implementation of it
    icmobilelab -> AndroidFastImageProcessing in github
    github.com/icmobilelab/AndroidFastImageProcessing/blob/master/framework/FastImageProcessing/src/project/android/imageprocessing/output/VideoFileEndpoint.java
    This library use JavaCV with ffmpeg compiled. But it failed.

    2)JavaCV
    JavaCV use outdated ffmpeg and it abondond

    3)Grafika -> in github
    github.com/google/grafika
    I tried Android Fast Image Processing with RecordFBOActivity in grafika. But i m failed. This library use MediaRecorder to record the contents of GLSurfaceView. But it records video without audio(I have tested the RecordFBOActivity and analyze the code )

    4)filter packs in platform_frameworks
    github.com/android/platform_frameworks_base/blob/master/media/mca/filterpacks/java/android/filterpacks/videosink/MediaEncoderFilter.java
    its android 4.2 edited core. i can’t run this code because too many jni dependencies.

    5)ffmpeg
    github.com/guardianproject/android-ffmpeg
    i tried ffmpeg3.1 compilation procedure implemented by guardianproject. it successfullay built a static library but i cannot build dynamic library( so files). i m stuck with a linker error. I think the linking order matters. i tried the linking order specified in below link
    https://fritzone.wordpress.com/2010/05/11/link-with-static-ffmpeg/
    but it won’t help. the following error occurs

    [armeabi-v7a] SharedLibrary  : libffmpeg.so
    jni/ffmpeg.c:200: error: undefined reference to 'av_frame_alloc'
    jni/ffmpeg.c:201: error: undefined reference to 'av_frame_alloc'
    jni/ffmpeg.c:209: error: undefined reference to 'av_register_all'
    jni/ffmpeg.c:210: error: undefined reference to 'avfilter_register_all'
    jni/ffmpeg.c:45: error: undefined reference to 'avformat_open_input'
    jni/ffmpeg.c:50: error: undefined reference to 'avformat_find_stream_info'
    jni/ffmpeg.c:56: error: undefined reference to 'av_find_best_stream'
    jni/ffmpeg.c:63: error: undefined reference to 'av_opt_set_int'
    jni/ffmpeg.c:66: error: undefined reference to 'avcodec_open2'
    jni/ffmpeg.c:67: error: undefined reference to 'av_log'
    jni/ffmpeg.c:78: error: undefined reference to 'avfilter_get_by_name'
    jni/ffmpeg.c:79: error: undefined reference to 'avfilter_get_by_name'
    jni/ffmpeg.c:80: error: undefined reference to 'avfilter_inout_alloc'
    jni/ffmpeg.c:81: error: undefined reference to 'avfilter_inout_alloc'
    jni/ffmpeg.c:85: error: undefined reference to 'avfilter_graph_alloc'
    jni/ffmpeg.c:98: error: undefined reference to 'avfilter_graph_create_filter'
    jni/ffmpeg.c:106: error: undefined reference to 'avfilter_graph_create_filter'
    jni/ffmpeg.c:113: error: undefined reference to 'av_int_list_length_for_size'
    jni/ffmpeg.c:113: error: undefined reference to 'av_opt_set_bin'
    jni/ffmpeg.c:116: error: undefined reference to 'av_log'
    jni/ffmpeg.c:131: error: undefined reference to 'av_strdup'
    jni/ffmpeg.c:142: error: undefined reference to 'av_strdup'
    jni/ffmpeg.c:147: error: undefined reference to 'avfilter_graph_parse_ptr'
    jni/ffmpeg.c:151: error: undefined reference to 'avfilter_graph_config'
    jni/ffmpeg.c:155: error: undefined reference to 'avfilter_inout_free'
    jni/ffmpeg.c:156: error: undefined reference to 'avfilter_inout_free'
    jni/ffmpeg.c:218: error: undefined reference to 'av_read_frame'
    jni/ffmpeg.c:223: error: undefined reference to 'avcodec_decode_video2'
    jni/ffmpeg.c:230: error: undefined reference to 'av_frame_get_best_effort_timestamp'
    jni/ffmpeg.c:233: error: undefined reference to 'av_buffersrc_add_frame_flags'
    jni/ffmpeg.c:234: error: undefined reference to 'av_log'
    jni/ffmpeg.c:240: error: undefined reference to 'av_buffersink_get_frame'
    jni/ffmpeg.c:171: error: undefined reference to 'av_rescale_q'
    jni/ffmpeg.c:246: error: undefined reference to 'av_frame_unref'
    jni/ffmpeg.c:248: error: undefined reference to 'av_frame_unref'
    jni/ffmpeg.c:251: error: undefined reference to 'av_packet_unref'
    jni/ffmpeg.c:254: error: undefined reference to 'avfilter_graph_free'
    jni/ffmpeg.c:255: error: undefined reference to 'avcodec_close'
    jni/ffmpeg.c:256: error: undefined reference to 'avformat_close_input'
    jni/ffmpeg.c:257: error: undefined reference to 'av_frame_free'
    jni/ffmpeg.c:258: error: undefined reference to 'av_frame_free'
    jni/include/libavutil/error.h:111: error: undefined reference to 'av_strerror'
    collect2.exe: error: ld returned 1 exit status
    make: *** [obj/local/armeabi/libffmpeg.so] Error 1

    6)MediaCodec, MediaExtractor,MediaRecord,MediaMuxer
    finally i planned to combine AndroidFastImageProcessing with MediaCodec, MediaExtractor,MediaRecord,MediaMuxer.
    so i try to Extract audio from video using mediamuxer
    https://gist.github.com/sayan801/9a39ccad0818d2b3499a
    I use mp4 video (MIME Type video/avc that have 2 tracks audio and video) to extract audio
    but the resultant file is corrupted (just 4 kb)

    I think this question is another view of the existing problem
    if anybody experienced this problem please guide me
    Thanks

  • mp4 to webm and ogv conversion not working using ffmpeg on linux server

    9 novembre 2016, par user75472

    I have a cron job to convert existing mp4 video file to ogv and webm using ffmpeg

    I have wordpress site with a page where user are allowed to upload mov and mp4 files. After the file is uploaded image is created from the video file and mov file is converted to mp4 successfully.

    However I need to concert uploaded mp4 file to webm and ogv to video work on all browsers. So I have set up cron job. Here is my code :

    include_once "../wp-config.php";
    ini_set('max_execution_time', 660); // 11 minutes
    // Get the path to the upload directory.
    $wp_upload_dir = wp_upload_dir();
    $dir = $wp_upload_dir['path'].'/';

    // Open a directory, and read its contents
    if (is_dir($dir)){
     if ($dh = opendir($dir)){
       while (($file = readdir($dh)) !== false){
         //echo "filename:" . $file . "<br />";
         $files = explode(".", $file);
         //echo end($fileinfo);
         if(end($fileinfo) == 'mp4') {
             $ffmpegPath = '/usr/local/bin/'; // linux
           //$ffmpegPath = 'C:\\ffmpeg\\bin\\'; // win
           if(!file_exists($dir.$files[0].'.webm')) {

                   $destFile = $dir.$files[0].'.webm';

                   $cmd = $ffmpegPath."ffmpeg -i ".$srcFile." -c:v libvpx -minrate 3900k -maxrate 3900k -b:v 3900k -c:a libvorbis ".$destFile;

             exec($cmd, $output, $retval);
             var_dump($output);
             var_dump($retval);
                   //exec($cmd);
           }
           if(!file_exists($dir.$files[0].'.ogv')) {
               //var_dump($fileinfo);
                   $destFile = $dir.$files[0].'.ogv';

                   $cmd1 = $ffmpegPath."ffmpeg -i ".$srcFile." -acodec libvorbis -ac 2 -ab 128k -ar 44100 -b:v 1200k ".$destFile;

             exec($cmd1, $output1, $retval1);
             var_dump($output1);
             var_dump($retval1);
           }
         }
       }
       closedir($dh);
     }
    }

    This works perfectly alright on windows but not working on linux, production server.

    I am missing something ?

  • Python - insert lines on txt following a sequence without overwriting

    17 octobre 2016, par Neo Herakles

    I want to insert the name of a file before each file name obtained through glob.glob, so I can concatenate them through FFMPEG by sorting them into INTRO+VIDEO+OUTRO, the files have to follow this order :

    INSERTED FILE NAME
    FILE
    INSERTED FILE NAME
    INSERTED FILE NAME
    FILE
    INSERTED FILE NAME
    INSERTED FILE NAME
    FILE
    INSERTED FILE NAME

    This is this code I’m using :

    import glob
    open("Lista.txt", 'w').close()
    file = open("Lista.txt", "a")
    list =glob.glob("*.mp4")
    for item in list:
     file.write("%s\n" % item)
    file.close()

    f = open("Lista.txt", "r")
    contents = f.readlines()
    f.close()

    for x,item in enumerate(list):
       contents.insert(x, "CTA\n")
    f = open("Lista.txt", "w")
    contents = "".join(contents)
    f.write(contents)
    print f
    f.close()

    But I obtain the values in the wrong order :

    INSERTED FILE NAME
    INSERTED FILE NAME
    INSERTED FILE NAME
    FILE
    FILE
    FILE

    How could I solve this ?
    EDIT : As pointed out, maybe the issue is being caused by modifying a list that I’m currently using.