Recherche avancée

Médias (91)

Autres articles (80)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (10058)

  • lavc : Drop deprecated options moved to private contexts

    16 mars 2017, par Vittorio Giovara
    lavc : Drop deprecated options moved to private contexts
    

    Deprecated in 10/2014 and 07/2015.

    • [DBH] libavcodec/avcodec.h
    • [DBH] libavcodec/dnxhdenc.c
    • [DBH] libavcodec/internal.h
    • [DBH] libavcodec/libvpxenc.c
    • [DBH] libavcodec/libx264.c
    • [DBH] libavcodec/libxavs.c
    • [DBH] libavcodec/libxvid.c
    • [DBH] libavcodec/motion_est.c
    • [DBH] libavcodec/mpegvideo.h
    • [DBH] libavcodec/mpegvideo_enc.c
    • [DBH] libavcodec/options.c
    • [DBH] libavcodec/options_table.h
    • [DBH] libavcodec/svq1enc.c
    • [DBH] libavcodec/version.h
  • RTP packets detected as UDP

    28 février 2017, par user3172852

    Here is what I am trying to do :

    WebRTC endpoint > RTP Endpoint > ffmpeg > RTMP server.

    This is what my SDP file looks like.

    var cm_offer = "v=0\n" +
                 "o=- 3641290734 3641290734 IN IP4 127.0.0.1\n" +
                 "s=nginx\n" +
                 "c=IN IP4 127.0.0.1\n" +
                 "t=0 0\n" +
                 "m=audio 60820 RTP/AVP 0\n" +
                 "a=rtpmap:0 PCMU/8000\n" +
                 "a=recvonly\n" +
                 "m=video 59618 RTP/AVP 101\n" +
                 "a=rtpmap:101 H264/90000\n" +
                 "a=recvonly\n";

    What’s happening is that wireshark can detect the incoming packets at port 59618, but not as RTP packets but UDP packets. I am trying to capture the packets using ffmpeg with the following command :

    ubuntu@ip-132-31-40-100:~$ ffmpeg -i udp://127.0.0.1:59618 -vcodec copy stream.mp4
    ffmpeg version git-2017-01-22-f1214ad Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
     configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab --enable-libwavpack --enable-nvenc
     libavutil      55. 44.100 / 55. 44.100
     libavcodec     57. 75.100 / 57. 75.100
     libavformat    57. 63.100 / 57. 63.100
     libavdevice    57.  2.100 / 57.  2.100
     libavfilter     6. 69.100 /  6. 69.100
     libavresample   3.  2.  0 /  3.  2.  0
     libswscale      4.  3.101 /  4.  3.101
     libswresample   2.  4.100 /  2.  4.100
     libpostproc    54.  2.100 / 54.  2.100

    All I get is a blinking cursor and The stream.mp4 file is not written to disk after I exit (ctrl+c).

    So can you help me figure out :

    1. why wireshark cannot detect the packets as RTP (I suspect it has something to do with SDP)
    2. How to handle SDP answer when the RTP endpoint is pushing to ffmpeg which doesn’t send an answer back.

    Here is the entire code (hello world tutorial modified)

    /*
        * (C) Copyright 2014-2015 Kurento (http://kurento.org/)
        *
        * Licensed under the Apache License, Version 2.0 (the "License");
        * you may not use this file except in compliance with the License.
        * You may obtain a copy of the License at
        *
        *   http://www.apache.org/licenses/LICENSE-2.0
        *
        * Unless required by applicable law or agreed to in writing, software
        * distributed under the License is distributed on an "AS IS" BASIS,
        * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        * See the License for the specific language governing permissions and
        * limitations under the License.
        */

       function getopts(args, opts)
       {
         var result = opts.default || {};
         args.replace(
             new RegExp("([^?=&]+)(=([^&]*))?", "g"),
             function($0, $1, $2, $3) { result[$1] = decodeURI($3); });

         return result;
       };

       var args = getopts(location.search,
       {
         default:
         {
           ws_uri: 'wss://' + location.hostname + ':8433/kurento',
           ice_servers: undefined
         }
       });

       function setIceCandidateCallbacks(webRtcPeer, webRtcEp, onerror)
       {
         webRtcPeer.on('icecandidate', function(candidate) {
           console.log("Local candidate:",candidate);

           candidate = kurentoClient.getComplexType('IceCandidate')(candidate);

           webRtcEp.addIceCandidate(candidate, onerror)
         });

         webRtcEp.on('OnIceCandidate', function(event) {
           var candidate = event.candidate;

           console.log("Remote candidate:",candidate);

           webRtcPeer.addIceCandidate(candidate, onerror);
         });
       }


       function setIceCandidateCallbacks2(webRtcPeer, rtpEp, onerror)
       {
         webRtcPeer.on('icecandidate', function(candidate) {
           console.log("Localr candidate:",candidate);

           candidate = kurentoClient.getComplexType('IceCandidate')(candidate);

           rtpEp.addIceCandidate(candidate, onerror)
         });
       }


       window.addEventListener('load', function()
       {
         console = new Console();

         var webRtcPeer;
         var pipeline;
         var webRtcEpt;

         var videoInput = document.getElementById('videoInput');
         var videoOutput = document.getElementById('videoOutput');

         var startButton = document.getElementById("start");
         var stopButton = document.getElementById("stop");

         startButton.addEventListener("click", function()
         {
           showSpinner(videoInput, videoOutput);

           var options = {
             localVideo: videoInput,
             remoteVideo: videoOutput
           };


           if (args.ice_servers) {
            console.log("Use ICE servers: " + args.ice_servers);
            options.configuration = {
              iceServers : JSON.parse(args.ice_servers)
            };
           } else {
            console.log("Use freeice")
           }

           webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options, function(error)
           {
             if(error) return onError(error)

             this.generateOffer(onOffer)
           });

           function onOffer(error, sdpOffer)
           {
             if(error) return onError(error)

             kurentoClient(args.ws_uri, function(error, client)
             {
               if(error) return onError(error);

               client.create("MediaPipeline", function(error, _pipeline)
               {
                 if(error) return onError(error);

                 pipeline = _pipeline;

                 pipeline.create("WebRtcEndpoint", function(error, webRtc){
                   if(error) return onError(error);

                   webRtcEpt = webRtc;

                   setIceCandidateCallbacks(webRtcPeer, webRtc, onError)

                   webRtc.processOffer(sdpOffer, function(error, sdpAnswer){
                     if(error) return onError(error);

                     webRtcPeer.processAnswer(sdpAnswer, onError);
                   });
                   webRtc.gatherCandidates(onError);

                   webRtc.connect(webRtc, function(error){
                     if(error) return onError(error);

                     console.log("Loopback established");
                   });
                 });



               pipeline.create("RtpEndpoint", function(error, rtp){
                   if(error) return onError(error);

                   //setIceCandidateCallbacks2(webRtcPeer, rtp, onError)


                   var cm_offer = "v=0\n" +
                         "o=- 3641290734 3641290734 IN IP4 127.0.0.1\n" +
                         "s=nginx\n" +
                         "c=IN IP4 127.0.0.1\n" +
                         "t=0 0\n" +
                         "m=audio 60820 RTP/AVP 0\n" +
                         "a=rtpmap:0 PCMU/8000\n" +
                         "a=recvonly\n" +
                         "m=video 59618 RTP/AVP 101\n" +
                         "a=rtpmap:101 H264/90000\n" +
                         "a=recvonly\n";



                   rtp.processOffer(cm_offer, function(error, cm_sdpAnswer){
                     if(error) return onError(error);

                     //webRtcPeer.processAnswer(cm_sdpAnswer, onError);
                   });
                   //rtp.gatherCandidates(onError);

                   webRtcEpt.connect(rtp, function(error){
                     if(error) return onError(error);

                     console.log("RTP endpoint connected to webRTC");
                   });
                 });









               });
             });
           }
         });
         stopButton.addEventListener("click", stop);


         function stop() {
           if (webRtcPeer) {
             webRtcPeer.dispose();
             webRtcPeer = null;
           }

           if(pipeline){
             pipeline.release();
             pipeline = null;
           }

           hideSpinner(videoInput, videoOutput);
         }

         function onError(error) {
           if(error)
           {
             console.error(error);
             stop();
           }
         }
       })


       function showSpinner() {
         for (var i = 0; i < arguments.length; i++) {
           arguments[i].poster = 'img/transparent-1px.png';
           arguments[i].style.background = "center transparent url('img/spinner.gif') no-repeat";
         }
       }

       function hideSpinner() {
         for (var i = 0; i < arguments.length; i++) {
           arguments[i].src = '';
           arguments[i].poster = 'img/webrtc.png';
           arguments[i].style.background = '';
         }
       }

       /**
        * Lightbox utility (to display media pipeline image in a modal dialog)
        */
       $(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) {
         event.preventDefault();
         $(this).ekkoLightbox();
       });
  • ffmpeg mkv to mp4 including subtitles

    1er février 2017, par user3677559

    Want to convert mkv files to mp4 (h264, mp3 and subtitles). I checked the video files with ffprobe. For the output

    Stream #0:2(ger) : Subtitle : dvb_subtitle (default)

    The subtitles are included in the converted video with following ffmpeg command.

    ffmpeg -i movie.mkv -c:v libx264 -c:a libmp3lame  -b:a 320k -c:s dvd_subtitle  converted.mp4

    But for the output :

    Stream #0:3(ger) : Subtitle : subrip (default)

    The command isn’t working. There is no error message and the resulting video includes a subtitle stream, but no subtitles are showed. I tried also with the subtitle encoding mov_text and copy, but no luck. Following the output from console :

       ffmpeg version 3.2.2-1 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 6.2.1 (Debian 6.2.1-5) 20161124
     configuration: --prefix=/usr --extra-version=1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-libopencv --enable-frei0r --enable-libx264 --enable-chromaprint --enable-shared
     WARNING: library configuration mismatch
     avcodec     configuration: --prefix=/usr --extra-version=1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-libopencv --enable-frei0r --enable-libx264 --enable-chromaprint --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc --enable-netcdf
     libavutil      55. 34.100 / 55. 34.100
     libavcodec     57. 64.101 / 57. 64.101
     libavformat    57. 56.100 / 57. 56.100
     libavdevice    57.  1.100 / 57.  1.100
     libavfilter     6. 65.100 /  6. 65.100
     libavresample   3.  1.  0 /  3.  1.  0
     libswscale      4.  2.100 /  4.  2.100
     libswresample   2.  3.100 /  2.  3.100
     libpostproc    54.  1.100 / 54.  1.100
    [mpeg2video @ 0x56335b2e1180] warning: first frame is no keyframe
    Input #0, matroska,webm, from 'movie.mkv':
     Metadata:
       title           : The Movie name
       encoder         : Tvheadend Matroska muxer
       DATE_BROADCASTED: 2014-08-17 20:14:20
       ORIGINAL_MEDIA_TYPE: TV
       TVCHANNEL       : a channel
       SUMMARY         : summary
       SUMMARY-ger     : summary
       DESCRIPTION     : blablabla
     Duration: 02:22:35.55, start: 0.000000, bitrate: 3689 kb/s
       Chapter #0:0: start 354.274000, end 1854.154000
       Chapter #0:1: start 1854.154000, end 2333.434000
       Chapter #0:2: start 2333.434000, end 3541.234000
       Chapter #0:3: start 3541.234000, end 4016.554000
       Chapter #0:4: start 4016.554000, end 5369.434000
       Chapter #0:5: start 5369.434000, end 5838.874000
       Chapter #0:6: start 5838.874000, end 6885.754000
       Chapter #0:7: start 6885.754000, end 7337.314000
       Chapter #0:8: start 7337.314000, end 8313.514000
       Chapter #0:9: start 8313.514000, end 8358.514000
       Chapter #0:10: start 8358.514000, end 8555.554000
       Stream #0:0(eng): Video: mpeg2video (Main), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
       Stream #0:1(ger): Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s (default)
       Stream #0:2(ger): Audio: ac3, 48000 Hz, stereo, fltp, 384 kb/s (default)
       Stream #0:3(ger): Subtitle: subrip (default)
    [libx264 @ 0x56335b31c8a0] using SAR=64/45
    [libx264 @ 0x56335b31c8a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x56335b31c8a0] profile High, level 3.0
    [libx264 @ 0x56335b31c8a0] 264 - core 148 r2708 86b7198 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'The-Movie_name.mkv.mp4':
     Metadata:
       title           : The Movie name
       DESCRIPTION-ger : BlaBlaBla
       encoder         : Lavf57.56.100
       Chapter #0:0: start 354.274000, end 1854.154000
       Chapter #0:1: start 1854.154000, end 2333.434000
       Chapter #0:2: start 2333.434000, end 3541.234000
       Chapter #0:3: start 3541.234000, end 4016.554000
       Chapter #0:4: start 4016.554000, end 5369.434000
       Chapter #0:5: start 5369.434000, end 5838.874000
       Chapter #0:6: start 5838.874000, end 6885.754000
       Chapter #0:7: start 6885.754000, end 7337.314000
       Chapter #0:8: start 7337.314000, end 8313.514000
       Chapter #0:9: start 8313.514000, end 8358.514000
       Chapter #0:10: start 8358.514000, end 8555.554000
       Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
       Metadata:
         encoder         : Lavc57.64.101 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
       Stream #0:1(ger): Audio: mp3 (libmp3lame) (i[0][0][0] / 0x0069), 48000 Hz, stereo, s16p, 320 kb/s (default)
       Metadata:
         encoder         : Lavc57.64.101 libmp3lame
       Stream #0:2(ger): Subtitle: dvd_subtitle (dvdsub) ([224][0][0][0] / 0x00E0) (default)
       Metadata:
         encoder         : Lavc57.64.101 dvdsub
    Stream mapping:
     Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
     Stream #0:1 -> #0:1 (mp2 (native) -> mp3 (libmp3lame))
     Stream #0:3 -> #0:2 (subrip (srt) -> dvd_subtitle (dvdsub))
    Press [q] to stop, [?] for help
    [mpeg2video @ 0x56335b31bb20] warning: first frame is no keyframe
    [dvdsub @ 0x56335b2f8600] Bitmap subtitle required:00:31.41 bitrate= 685.0kbits/s dup=15 drop=2 speed=3.65x    
    Subtitle encoding failed
    [libx264 @ 0x56335b31c8a0] frame I:4     Avg QP:13.61  size: 32211
    [libx264 @ 0x56335b31c8a0] frame P:202   Avg QP:21.61  size:  8129
    [libx264 @ 0x56335b31c8a0] frame B:551   Avg QP:28.86  size:  1021
    [libx264 @ 0x56335b31c8a0] consecutive B-frames:  0.8%  4.2%  5.9% 89.1%
    [libx264 @ 0x56335b31c8a0] mb I  I16..4: 36.4% 49.0% 14.7%
    [libx264 @ 0x56335b31c8a0] mb P  I16..4:  1.6%  3.2%  0.7%  P16..4: 20.8%  9.1%  6.0%  0.0%  0.0%    skip:58.7%
    [libx264 @ 0x56335b31c8a0] mb B  I16..4:  0.1%  0.1%  0.0%  B16..8: 17.9%  1.6%  0.4%  direct: 0.7%  skip:79.3%  L0:40.6% L1:48.8% BI:10.5%
    [libx264 @ 0x56335b31c8a0] 8x8 transform intra:55.5% inter:69.0%
    [libx264 @ 0x56335b31c8a0] coded y,uvDC,uvAC intra: 46.1% 45.6% 23.5% inter: 5.3% 5.4% 2.1%
    [libx264 @ 0x56335b31c8a0] i16 v,h,dc,p: 40% 44%  6% 10%
    [libx264 @ 0x56335b31c8a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 33% 33%  2%  2%  3%  2%  3%  3%
    [libx264 @ 0x56335b31c8a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 29% 14%  3%  3%  4%  3%  4%  3%
    [libx264 @ 0x56335b31c8a0] i8c dc,h,v,p: 47% 29% 21%  3%
    [libx264 @ 0x56335b31c8a0] Weighted P-Frames: Y:1.0% UV:0.0%
    [libx264 @ 0x56335b31c8a0] ref P L0: 62.3% 12.0% 18.2%  7.5%  0.0%
    [libx264 @ 0x56335b31c8a0] ref B L0: 84.6% 11.5%  3.8%
    [libx264 @ 0x56335b31c8a0] ref B L1: 94.9%  5.1%
    [libx264 @ 0x56335b31c8a0] kb/s:616.48
    [libmp3lame @ 0x56335b2f7880] 3 frames left in the queue on closing
    Conversion failed!

    Any ideas ?