Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (48)

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

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

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

  • Intel QuickSync error : Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

    30 novembre 2018, par Arie Syamsudin

    I want to make IPTV with a topology like this :

    Restream / source -----> IPTV server -----> User

    The problem at the moment is the question of bandwidth that is still large.

    Finally I announced by IPTV software providers to transcode with Intel QuickSync video and FFmpeg.

    I followed the steps given by the software provider at the following link :
    http://www.ezhometech.com/document/intel_ffmpeg.txt

    Which comes from the link below :
    https://www.intel.com/content/dam/www/public/us/en/documents/white-paper...

    I installed IPTV software on a laptop with an Intel processor, chipset and VGA.

    [root@iptv ffmpeg-4.1]# **lspci**
    00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
    00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
    00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
    00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
    00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
    00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
    00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5)
    00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
    00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset Family LPC Controller (rev 05)
    00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller (rev 05)
    00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
    01:00.0 Ethernet controller: Qualcomm Atheros AR8152 v2.0 Fast Ethernet (rev c1)
    02:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01)

    [root@iptv ffmpeg-4.1]# **lspci -nn -s 0:02.0**
    00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09)

    but when I do a transcoding test, an error always appears :
    Error initializing output stream 0:0 — Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height.

    Error details :
    https://paste.fedoraproject.org/paste/vp9XIzbeOuyXRuLBlLfSng

    FFmpeg log :

    ./ffmpeg  -hwaccel qsv -i http://premium-play.org:8000/domm0H56Cj/q3ODLP6C16/2826 -vcodec h264_qsv -acodec copy -b:v 1200K -f mpegts udp://127.0.0.1:9011?pkt_size=1316
    ffmpeg version 3.2.12 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)
     configuration: --enable-libmfx --enable-nonfree
     libavutil      55. 34.101 / 55. 34.101
     libavcodec     57. 64.101 / 57. 64.101
     libavformat    57. 56.101 / 57. 56.101
     libavdevice    57.  1.100 / 57.  1.100
     libavfilter     6. 65.100 /  6. 65.100
     libswscale      4.  2.100 /  4.  2.100
     libswresample   2.  3.100 /  2.  3.100
    Input #0, mpegts, from 'http://premium-play.org:8000/domm0H56Cj/q3ODLP6C16/2826':
     Duration: N/A, start: 30200.274878, bitrate: N/A
     Program 1
       Metadata:
         service_name    : Service01
         service_provider: FFmpeg
       Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc
       Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 125 kb/s
    libva info: VA-API version 1.0.0
    libva info: va_getDriverName() returns 0
    libva info: User requested driver 'iHD'
    libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
    libva info: Found init function __vaDriverInit_1_0
    libva info: va_openDriver() returns 0
    [h264_qsv @ 0x2a89500] Selected ratecontrol mode is not supported by the QSV runtime. Choose a different mode.
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv))
     Stream #0:1 -> #0:1 (copy)
    Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
  • rapid TS fragment ffmpeg decoding - memory leak

    9 août 2017, par NadavRub

    Environment :

    • Ubuntu 16.04 (x64)
    • C++
    • ffmpeg

    Use-case

    • Multiple MPEG-TS fragments are rapidly decoded ( numerous every sec )
    • The format of the TS fragments is dynamic and can’t be known ahead of time
    • The first A/V frames of each fragment are needed to be extracted

    Problem statement

    • The code bellow successfully decodes A/V, BUT, has a huge memory leak ( MBytes/sec )
    • According to the docs seems all memory is freed as it should ( does it... ? )

    Why do I get this huge mem leak, what am I missing in the following code snap ?

       struct MEDIA_TYPE {
           ffmpeg::AVMediaType eType;
           union {
               struct {
                   ffmpeg::AVPixelFormat   colorspace;
                   int                     width, height;
                   float                   fFPS;
               } video;
               struct : WAVEFORMATEX {
                   short sSampleFormat;
               } audio;
           } format;
       };

       struct FRAME {
           enum { MAX_PALNES = 3 + 1 };
           int         iStrmId;
           int64_t     pts;    // Duration in 90Khz clock resolution

           uint8_t**   ppData; // Null terminated
           int32_t*    pStride;// Zero terminated
       };

       HRESULT ProcessTS(IN Operation op, IN uint8_t* pTS, IN uint32_t uiBytes, bool(*cb)(IN const MEDIA_TYPE& mt, IN FRAME& frame, IN PVOID pCtx), IN PVOID pCbCtx)
       {
           uiBytes -= uiBytes % 188;// align to 188 packet size

           struct CONTEXT {
               uint8_t* pTS;
               uint32_t uiBytes;
               int32_t  iPos;
           } ctx = { pTS, uiBytes, 0 };

           LOGTRACE(TSDecoder, "ProcessTS(%d, 0x%.8x, %d, 0x%.8x, 0x%.8x), this=0x%.8x\r\n", (int)op, pTS, uiBytes, cb, pCbCtx, this);

           ffmpeg::AVFormatContext* pFmtCtx = 0;
           if (0 == (pFmtCtx = ffmpeg::avformat_alloc_context()))
               return E_OUTOFMEMORY;

           ffmpeg::AVIOContext* pIoCtx = ffmpeg::avio_alloc_context(pTS, uiBytes, 0, &ctx
                                                               , [](void *opaque, uint8_t *buf, int buf_size)->int {
                                                                       auto pCtx = (CONTEXT*)opaque;
                                                                       int size = pCtx->uiBytes;
                                                                       if (pCtx->uiBytes - pCtx->iPos < buf_size)
                                                                           size = pCtx->uiBytes - pCtx->iPos;
                                                                       if (size > 0) {
                                                                           memcpy(buf, pCtx->pTS + pCtx->iPos, size);
                                                                           pCtx->iPos += size;
                                                                       }
                                                                       return size;
                                                                   }
                                                               , 0
                                                               , [](void* opaque, int64_t offset, int whence)->int64_t {
                                                                   auto pCtx = (CONTEXT*)opaque;
                                                                   switch (whence)
                                                                       {
                                                                       case SEEK_SET:
                                                                       pCtx->iPos = offset;
                                                                       break;
                                                                   case SEEK_CUR:
                                                                       pCtx->iPos += offset;
                                                                       break;
                                                                   case SEEK_END:
                                                                       pCtx->iPos = pCtx->uiBytes - offset;
                                                                       break;
                                                                   case AVSEEK_SIZE:
                                                                       return pCtx->uiBytes;
                                                                   }
                                                                   return pCtx->iPos;
                                                               });

       pFmtCtx->pb = pIoCtx;

       int iRet = ffmpeg::avformat_open_input(&pFmtCtx, "fakevideo.ts", m_pInputFmt, 0);
       if (ERROR_SUCCESS != iRet) {
           assert(false);
           pFmtCtx = 0;// a user-supplied AVFormatContext will be freed on failure.
           return E_FAIL;
       }

       struct DecodeContext {
           ffmpeg::AVStream*   pStream;
           ffmpeg::AVCodec*    pDecoder;
           int                 iFramesProcessed;
       };

       HRESULT hr                  = S_OK;
       int     iStreamsProcessed   = 0;

       bool    bVideoFound         = false;
       int64_t ptsLast             = 0;
       int64_t dtsLast             = 0;

       auto pContext = (DecodeContext*)alloca(sizeof(DecodeContext) * pFmtCtx->nb_streams);
       for (unsigned int i = 0; i < pFmtCtx->nb_streams; i++) {
           assert(pFmtCtx->streams[i]->index == i);
           pContext[i].pStream         = pFmtCtx->streams[i];
           pContext[i].pDecoder        = ffmpeg::avcodec_find_decoder(pFmtCtx->streams[i]->codec->codec_id);
           pContext[i].iFramesProcessed= 0;
           if (0 == pContext[i].pDecoder)
               continue;
           if ((iRet = ffmpeg::avcodec_open2(pFmtCtx->streams[i]->codec, pContext[i].pDecoder, NULL)) < 0) {
               _ASSERT(FALSE);
               hr = E_FAIL;
               goto ErrExit;
           }
       }

       while (S_OK == hr) {
           ffmpeg::AVFrame* pFrame = 0;
           ffmpeg::AVPacket pkt;
           ffmpeg::av_init_packet(&pkt);
           if (ERROR_SUCCESS != (iRet = ffmpeg::av_read_frame(pFmtCtx, &pkt))) {
               hr = E_FAIL;
               break;
           }
           if ((0 == dtsLast) && (0 != pkt.dts))
               dtsLast = pkt.dts;
           if ((0 == ptsLast) && (0 != pkt.pts))
               ptsLast = pkt.pts;
           DecodeContext& ctx = pContext[pkt.stream_index];
           if (Operation::DECODE_FIRST_FRAME_OF_EACH_STREAM == op) {
               if (iStreamsProcessed == pFmtCtx->nb_streams) {
                   hr = S_FALSE;
                   goto Next;
               }
               if (ctx.iFramesProcessed > 0)
                   goto Next;
               iStreamsProcessed++;
           }
           if (0 == ctx.pDecoder)
               goto Next;

           if (0 == (pFrame = ffmpeg::av_frame_alloc())) {
               hr = E_OUTOFMEMORY;
               goto Next;
           }

           LOGTRACE(TSDecoder, "ProcessTS(%d, 0x%.8x, %d, 0x%.8x, 0x%.8x), this=0x%.8x, decode, S:%d, T:%d\r\n", (int)op, pTS, uiBytes, cb, pCbCtx, this, pkt.stream_index, ctx.pStream->codec->codec_type);
           int         bGotFrame   = false;
           int         iBytesUsed  =   0;
           MEDIA_TYPE  mt;
           memset(&mt, 0, sizeof(mt));
           mt.eType = ctx.pStream->codec->codec_type;
           switch (mt.eType) {
           case ffmpeg::AVMediaType::AVMEDIA_TYPE_AUDIO:
               ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
               if((iRet = ffmpeg::avcodec_decode_audio4(ctx.pStream->codec, pFrame, &bGotFrame, &pkt)) < 0) {
                   hr = E_FAIL;
                   goto Next;
               }
               _ASSERT(pkt.size == iRet);
               // FFMPEG AAC decoder oddity, first call to 'avcodec_decode_audio4' results mute audio where the second result the expected audio
               bGotFrame = false;
               if ((iRet = ffmpeg::avcodec_decode_audio4(ctx.pStream->codec, pFrame, &bGotFrame, &pkt)) < 0) {
                   hr = E_FAIL;
                   goto Next;
               }
               _ASSERT(pkt.size == iRet);
               ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
               if (false == bGotFrame)
                   goto Next;

               iBytesUsed                      = ctx.pStream->codec->frame_size;
               mt.format.audio.nChannels       = ctx.pStream->codec->channels;
               mt.format.audio.nSamplesPerSec  = ctx.pStream->codec->sample_rate;
               mt.format.audio.wBitsPerSample  = ffmpeg::av_get_bytes_per_sample(ctx.pStream->codec->sample_fmt) * 8;
               mt.format.audio.nBlockAlign     = mt.format.audio.nChannels * mt.format.audio.wBitsPerSample / 8;
               mt.format.audio.sSampleFormat   = (short)pFrame->format;
               break;
           case ffmpeg::AVMediaType::AVMEDIA_TYPE_VIDEO:
               if ((iRet = ffmpeg::avcodec_decode_video2(ctx.pStream->codec, pFrame, &bGotFrame, &pkt)) < 0) {
                   hr = E_FAIL;
                   break;
               }
               if (false == bGotFrame)
                   goto Next;

               assert(ffmpeg::AVPixelFormat::AV_PIX_FMT_YUV420P == ctx.pStream->codec->pix_fmt);// Thats is the only color space currently supported
               iBytesUsed                      = (ctx.pStream->codec->width * ctx.pStream->codec->height * 3) / 2;
               mt.format.video.width           = ctx.pStream->codec->width;
               mt.format.video.height          = ctx.pStream->codec->height;
               mt.format.video.colorspace      = ctx.pStream->codec->pix_fmt;
               mt.format.video.fFPS            = (float)ctx.pStream->codec->framerate.num / ctx.pStream->codec->framerate.den;
               bVideoFound                     = true;
               break;
           default:
               goto Next;
           }

           ctx.iFramesProcessed++;

           {
               FRAME f = { ctx.pStream->index, ((0 == ptsLast) ? dtsLast : ptsLast), (uint8_t**)pFrame->data, (int32_t*)pFrame->linesize };
               if ((iRet > 0) && (false == cb(mt, f, pCbCtx)))
                   hr = S_FALSE;// Breaks the loop
           }
       Next:
           ffmpeg::av_free_packet(&pkt);
           if (0 != pFrame) {
               //ffmpeg::av_frame_unref(pFrame);
               ffmpeg::av_frame_free(&pFrame);
               pFrame = 0;
           }
       }

    ErrExit:
       for (unsigned int i = 0; i < pFmtCtx->nb_streams; i++)
           ffmpeg::avcodec_close(pFmtCtx->streams[i]->codec);

       pIoCtx->buffer = 0;// We have allocated the buffer, no need for ffmpeg to free it 4 us
       pFmtCtx->pb = 0;
       ffmpeg::av_free(pIoCtx);
       ffmpeg::avformat_close_input(&pFmtCtx);
       ffmpeg::avformat_free_context(pFmtCtx);
       return hr;
    }
  • Diamond Rio Artifacts

    30 août 2012, par Multimedia Mike — Multimedia History

    Remember the Diamond Rio PMP300 ? It’s credited with being the very first portable MP3 player, released all the way back in 1998 (I say ‘credited’ because I visited an audio museum once which exhibited a Toshiba MP3 player from 1997). I recently rescued a pristine set of Rio artifacts from a recycle pile.



    I wondered if I should scan the manual for posterity. However, a Google search indicates that a proper PDF (loaded with pleas to not illegally copy music) isn’t very difficult to come by. Here are the other items that came with the unit :



    Click for larger image

    Ah, more memories (of dialup internet) : A tie-in with another Diamond product, this time a modem which claims to enable the user to download songs at up to 112 kilobits per second. I wonder if that was really possible. I remember that 56k modems were a stretch and 33.6k was the best that most users could hope for.

    There is also a separate piece of paper that advises the buyer that the parallel port adapter might look a bit different than what is seen in the printed copy. Imagine the age of downloading to your MP3 player via parallel port while pulling down new songs via dialup internet.

    The artifacts also included not one, but two CD-ROMs :



    Click for larger image

    One is a driver and software disc, so no big surprise there. The other has a selection of MP3 files for your shiny new MP3 player. I’m wondering if these should be proactively preserved. I was going to process the files’ metadata and publish it here, for the benefit of search engines. However, while metadata is present, the files don’t conform to any metadata format that FFmpeg/Libav recognize. The files mention Brava Software Inc. in their metadata sections. Still, individual filenames at the end of this post.

    Leftovers :
    A few other miscellaneous multimedia acquisitions :



    I still want to study all of these old multimedia creation programs in depth some day. Theatrix Hollywood is a creative writing game, Wikipedia alleges (I’m a bit rigid with my exact definition of what constitutes a game). Here is an example movie output from this software. Meanwhile, the Mad Dog Multimedia CD-ROM apparently came packaged with a 56X CD-ROM drive (roughly the pinnacle of CD-ROM speeds). I found it has some version of Sonic Foundry’s ACID software, thus making good on the “applications” claim on the CD-ROM copy.

    Diamond Rio MP3 Sampler
    These are the names of the MP3 files found on the Diamond Rio MP3 sampler for the benefit of search engines.

    13_days.mp3
    albert_einstein_dreams.mp3
    a_man_of_many_colours.mp3
    anything_for_love.mp3
    a_secret_place.mp3
    bake_sale.mp3
    bigger_than_the_both_of_us.mp3
    boogie_beat.mp3
    bring_it_on.mp3
    buskersoundcheck_hippo.mp3
    charm.mp3
    chemical_disturbance.mp3
    coastin.mp3
    credit_is_due.mp3
    dance_again.mp3
    destiny.mp3
    dig_a_little_deeper.mp3
    diplomat6_bigmouthshut.mp3
    dirty_littlemonster.mp3
    dirty.mp3
    drivin.mp3
    Eric_Clapton_Last_Train.mp3
    etude_in_c_sharp_minor_op_42_n.mp3
    everybody_here.mp3
    freedom_4_all.mp3
    grandpas_advice.mp3
    groove.mp3
    heartland.mp3
    he_loved_her_so.mp3
    highway_to_hell.mp3
    hit_the_ground_runnin.mp3
    i_feel_fine_today.mp3
    im_not_lost_im_exploring.mp3
    into_the_void.mp3
    its_alright.mp3
    i_will_be_there.mp3
    i_will_pass_this_way_again.mp3
    juiceboxwilly_hepcat.mp3
    just_an_illusion.mp3
    keepin_time_by_the_river.mp3
    king_of_the_brooklyn_delta.mp3
    lovermilou_ringingbell.mp3
    middle_aged_rock_and_rollers.mp3
    midnight_high.mp3
    mr_schwinn.mp3
    my_brilliant_masterpiece.mp3
    my_gallery.mp3
    on_the_river_road.mp3
    pouring_rain.mp3
    prayer.mp3
    rats_in_my_bedroom.mp3
    razor_serpent_and_the_dub_mix.mp3
    ruthbuzzy_pleasestophangin.mp3
    secret_love.mp3
    ships.mp3
    silence_the_thunder.mp3
    sleeping_beauty.mp3
    slow_burn.mp3
    standing_in_my_own_way.mp3
    take_no_prisoners.mp3
    takin_up_space.mp3
    Taylor_Dayne_Unstoppable.mp3
    the_laundromat_song.mp3
    the_old_dun_cow.mp3
    the_people_i_meet.mp3
    trip_trigger_avenue.mp3
    tru-luv.mp3
    unfortunate_man.mp3
    vertigo.mp3
    when_she_runs.mp3
    where_do_we_go_from_here.mp3
    words_of_earnest.mp3