Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (53)

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

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Qualité du média après traitement

    21 juin 2013, par

    Le bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
    Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...)

Sur d’autres sites (6298)

  • QSharedMemory in Real-Time process

    21 novembre 2016, par Seungsoo Kim

    I’m trying to use QSharedMemory Class to share video data between two processes.

    So I tried like following method, but it has problem in simultaneous access of two processes.

    Two process crashes when they access sequentially to same memory name(key) "SharedMemory".

    I locked them while they’re used, but also it doesn’t work well.

    How can i avoid this crash ??

    1. Writing to SharedMemory - data type is and this function called by callback.

      QBuffer buffer;
      buffer.open(QBuffer::ReadWrite);
      QDataStream out(&buffer);

      QByteArray outArray = QByteArray::fromRawData(reinterpret_cast<const>(data), strlen(reinterpret_cast<const>(data)));
      out &lt;&lt; width &lt;&lt; height &lt;&lt; step &lt;&lt; cameraId &lt;&lt; strlen(reinterpret_cast<const>(data));
      out.writeRawData(outArray.data(), outArray.size());

      int size = buffer.size();

      sharedMemory.setKey("SharedMemory");

      if (!sharedMemory.isAttached()) {
         printf("Cannot attach to shared memory to update!\n");
      }
      if (!sharedMemory.create(size))
      {
         printf("failed to allocate memory\n");
      }
      sharedMemory.lock();
      char *to = (char*)sharedMemory.data();
      const char *from = buffer.data().data();
      memcpy(to, from,qMin(sharedMemory.size(),size));
      sharedMemory.unlock();
      </const></const></const>
    2. Using data in SharedMemory. - this function is called by QThread, interval 100ms

      QSharedMemory sharedMemory("SharedMemory");
      sharedMemory.lock();
      if (!sharedMemory.attach()) {
         printf("failed to attach to memory\n");
         return;
      }

      QBuffer buffer;
      QDataStream in(&amp;buffer);

      sharedMemory.create(1920 * 1080);
      buffer.setData((char*)sharedMemory.constData(), sharedMemory.size());
      buffer.open(QBuffer::ReadOnly);
      sharedMemory.unlock();
      sharedMemory.detach();

      int r_width = 0;    
      int r_height = 0;
      int r_cameraId = 0;
      int r_step = 0;
      int r_strlen = 0;
      in >> r_width >> r_height >> r_step >> r_cameraId >> r_strlen;

      char* receive = new char[r_strlen];
      in.readRawData(receive, r_strlen);
      //unsigned char* r_receive = new unsigned char[r_strlen];
      //r_receive = (unsigned char*)receive;

      QPixmap backBuffer = QPixmap::fromImage(QImage((unsigned char*)receive, r_width, r_height, r_step, QImage::Format::Format_RGB888));
      ui.label->setPixmap(backBuffer.scaled(ui.label->size(), Qt::KeepAspectRatio));
      ui.label->show();

    please share your idea ! thank you !

  • ffmpeg generating out of sync audio/video file

    2 mars 2013, par marcelorocks

    I am trying to convert a flv video to mp4 using a264, but the result video has a out of sync audio/video. Audio seems ok but video seems slow and therefore out of sync. I am a newbie on video conversion so any help is appreciated.

    Here is the command I am running :

    /opt/local/bin/ffmpeg -i complaint.flv -f mp4 -vcodec libx264 -acodec aac -copyts -strict experimental -fpre /opt/local/share/ffmpeg/libx264-lossless_slow.ffpreset -ab 44k -threads 0 -crf 23 complaint.mp4

    And the printout :

    Desktop  /opt/local/bin/ffmpeg -i complaint.flv -f mp4 -vcodec libx264 -acodec aac -copyts -strict experimental -fpre /opt/local/share/ffmpeg/libx264-lossless_slow.ffpreset -ab 44k -threads 0 -crf 23 complaint.mp4
    ffmpeg version 0.7.8, Copyright (c) 2000-2011 the FFmpeg developers
     built on Jan 12 2012 21:12:26 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
     configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libopenjpeg --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/gcc-4.2 --arch=x86_64 --enable-yasm
     libavutil    50. 43. 0 / 50. 43. 0
     libavcodec   52.123. 0 / 52.123. 0
     libavformat  52.111. 0 / 52.111. 0
     libavdevice  52.  5. 0 / 52.  5. 0
     libavfilter   1. 80. 0 /  1. 80. 0
     libswscale    0. 14. 1 /  0. 14. 1
     libpostproc  51.  2. 0 / 51.  2. 0
    [flv @ 0x7fe57a04ac00] Estimating duration from bitrate, this may be inaccurate
    Input #0, flv, from &#39;complaint.flv&#39;:
     Metadata:
       duration        : 7
       creationdate    : Thu Jan 12 23:47:24
       description     : Recorded using VideoRecording example.
     Duration: 00:00:06.61, start: 0.000000, bitrate: N/A
       Stream #0.0: Video: flv, yuv420p, 288x288, 1k tbr, 1k tbn, 1k tbc
       Stream #0.1: Audio: nellymoser, 11025 Hz, mono, s16
    File &#39;complaint.mp4&#39; already exists. Overwrite ? [y/N] y
    [buffer @ 0x7fe579c32cc0] w:288 h:288 pixfmt:yuv420p tb:1/1000000 sar:0/1 sws_param:
    [libx264 @ 0x7fe57a044600] using cpu capabilities: none!
    [libx264 @ 0x7fe57a044600] profile High, level 4.2
    [libx264 @ 0x7fe57a044600] 264 - core 118 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x33 me=umh subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=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.41 aq=1:1.00
    Output #0, mp4, to &#39;complaint.mp4&#39;:
     Metadata:
       duration        : 7
       creationdate    : Thu Jan 12 23:47:24
       description     : Recorded using VideoRecording example.
       encoder         : Lavf52.111.0
       Stream #0.0: Video: libx264, yuv420p, 288x288, q=0-69, 200 kb/s, 1k tbn, 1k tbc
       Stream #0.1: Audio: aac, 11025 Hz, mono, s16, 44 kb/s
    Stream mapping:
     Stream #0.0 -> #0.0
     Stream #0.1 -> #0.1
    Press [q] to stop, [?] for help
    frame= 6557 fps=106 q=-1.0 Lsize=     685kB time=00:00:03.62 bitrate=1549.1kbits/s dup=6367 drop=0    
    video:615kB audio:17kB global headers:0kB muxing overhead 8.361360%
    frame I:27    Avg QP:19.98  size:  8242
    [libx264 @ 0x7fe57a044600] frame P:6530  Avg QP:30.71  size:    62
    [libx264 @ 0x7fe57a044600] mb I  I16..4: 11.1% 79.3%  9.6%
    [libx264 @ 0x7fe57a044600] mb P  I16..4:  0.1%  0.2%  0.0%  P16..4:  1.2%  0.2%  0.3%  0.0%  0.0%    skip:98.0%
    [libx264 @ 0x7fe57a044600] 8x8 transform intra:77.8% inter:64.9%
    [libx264 @ 0x7fe57a044600] coded y,uvDC,uvAC intra: 75.3% 81.3% 33.3% inter: 0.5% 0.7% 0.1%
    [libx264 @ 0x7fe57a044600] i16 v,h,dc,p: 78%  9% 10%  3%
    [libx264 @ 0x7fe57a044600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 11% 32%  3%  4%  5%  2%  5%  4%
    [libx264 @ 0x7fe57a044600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 56%  7%  9%  3%  4%  7%  3%  7%  3%
    [libx264 @ 0x7fe57a044600] i8c dc,h,v,p: 45% 15% 34%  6%
    [libx264 @ 0x7fe57a044600] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0x7fe57a044600] ref P L0: 80.5%  9.5% 10.0%
    [libx264 @ 0x7fe57a044600] kb/s:767.20
  • FFMPEG support for HLS v4 and v5

    5 février 2015, par omkar

    As I understand latest FFMPEG version 2.0.1 supports till HLS version 3.

    After going through draft specifications for HLS :

    New features introduced in HLS V4 are :

    • Segments with bit range support with tag EXT-X-BYTERANGE
    • Support for fast forward and fast rewind with tags EXT-X-I-FRAMES-ONLY and EXT-X-I-FRAME-STREAM-INF
    • Alternate media option with tag EXT-X-MEDIA

    New features introduced in HLS V5 are :

    • Introduction of new attributes KEYFORMAT and KEYFORMATVERSIONS for tag EXT-X-KEY
    • Introduction of tag EXT-X-MAP
    • Support for subtitles by introduction of SUBTITLES value for attribute TYPE of tag EXT-X-MEDIA.

    Wanted to know which of the above features are planned to be implemented in FFMPEG library in near future ? It will be great if you share the expected delivery dates or versions for these features.

    Thanks in advance.