Recherche avancée

Médias (0)

Mot : - Tags -/diogene

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (40)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

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

  • Error of FFmpeg on Java in "av_image_copy_to_buffer" method during decoding H.264 stream

    26 mai 2020, par maru2213

    I'm trying to decode H.264 stream, which is sent over Socket from an Android application to a computer. And I also want to show the decoded stream using JavaFX. I searched for a long time, and decided to use JavaCV / FFmpeg. However I got error from FFmpeg. (I was inspired by this code.)

    



    Questions :

    



      

    • Why does FFmpeg make error ?
    • 


    • Is it a correct way to convert AVFrame to javafx.scene.image.Image ?
    • 


    



    I'm using :

    



      

    • javacv-platform 1.4.4
    • 


    • ffmpeg-platform 4.1-1.4.4
    • 


    



    Code :

    



    This is a part of import and class fields, and method which runs once at the first time. (Actually the content of initialize() is wrapped by try catch.)

    



        import javafx.scene.image.Image;

    private avcodec.AVCodec avCodec;
    private avcodec.AVCodecContext avCodecContext;
    private avutil.AVDictionary avDictionary;
    private avutil.AVFrame avFrame;

    public void initialize() {
        avCodec = avcodec_find_decoder(AV_CODEC_ID_H264);
        if (avCodec == null) {
            throw new RuntimeException("Can't find decoder");
        }
        avCodecContext = avcodec_alloc_context3(avCodec);
        if (avCodecContext == null) {
            throw new RuntimeException("Can't allocate decoder context");
        }
        int result = avcodec_open2(avCodecContext, avCodec, (AVDictionary) null);
        if (result < 0) {
            throw new RuntimeException("Can't open decoder");
        }
        avFrame = av_frame_alloc();
        if (avFrame == null) {
            throw new RuntimeException("Can't allocate frame");
        }
    }


    



    And this is a method which is called every time when I receive a packet from Android. byte[] data is the packet data starting with 0x00, 0x00, 0x00, 0x01.

    



    The place where I get error is number_of_written_bytes. It always gets <0.

    &#xA;&#xA;

        private void decode(byte[] data) {&#xA;        AVPacket avPacket = new AVPacket();&#xA;        av_init_packet(avPacket);&#xA;        avPacket.pts(AV_NOPTS_VALUE);&#xA;        avPacket.dts(AV_NOPTS_VALUE);&#xA;        BytePointer bytePointer = new BytePointer(data);&#xA;        bytePointer.capacity(data.length);&#xA;        avPacket.data(bytePointer);&#xA;        avPacket.size(data.length);&#xA;        avPacket.pos(-1);&#xA;&#xA;        avcodec_send_packet(avCodecContext, avPacket);&#xA;        int result = avcodec_receive_frame(avCodecContext, avFrame);&#xA;        if (result >= 0) {&#xA;            int bufferOutputSize = av_image_get_buffer_size(avFrame.format(), avFrame.width(), avFrame.height(), 16);&#xA;            Pointer pointer = av_malloc(bufferOutputSize);&#xA;            BytePointer outputPointer = new BytePointer(pointer);&#xA;            int number_of_written_bytes = av_image_copy_to_buffer(outputPointer, bufferOutputSize, avFrame.data(), avFrame.linesize(), avFrame.chroma_location(), avFrame.width(), avFrame.height(), 1);&#xA;            if (number_of_written_bytes &lt; 0) {&#xA;                //The process always come here.&#xA;                throw new RuntimeException("Can&#x27;t copy image to buffer");&#xA;            }&#xA;&#xA;            System.out.println("decode success");&#xA;            Image image = new Image(new ByteArrayInputStream(outputPointer.asBuffer().array()));&#xA;        } else {&#xA;            System.out.println("decode failed");&#xA;        }&#xA;    }&#xA;

    &#xA;&#xA;

    Anything is helpful for me. Thanks.

    &#xA;

  • Fatal Exception : java.lang.UnsatisfiedLinkError lopen failed : library name "/data/packagename/lib/arm64/libmobileffmpeg_abidetect.so" too long

    23 septembre 2020, par Android198
    Fatal Exception: java.lang.UnsatisfiedLinkError lopen failed: library name "/data/packagename/lib/arm64/libmobileffmpeg_abidetect.so" too long &#xA;

    &#xA;

    I got this error in android 5 devices because my app packagename is too long. i build apk with abi filters armeabi-v7a, arm64-v8a

    &#xA;

     &#x27;java.lang.System.loadLibrary (System.java:989)&#xA;    com.arthenica.mobileffmpeg.AbiDetect.<clinit> (AbiDetect.java)&#xA;    com.arthenica.mobileffmpeg.AbiDetect.getNativeAbi (AbiDetect.java)&#xA;    com.arthenica.mobileffmpeg.AbiDetect.setArmV7aNeonLoaded (AbiDetect.java)&#xA;    com.arthenica.mobileffmpeg.Config.enableLogCallback (Config.java:5)&#x27;&#xA;</clinit>

    &#xA;

  • FFMPEG, macOS Catalina : "ffmpeg stderr : /private/tmp/com.apple.launchd.ID/org.macosforge.xquartz:0 : Operation not supported on socket"

    11 février 2021, par Bogdan Slyusarenko

    I'm trying to record selenium test run with FFMPEG, for automation testing of web extensions (selenium+js/ts).&#xA;FFMPEG initiated by command :

    &#xA;

        const { spawn } = require("child_process");&#xA;        ffmpeg = spawn("ffmpeg", [&#xA;          "-x265-params",&#xA;          "-f",&#xA;          "xcbgrab", &#xA;          "-video_size",&#xA;          "1280x1024", &#xA;          "-i",&#xA;          process.env.DISPLAY, // "/private/tmp/com.apple.launchd.ID/org.macosforge.xquartz:0"&#xA;          "-loglevel",&#xA;          "debug", &#xA;          "-y", &#xA;          "-pix_fmt",&#xA;          "yuv420p",&#xA;          videoPath, &#xA;        ]);&#xA;

    &#xA;

    Return constantly error,related to process.DISPLAY, I'm not sure why it's so :

    &#xA;

        ffmpeg stderr: /private/tmp/com.apple.launchd.W851FkeNXz/org.macosforge.xquartz:0: Operation not supported on socket&#xA;

    &#xA;

    Full debug login is :

    &#xA;

    ffmpeg stderr: ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers&#xA;ffmpeg stderr:   built with Apple clang version 12.0.0 (clang-1200.0.32.28)&#xA;ffmpeg stderr:   configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1_9 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack&#xA;ffmpeg stderr: libavutil      56. 51.100 / 56. 51.100&#xA;ffmpeg stderr:   libavcodec     58. 91.100 / 58. 91.100&#xA;ffmpeg stderr:   libavformat    58. 45.100 / 58. 45.100&#xA;ffmpeg stderr:   libavdevice    58. 10.100 / 58. 10.100&#xA;ffmpeg stderr:   libavfilter     7. 85.100 /  7. 85.100&#xA;ffmpeg stderr:   libavresample   4.  0.  0 /  4.  0.  0&#xA;ffmpeg stderr:   libswscale      5.  7.100 /  5.  7.100&#xA;ffmpeg stderr:   libswresample   3.  7.100 /  3.  7.100&#xA;ffmpeg stderr:   libpostproc    55.  7.100 / 55.  7.100&#xA;ffmpeg stderr: Splitting the commandline.&#xA;ffmpeg stderr: Reading option &#x27;-x265-params&#x27; ...&#xA;ffmpeg stderr: matched as AVOption &#x27;x265-params&#x27; with argument &#x27;-f&#x27;.&#xA;ffmpeg stderr: Reading option &#x27;xcbgrab&#x27; ...&#xA;ffmpeg stderr: matched as output url.&#xA;ffmpeg stderr: Reading option &#x27;-video_size&#x27; ...&#xA;ffmpeg stderr: matched as AVOption &#x27;video_size&#x27; with argument &#x27;1280x1024&#x27;.&#xA;ffmpeg stderr: Reading option &#x27;-i&#x27; ... matched as input url with argument &#x27;/private/tmp/com.apple.launchd.W851FkeNXz/org.macosforge.xquartz:0&#x27;.&#xA;ffmpeg stderr: Reading option &#x27;-loglevel&#x27; ... matched as option &#x27;loglevel&#x27; (set logging level) with argument &#x27;debug&#x27;.&#xA;ffmpeg stderr: Reading option &#x27;-y&#x27; ...&#xA;ffmpeg stderr: matched as option &#x27;y&#x27; (overwrite output files) with argument &#x27;1&#x27;.&#xA;ffmpeg stderr: Reading option &#x27;-pix_fmt&#x27; ... matched as option &#x27;pix_fmt&#x27; (set pixel format) with argument &#x27;yuv420p&#x27;.&#xA;ffmpeg stderr: Reading option &#x27;/Volumes/MacHD2/Upprojects/TEST/log/Checkout-Google.com-Search-on-Google.mp4&#x27; ... matched as output url.&#xA;ffmpeg stderr: Finished splitting the commandline.&#xA;ffmpeg stderr: Parsing a group of options: global .&#xA;ffmpeg stderr: Applying option loglevel (set logging level) with argument debug.&#xA;ffmpeg stderr: Applying option y (overwrite output files) with argument 1.&#xA;ffmpeg stderr: Successfully parsed a group of options.&#xA;ffmpeg stderr: Parsing a group of options: input url /private/tmp/com.apple.launchd.W851FkeNXz/org.macosforge.xquartz:0.&#xA;ffmpeg stderr: Successfully parsed a group of options.&#xA;ffmpeg stderr: Opening an input file: /private/tmp/com.apple.launchd.W851FkeNXz/org.macosforge.xquartz:0.&#xA;ffmpeg stderr: [NULL @ 0x7fcf80016800] Opening &#x27;/private/tmp/com.apple.launchd.W851FkeNXz/org.macosforge.xquartz:0&#x27; for reading&#xA;ffmpeg stderr: [file @ 0x7fcf7f507a00] Setting default whitelist &#x27;file,crypto,data&#x27;&#xA;ffmpeg stderr: /private/tmp/com.apple.launchd.W851FkeNXz/org.macosforge.xquartz:0: Operation not supported on socket&#xA;&#xA;

    &#xA;

    Any feedback appreciated

    &#xA;