Recherche avancée

Médias (1)

Mot : - Tags -/punk

Autres articles (61)

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

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

Sur d’autres sites (6762)

  • Building x264 with YASM : failing the ASM check

    11 janvier 2020, par radiofreemyourenji

    My question up front is, "I have new yasm, I think x264 is supposed to be cool with that, why is x264 not cool with that ?"

    For reasons, I am building a CentOS docker image (based on centos:latest) that contains a from-scratch ffmpeg build, following the guide here. It’s a good guide, it’s worked for me before, so I was feeling good about it.

    Today I’m hitting a choke point on the libx264 build point : specifically, I say

    PKG_CONFIG_PATH="/tmp/ffmpeg_build/lib/pkgconfig" \
     ./configure \
     --prefix="/tmp/ffmpeg_build" \
     --bindir="/tmp/bin" \
     --enable-static

    And I get a reply back

    Found no assembler

    Minimum version is nasm-2.13

    If you really want to compile without asm, configure with —disable-asm.

    That’s unexpected. I have yasm, which I understand to be 1) there to do the things nasm does but better, and 2) to be the daisy-fresh most modern version given that I pulled it from its repo about an hour ago, and built it about fifty-nine minutes ago. For what it’s worth, nasm is on the box too since the instructions request it, but it’s below their stated version (i.e. it’s "NASM version 2.10.07 compiled on Jun 9 2014")

    So it seems like yasm is not being found. There’s another StackExchange question that mentions that problem, which came out to a pathing issue. So, I added yasm to my path like so :

    PATH=/tmp/ffmpeg_sources/yasm:$PATH \
     PKG_CONFIG_PATH="/tmp/ffmpeg_build/lib/pkgconfig" \
     ./configure
     ...etc

    That still gave the Found-no-assembler problem. As a last, confused resort, I told the script explicitly what I wanted to use for the variable $AS, because based on my quick look into configure, that looked like where yasm/nasm was meant to go. The command becomes :

    AS=`which yasm`
     PKG_CONFIG_PATH="/tmp/ffmpeg_build/lib/pkgconfig" \
     ./configure
     ...etc

    That at least gave

    Found yasm 1.3.0

    Minimum version is nasm-2.13

    If you really want to compile without asm, configure with —disable-asm.

    Looking in the config.log I see the following :

    checking whether /tmp/bin/yasm supports vmovdqa32 [eax]{k1}{z}, zmm0... no
    Failed commandline was:
    --------------------------------------------------
    /tmp/bin/yasm conftest.asm  -I. -I$(SRCPATH) -DARCH_X86_64=1 -I$(SRCPATH)/common/x86/ -f elf64  -o conftest.o
    conftest.asm:1: error: instruction expected after label
    conftest.asm:1: warning: ignoring unrecognized character `{'
    conftest.asm:1: warning: ignoring unrecognized character `}'
    conftest.asm:1: warning: ignoring unrecognized character `{'
    conftest.asm:1: warning: ignoring unrecognized character `}'
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    vmovdqa32 [eax]{k1}{z}, zmm0
    --------------------------------------------------

    So : what’s the deal here ? Is my assumption that yasm drop-in replaces nasm bad ? Is yasm good for this purpose, but I’m not providing the right information to ./configure ? Are my instructions for building ffmpeg for CentOS simply out of date with respect to this prerequisite and I should just try harder to get a modern nasm ?

  • avcodec : Add explicit capability flag for encoder flushing

    10 avril 2020, par Philip Langdale
    avcodec : Add explicit capability flag for encoder flushing
    

    Previously, there was no way to flush an encoder such that after
    draining, the encoder could be used again. We generally suggested
    that clients teardown and replace the encoder instance in these
    situations. However, for at least some hardware encoders, the cost of
    this tear down/replace cycle is very high, which can get in the way of
    some use-cases - for example : segmented encoding with nvenc.

    To help address that use case, we added support for calling
    avcodec_flush_buffers() to nvenc and things worked in practice,
    although it was not clearly documented as to whether this should work
    or not. There was only one previous example of an encoder implementing
    the flush callback (audiotoolboxenc) and it's unclear if that was
    intentional or not. However, it was clear that calling
    avocdec_flush_buffers() on any other encoder would leave the encoder in
    an undefined state, and that's not great.

    As part of cleaning this up, this change introduces a formal capability
    flag for encoders that support flushing and ensures a flush call is a
    no-op for any other encoder. This allows client code to check if it is
    meaningful to call flush on an encoder before actually doing it.

    I have not attempted to separate the steps taken inside
    avcodec_flush_buffers() because it's not doing anything that's wrong
    for an encoder. But I did add a sanity check to reject attempts to
    flush a frame threaded encoder because I couldn't wrap my head around
    whether that code path was actually safe or not. As this combination
    doesn't exist today, we'll deal with it if it ever comes up.

    • [DH] doc/APIchanges
    • [DH] libavcodec/audiotoolboxenc.c
    • [DH] libavcodec/avcodec.h
    • [DH] libavcodec/decode.c
    • [DH] libavcodec/nvenc_h264.c
    • [DH] libavcodec/nvenc_hevc.c
    • [DH] libavcodec/version.h
  • FFmpeg, decode mp3 packet after sending by network

    4 août 2022, par Stanislav

    Good day, everyone.
    
Working with FFmpeg.
    
And have some issues with decoding, I cannot find in docs and forums.
The code is not simple, so I will try to explain firstly in words, may be someone really skilled in ffmpeg will understand the issue by words. But if the code really helps, i will try to post it.

    


    So, firstly in general, what i want to do. I want to capture voice, encode to mp3, get packet, send to network, on the other side : accept the packet, decode and play. Why not to use ffmpeg streaming ? Well, because this packet will be modified a little bit, and may be encoded/crypted, so ffmpeg has no functions to do this, and i should do it manually.
    
Well, what i managed to do now. Now i can encode and decode via file. This code works fine, without any issues. So generally i can encode and decode mp3, and play, so i assume that my code for encoding/decoding works fine.

    


    So, than i just change code, making no saving to file, and send packets via network instead.
    
This is the method, standard, well, i use to send packet to decoder on the accepting side.

    


      result = avcodec_send_packet( codecContext, networkPacket );
  if( result < 0 ) {
    if( result != AVERROR(EAGAIN) ) {
      qDebug() << "Some decoding error occured: " << result;
      return;
    }
  }


    


    networkPacket is the AVPacket restored from network.

    


      AVPacket* networkPacket = NULL;
  networkPacket = av_packet_alloc();
  ...


    


    And that is the way i restore it.

    


    void FFmpegPlay::processNetworkPacket( MediaPacket* mediaPacket ) {

  qDebug() << "FFmpegPlay::processNetworkPacket start";

  int result;

  AVPacket* networkPacket = NULL;
  networkPacket = av_packet_alloc();

  networkPacket->size = mediaPacket->data.size();
  networkPacket->data = (uint8_t*) malloc( mediaPacket->data.size() + AV_INPUT_BUFFER_PADDING_SIZE );
  memcpy( networkPacket->data, mediaPacket->data.data(), mediaPacket->data.size() );
  networkPacket->pts = mediaPacket->pts;
  networkPacket->dts = mediaPacket->dts;
  networkPacket->flags = mediaPacket->flags;
  networkPacket->duration = mediaPacket->duration;
  networkPacket->pos = mediaPacket->pos;
  ...


    


    And there i get -22, EINVAL, invalid argument.
Docs tell me :

    


    AVERROR(EINVAL):   codec not opened, it is an encoder, or requires flush


    


    Well, my codec really opened, this is decoder, and this is first call, so i think that flush is not required. So i assume, that issue is in packet and codec setup. I also tried different flags, and always get this error. Codec just doesn't want to accept packet.

    


    So, now i have explained the situation.
    
And question is : Is there any special options or flags for ffmpeg mp3 decoder to implement what is explained above ? Which one of them i should change ?

    


    Upd.
After some testing, i decided to make more clear test and check if i can decode immediately after encoding, without network, and it looks like i can do that.
So it looks like in network case the decoder should be initialized somehow special, or have some options.
Well, i'm dealing initialization by copying AVCodecParameters from original and sending them by network. Maybe i should change them some special way ?

    


    I'm stuck on this one. And have no idea how to deal with it. So any help is appreciated.