Recherche avancée

Médias (1)

Mot : - Tags -/swfupload

Autres articles (103)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (7571)

  • FFMPEG get_buffer2 multi-thread random crash

    4 novembre 2015, par arnaud

    I’m doing a multi-thread FFMPEG video player. Basically it decodes and display 16 MP4 video files ( using h264 codec ) at the same time, using my own threads / jobs subsystem.
    For future extension I want to provide my own memory buffer for AVFrame decoding. To do this, I simply used get_buffer2 hook method. My get_buffer2 handles currently only use av_malloc & av_free (to validate everything is working ). Here is my handler :

    void our_buffer_default_free(void *opaque, uint8_t *data)
    {
       av_free(data);
    }

    int our_get_buffer(struct AVCodecContext *c, AVFrame *pic, int flags)
    {
       assert(c->codec_type == AVMEDIA_TYPE_VIDEO);

       pic->linesize[0] = pic->width;
       pic->linesize[1] = pic->width/2;
       pic->linesize[2] = pic->width/2;

       void* pYBuffer = av_malloc(pic->linesize[0] * pic->height);
       void* pUBuffer = av_malloc(pic->linesize[1] * pic->height / 2);
       void* pVBuffer = av_malloc(pic->linesize[2] * pic->height / 2);
       assert(pYBuffer);
       assert(pUBuffer);
       assert(pVBuffer);

       pic->data[0] = (uint8_t*)pYBuffer;
       pic->data[1] = (uint8_t*)pUBuffer;
       pic->data[2] = (uint8_t*)pVBuffer;
       pic->buf[0] = av_buffer_create(pic->data[0], pic->linesize[0] * pic->height, our_buffer_default_free, NULL, 0);
       pic->buf[1] = av_buffer_create(pic->data[1], pic->linesize[1] * pic->height / 2, our_buffer_default_free, NULL, 0);
       pic->buf[2] = av_buffer_create(pic->data[2], pic->linesize[2] * pic->height / 2, our_buffer_default_free, NULL, 0);
       return 0;
    }
    • If I don’t hook get_buffer2 (keep ffmpeg use its own AVFrame memory allocation) and activate my multithread job system, everything is running ok ( no crash)
    • If I hook get_buffer2 with the code provided and multi-thread activated, I get some random crashs ( after few seconds or minutes, random )
    • If I hook get_buffer2 without multi-thread activated, everything is running ok (no crash)

    So it seems the way I hook "get_buffer2" is not thread safe, but I just don’t see why. ( I guess av_malloc & av_free are threadsafe on windows platform)

    Any idea ?

    PS : I don’t have many details on the crash because I’m using a pre-compiled FFMPEG. It often crash in avcodec57.dll. I’m using windows 64bits system, my app & FMMPEG binaries are both 32bits. Details about FFMPEG version used :

    Zeranoe's FFmpeg Builds Home Page: /ffmpeg.zeranoe.com/builds/>

    FFmpeg version: 20151103-git-6df2c94
     libavutil      54. 30.100 / 54. 30.100
     libavcodec     56. 57.100 / 56. 57.100
     libavformat    56. 40.101 / 56. 40.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 32.100 /  5. 32.100
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.101 /  1.  2.101
     libpostproc    53.  3.100 / 53.  3.100
  • I can't install ffmpegs (dependencies) - error with doxygen [mac 10.12.6 Sierra]

    12 septembre 2022, par Lo-Fi Junky

    It installed about 70% of the dependencies it needed to get ffmpegs going, but it got stuck at installing 'doxygen'.

    


    This is the error I got :

    


    ==> Installing dependencies for ffmpeg: doxygen, little-cms2, openjpeg, opus, rust, libgit2, cargo-c, rav1e, flac, libsndfile, libsamplerate, rubberband, sdl2, swig, llvm, snappy, speex, srt, leptonica, libb2, lz4, libarchive, tesseract, theora, x264, x265, xvid, docbook, boost, source-highlight, asciidoc, docbook-xsl, libyaml, ruby, asciidoctor, gnu-getopt, xmlto, libsodium, zeromq and zimg&#xA;==> Installing ffmpeg dependency: doxygen&#xA;==> cmake ..&#xA;==> make&#xA;Last 15 lines from /Users/macbook/Library/Logs/Homebrew/doxygen/02.make:&#xA;In file included from /tmp/doxygen-20220723-61533-5m5mdv/doxygen-1.9.4/src/outputlist.h:25:&#xA;/tmp/doxygen-20220723-61533-5m5mdv/doxygen-1.9.4/src/searchindex.h:29:10: fatal error: &#x27;variant&#x27; file not found&#xA;#include <variant>&#xA;         ^~~~~~~~~&#xA;1 error generated.&#xA;make[2]: *** [src/CMakeFiles/doxymain.dir/__/generated_src/code.cpp.o] Error 1&#xA;make[1]: *** [src/CMakeFiles/doxymain.dir/all] Error 2&#xA;make[1]: *** Waiting for unfinished jobs....&#xA;[ 46%] Linking CXX static library ../lib/libvhdlparser.a&#xA;cd /tmp/doxygen-20220723-61533-5m5mdv/doxygen-1.9.4/build/vhdlparser &amp;&amp; /usr/local/Cellar/cmake/3.23.2/bin/cmake -P CMakeFiles/vhdlparser.dir/cmake_clean_target.cmake&#xA;cd /tmp/doxygen-20220723-61533-5m5mdv/doxygen-1.9.4/build/vhdlparser &amp;&amp; /usr/local/Cellar/cmake/3.23.2/bin/cmake -E cmake_link_script CMakeFiles/vhdlparser.dir/link.txt --verbose=1&#xA;/usr/bin/ar qc ../lib/libvhdlparser.a CMakeFiles/vhdlparser.dir/CharStream.cc.o CMakeFiles/vhdlparser.dir/ParseException.cc.o CMakeFiles/vhdlparser.dir/Token.cc.o CMakeFiles/vhdlparser.dir/TokenMgrError.cc.o CMakeFiles/vhdlparser.dir/__/generated_src/VhdlParser_adj.cc.o CMakeFiles/vhdlparser.dir/VhdlParserTokenManager.cc.o&#xA;/usr/bin/ranlib ../lib/libvhdlparser.a&#xA;[ 46%] Built target vhdlparser&#xA;make: *** [all] Error 2&#xA;&#xA;Do not report this issue to Homebrew/brew or Homebrew/core!&#xA;&#xA;&#xA;Error: You are using macOS 10.12.&#xA;We (and Apple) do not provide support for this old version.&#xA;You will encounter build failures with some formulae.&#xA;Please create pull requests instead of asking for help on Homebrew&#x27;s GitHub,&#xA;Twitter or any other official channels. You are responsible for resolving&#xA;any issues you experience while you are running this&#xA;old version.&#xA;</variant>

    &#xA;

    Can someone please help me am not sure what it is, that I am supposed to do.

    &#xA;

  • pipe youtube-dl to ffmpeg within a script

    28 février 2016, par user556068

    This is an expansion to an earlier question I asked which you can find here. I have been piping youtube-dl into a script via youtube-dl -iga /path/to/myFile.txt | myscript.sh which reads a text file of urls and extracts another set of urls to the actual video content being downloaded. Everything works great but there is much room for improvement.

    Instead of piping youtube-dl into the script I would like to include the youtube-dl command within the script itself. Here is the full script I have up to this point.

    #!/bin/bash  

    inArgs='-i'                
    outArgs='-c copy -y'        
    dir="$HOME/Movies/fftest/"
    outFile="fftest_${count}"      
    ext='.mp4'        

    #### not sure about following 2 lines

    youtube-dl -iga /path/to/myFile.txt > /path/to/myFile2.txt
    exec 0to/myFile2.txt

    count=0
    if [ ! -d "${dir}" ];
    then
    mkdir -p "${dir}"
    fi      
    cd || "${HOME}"

    while read lineIn
    do
    {
    (( count ++ ))
    echo ffmpeg $inArgs $lineIn $outArgs "$dir$outFile$count$ext" &amp;
    sleep 1
    }  
    done  

    After playing around with it a little I added the following lines. Code has been edited to reflect these changes.

    youtube-dl -iga /path/to/myFile.txt > /path/to/myFile2.txt
    exec 0to/myFile2.txt

    This does work but it’s also throwing up some new error from ffmpeg that I haven’t yet encountered until now. I test by placing echo before the ffmpeg command. Everything looks fine doing that so I’m not really sure what the issue is at this point.

    So there are a couple things i would like to accomplish that I haven’t been able to figure out.

    • Have I properly redirected the input and do I need to do anything later in the script to put things back as they were before the script was called or will that occur naturally on its own when exiting the script ?

    • As it currently is, the script will overwrite any files previously created every time it is called. This is fine for testing purposes but not ideal beyond that. What I am looking for is a way to start writing the next file in the number sequence based on the last file in the directory. So if one time it creates 8 files named fftest_1.mpr - fftest_8.mp4 the second time when it is called to create 14 new files, it will know to start writing a file labeled fftest_9.mp4 - fftest_22.mp4. This is however beyond my abilities at the moment. Is there a way to do this ?

    • Another issue I’ve had is when trying kill the script as it runs in the background. Ctrl C doesn’t have any effect as far as I can tell. Is there an alternative kill command or key press I can use to ensure an immediate exit if necessary. Or a way to assign such within the script itself ?

    • Also any critiques, suggestions, alternatives or additions to any part of this script are very much welcomed and appreciated. This is all very new for me and I’m trying to learn more everyday. If any part of what I said didn’t make sense I will be happy to clarify.