Recherche avancée

Médias (1)

Mot : - Tags -/publicité

Autres articles (81)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (9932)

  • Opening the ALSA microphone port using libavformat

    17 mai 2013, par Kartik Aiyer

    I'm writing a fairly simple application to open the microphone port using the ALSA format on a linux VM. I'm trying to do this using libavformat and other ffmpeg libs ( avutil, avcodec, etc ).

    I followed what ffmpeg was doing ( ffmpeg_opt.c : open_input_file) to open the actual microphone port( hw:0,0). I find the ALSA format using av_find_input_format( "alsa" ) which returns with a AVInputFormat* object.

    I then use this with avformat_open_input.
    I didn't precreate AVFormatContext and load it with any params before the above call ( I rely on it being created in avformat_open_input). This worked and I was able to read packets of the port. However, after a while I was not able to open the port. I added a bunch of debug in the libs and find out that :
    avformat_open_input -> init_input -> ... -> avio_open2 -> ffurl_open ->ffurl_alloc
    the final call to ffurl_alloc goes through all the protocols and tries to see if hw matches any given protocol. This fails.

    I was wondering if anyone has tried opening a mic with the ALSA format using libavformat and other libs, and if they have any tips on how to get this done. Specifically how does ffmpeg translate something like hw:0,0 to the actual device port ?

    P.S : I tried the following line on the command line app
    ffmpeg -f alsa -i hw:0,0 -ac 2 -acodec pcm_s16le output.aac
    this worked for a while and then suddenly stopped working as well with the same kind of problem. Unable to open the protocol.

    I'm not sure what changed and why its not able to open the audio port, but any advice on how also port are opened with the rather different handle of HW:x,x would be much appreciated.

    Alternatively, I realize ffmpeg is a little heavy to just read PCM packets and then encode and I could use a more direct approach by using the aac libs directly. Can anyone recommend a lib or kernel driver that I can use to open the microphone ( given that it is an ALSA card )and read PCM data out of it. ( I'm new to LInux so please forgive me if any of this sounds trivial )

    Thanks
    Kartik

  • RoQ on Dreamcast

    18 mars 2011, par Multimedia Mike — Sega Dreamcast

    I have been working on that challenge to play back video on the Sega Dreamcast. To review, I asserted that the RoQ format would be a good fit for the Sega Dreamcast hardware. The goal was to play 640x480 video at 30 frames/second. Short version : I have determined that it is possible to decode such video in real time. However, I ran into certain data rate caveats.

    First off : Have you ever wondered if the Dreamcast can read an 80mm optical disc ? It can ! I discovered this when I only had 60 MB of RoQ samples to burn on a disc and a spindle full of these 210MB-capacity 80mm CD-Rs that I never have occasion to use.



    New RoQ Library
    There are open source RoQ decoders out there but I decided to write a new one. A few reasons : 1) RoQ is so simple that I didn’t think it would take too long ; 2) it would be nice to have a RoQ library that is license-compatible (BSD-like) with the rest of the KallistiOS distribution ; 3) the idroq.tar.gz distribution, while license-compatible, has enough issues that I didn’t want to correct it.

    Thankfully, I was correct about the task not being too difficult : I put together a new RoQ decoder in short order. I’m a bit embarrassed to admit that the part I had the most trouble with was properly converting YUV -> RGB.

    About the approach I took : While the original idroq.tar.gz decoder maintains YUV 4:2:0 codebooks (which led to chroma bugs during motion compensation) and FFmpeg’s decoder maintains YUV 4:4:4 codebooks, this decoder is built to convert the YUV 4:2:0 vectors into RGB565 vectors during the vector unpacking phase. Thus, the entire frame is rendered in RGB565 — no lengthy YUV -> RGB conversion after decoding — and all pixels are shuffled around as 16-bit units (minor speedup vs. shuffling everything as bytes).

    I also entertained the idea of maintaining YUYV codebooks (since the DC supports that colorspace as a texture format). But I scrapped that idea when I remembered it would lead to the same chroma bleeding problem seen in the original idroq.tar.gz decoder.

    Onto The Dreamcast
    I developed the library on a Linux computer, allowing it to output a series of PNM files for visual verification and debugging. Dropping it into a basic DC/KOS-compatible program was trivial and the first order of business was profiling.

    At first, I profiled the entire decode operation : open file, then read and decode each chunk while tossing away the results. I was roundly disappointed to see that, e.g., an 8.5-second RoQ sample needed a little more than 20 seconds to complete. Not real time. I performed a series of optimizations on the decoding library that netted notable performance gains when profiling on Linux. When I brought these same optimizations over to the DC, decoding time didn’t improve at all. This was my first suspicion that perhaps my assumptions regarding the DC’s optical drive’s data rate were not correct.

    Dreamcast Data Rate Profiling
    Let’s start with some definitions : In terms of data rate, an ’X’, i.e., 1X is the minimum data rate needed to read CD quality audio from a disc. At that speed, a drive should be able to stream 75 sectors each second. When reading mode 1/form 1 CD-ROM data, each sector has 2048 bytes (2 kbytes), so a single-speed data rate should achieve 150 kbytes/sec.

    The Dreamcast is supposed to possess a 12X optical drive. This would imply a maximum data rate of 150 kbytes/sec * 12 = 1800 kbytes/sec.

    Rigging up a trivial experiment using the RoQ samples burned on a few different CD-R discs, the best data rate I can see is about 500-525 kbytes/sec, or around 3.5X.

    Where’s the discrepancy ? My first theory has to do with the fact that not all optical media is created equal. This is why optical drives often advertise a slew of numbers which refer to the best theoretical speed for reading a CD vs. writing a CD-R vs. writing a CD-RW, etc. Perhaps the DC drive can’t read CD-Rs very quickly. To test this theory, I tried streaming a large file from a conventionally mastered CD-ROM. This worked well for the closest CD-ROM I had on hand : I was able to stream data at a rate that works out to about 6.5X.

    I smell a science project for another evening : Profiling read speeds from a mastered CD-ROM, burned CD-R, and also a mastered GD-ROM, on each of the 3 Dreamcast consoles I possess (I’ve heard that there’s variance between optical drives depending on manufacturing run).

    The Good News
    I added a little finer-grained code to profile just the video decoding functions. The good news is that the decoder meets my real time goals : That 8.5-second RoQ sample encoded at 640x480x30fps makes its way through the video decoding functions on the DC in a little less than 5 seconds. If the optical drive can supply the data fast enough, the video decoder can take care of the rest.

    The RoQ encoder included with FFmpeg does not honor any bitrate parameters. Instead, I encoded the same file at 320x240. It reportedly decoded in real time and can be streamed in real time as well.

    I say "reportedly" because I’m simply working from textual output at this point ; the next phase is to hook the decoder up to the display hardware.

  • hwcontext_vaapi : add a quirk for the missing MemoryType attribute

    30 septembre 2016, par Anton Khirnov
    hwcontext_vaapi : add a quirk for the missing MemoryType attribute
    

    The Intel binary iHD driver does not support the
    VASurfaceAttribMemoryType, so surface allocation will fail when using
    it.

    (cherry picked from commit 2124711b950b03c582a119c75f52a87acc32d6ec)

    • [DH] doc/APIchanges
    • [DH] libavutil/hwcontext_vaapi.c
    • [DH] libavutil/hwcontext_vaapi.h
    • [DH] libavutil/version.h