Recherche avancée

Médias (1)

Mot : - Tags -/wave

Autres articles (97)

  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

Sur d’autres sites (11448)

  • 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;

  • Node Media Server not stream when i try to pass the argument "transpose=1" to ffmpeg

    28 mai 2020, par joao.jlf4

    I'm using node-media-server to stream to instagram, and i need to rotate the original vídeo, to be portrait. I know that there is a flag on ffmpeg called transpose (there is rotate too), but when i pass it on node_relay_session.js on 24 line at the argv array, it returns me a "[Relay end]" on console, and it does'nt stream. When I remove the transpose flag from argv array it backs to stream normaly. Here is my config to nms :

    &#xA;&#xA;

    import NodeMediaServer from &#x27;node-media-server&#x27;;&#xA;import removeBarOfRtmpUrl from &#x27;./utils/removeBarRtmpUrl&#x27;;&#xA;import path from &#x27;path&#x27;;&#xA;import { remote } from &#x27;electron&#x27;;&#xA;&#xA;export default function(data) {&#xA;&#xA;const streams = data.map(stream => ({&#xA;endpoint: removeBarOfRtmpUrl(stream.endpoint),&#xA;key: stream.key,&#xA;}))&#xA;&#xA;const config = {&#xA;rtmp: {&#xA;port: 1935,&#xA;chunk_size: 60000,&#xA;gop_cache: true,&#xA;ping: 30,&#xA;ping_timeout: 60&#xA;},&#xA;http: {&#xA;port: 8000,&#xA;allow_origin: &#x27;*&#x27;&#xA;},&#xA;relay: {&#xA;// C:\Users\Usuario\Desktop\multistream\node_modules.bin\ffmpeg.exe&#xA;ffmpeg: path.join(remote.app.getPath(&#x27;appData&#x27;), &#x27;..&#x27;, &#x27;Local&#x27;, &#x27;Programs&#x27;, &#x27;multistream&#x27;, &#x27;app&#x27;, &#x27;ffmpeg&#x27;, &#x27;bin&#x27;, &#x27;ffmpeg.exe&#x27;),&#xA;tasks: streams.map(stream => ({&#xA;app: &#x27;live&#x27;,&#xA;mode: &#x27;push&#x27;,&#xA;edge: ${stream.endpoint}/${stream.key},&#xA;&#xA;  }))&#xA;},&#xA;};&#xA;&#xA;const nms = new NodeMediaServer(config);&#xA;return nms;&#xA;}&#xA;&#xA;// {&#xA;// app: &#x27;live&#x27;,&#xA;// mode: &#x27;push&#x27;,&#xA;// edge: &#x27;rtmp://a.rtmp.youtube.com/live2/keyyoutube&#x27;,&#xA;// },```&#xA;

    &#xA;

  • avcodec/mpeg12dec : Fix uninitialized data in fate-sub-cc-scte20

    28 juin 2020, par Limin Wang
    avcodec/mpeg12dec : Fix uninitialized data in fate-sub-cc-scte20
    

    The issue is introduced in a705bcd763e344fa, please tested with below command line :
    make V=1 fate-sub-cc-scte20 TARGET_EXEC="valgrind —error-exitcode=1"

    Reported-by : Martin Storsjö <martin@martin.st>
    Reviewed-by : Martin Storsjö <martin@martin.st>
    Signed-off-by : Limin Wang <lance.lmwang@gmail.com>

    • [DH] libavcodec/mpeg12dec.c