Recherche avancée

Médias (1)

Mot : - Tags -/publier

Autres articles (101)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (12019)

  • AWS Lambda. Error=20 (Not a directory) when moving FFmpeg to /tmp

    18 novembre 2017, par Omar Riaz

    I am using the ffmpeg-cli-wrapper to run FFmpeg from an application I upload onto AWS lambda. I was initially getting the

    error=13 Permission Denied

    when trying to call it via the wrappers ProcessBuilder. My inital solution was to chmod 755 ffmpeg before uploading, but it didn’t help.

    For information, my FFmpeg and ffprobe files are located in the following classpath : static/ffmpeg/ffmpeg and static/ffmpeg/ffprobe. They are also statically linked.

    AWS Lambda permission denied when trying to use ffmpeg

    I’ve tried to follow the instructions given in the example above, but when I try to perform either mv or cp command :Runtime.exec("mv " + pathToFFmpeg + " /tmp"), I get the

    error=20, Not a directory

    error.

    I know that I have the correct path for FFmpeg because the following command mv *pathToFFmpeg* *an arbitrary name* runs without error, meaning that the file is there and so the mv command just renames it as it’s supposed to do.

  • Couldn't run a ffmpeg process by using supervisor [on hold]

    11 août 2019, par Ahmad

    This issue seems to be weird, at least for me.

    I’m trying to run a ffmpeg process using the supervisor as follows :

    [program:myprocessname]
    command="/usr/bin/ffmpeg -loglevel quiet -i ..."
    process_name=%(program_name)s
    numprocs=1
    umask=022
    priority=999
    autostart=true
    autorestart=unexpected
    startretries=3
    exitcodes=0
    stopsignal=TERM
    stopwaitsecs=10
    user=vagrant

    This program never gets run, in spite of changing the command to the absolute path where the FFmpeg is located.

    This is what I get (from log) when I try to run it :

    {
       "description": "can't find command '/usr/bin/ffmpeg -loglevel quiet -i
    ...'",
       "exitstatus": 0,
       "group": "myprocessname",
       "logfile": "/var/log/supervisor/myprocessname-stdout---supervisor-oxWFk5.log",
       "name": "myprocessname",
       "now": 1554747933,
       "pid": 0,
       "spawnerr": "can't find command '/usr/bin/ffmpeg -loglevel quiet -i ...'",
       "start": 1554747575,
       "state": 200,
       "statename": "FATAL",
       "stderr_logfile": "/var/log/supervisor/myprocessname-stderr---supervisor-WNmJv6.log",
       "stdout_logfile": "/var/log/supervisor/myprocessname-stdout---supervisor-oxWFk5.log",
       "stop": 0
    }

    It might be that FFmpeg spawns processes where the supervisor couldn’t handle ?

    Any idea, please ?

  • "Critical error detected c0000374" when running av_packet_unref or av_frame_unref

    15 mai 2021, par Shivang Sharma

    I am trying to read and decode frames which is happening nicely but when its reaching part of un-referencing frame or packet using av_packet_unref and av_frame_unref it is giving error during second frame or third frame sometimes .

    


    Error (Copied from visual studio output window) :

    


    Critical error detected c0000374
Libav.exe has triggered a breakpoint


    


    Here is some code of reading and decoding which is giving error :

    


    void Decoder::streamNextFrame(int type = 0)
{
    while (av_read_frame(this->fileFormatCtx, this->latestpacket) >= 0) {
        if (this->audioDecoder->activeAudioStream != nullptr) {
            if (this->latestpacket->stream_index == this->audioDecoder->activeAudioStream->index) {
                avcodec_send_packet(this->audioDecoder->activeStreamDecoder, this->latestpacket);
                err = avcodec_receive_frame(this->audioDecoder->activeStreamDecoder, this->decodedFrame);
                if (err == AVERROR(EAGAIN)) {
                    av_frame_unref(this->decodedFrame);
                    av_packet_unref(this->latestpacket);
                    continue;
                }

                {
                    int currentIndex = (int)this->audioFrames->size();
                    this->audioFrames->resize((int)this->audioFrames->size() + 1);
                    int nb = 0;
                    this->audioFrames->at(currentIndex).pts = (int)this->decodedFrame->pts;
                    if (this->audioDecoder->activeStreamDecoder->sample_fmt != AV_SAMPLE_FMT_S16) {
                        nb = 2048 * this->audioDecoder->activeStreamDecoder->channels;
                        printf("%i\n", nb);
                        this->audioFrames->at(currentIndex).data.resize(nb);
                        if (!swr_is_initialized(swr)) {

                            swr_alloc_set_opts(swr, this->audioDecoder->activeStreamDecoder->channel_layout, AV_SAMPLE_FMT_S16, this->audioDecoder->activeStreamDecoder->sample_rate, this->audioDecoder->activeStreamDecoder->channel_layout, this->audioDecoder->activeStreamDecoder->sample_fmt, this->audioDecoder->activeStreamDecoder->sample_rate, 0, nullptr);
                            swr_init(swr);
                        }

                        uint8_t* buffer = this->audioFrames->at(currentIndex).data.data();
                        swr_convert(swr, &buffer, nb, (const uint8_t**)this->decodedFrame->extended_data, this->decodedFrame->nb_samples);
                    }
                    else {
                        nb = this->decodedFrame->nb_samples * this->audioDecoder->activeStreamDecoder->channels;
                        this->audioFrames->at(currentIndex).data = std::vector(*this->decodedFrame->extended_data, *this->decodedFrame->extended_data + (uint8_t)nb);
                    }

                    this->audioFrames->at(currentIndex).buffersize = nb;
                }

                if (err == AVERROR_EOF) {
                    this->audioDecoder->streamEnded = true;
                    av_frame_unref(this->decodedFrame);
                    av_packet_unref(this->latestpacket);
                    break;
                }
                else if (err >= 0) {
                    this->audioDecoder->streamEnded = false;
                }

                if (type != 0) {
                    av_packet_unref(this->latestpacket);
                    av_frame_unref(this->decodedFrame);
                    break;
                }
                av_packet_unref(this->latestpacket);
                av_frame_unref(this->decodedFrame);
            }
        }
        else {
            printf("No active audio stream is set\n");
            if(type!=0)
            break;
        }
    }

}


    


    I have removed some of code which was concerning the video and was not giving problem I think.

    


    Some Information about above code :

    


    this->audioFrames is a pointer to vector with following type.&#xA;std::vector<audioframeformat>* "AudioFrameFormat" is struct defined as following&#xA;&#xA;struct AudioFrameFormat {&#xA;        std::vector data = {};&#xA;        int pts = 0;&#xA;        int buffersize = 0;&#xA;    };&#xA;&#xA;&#xA;swr is a private class member allocated in constructor&#xA;</audioframeformat>

    &#xA;

    Call Stack looks like :

    &#xA;

    enter image description here

    &#xA;

    I am getting from call stack is that I am not taking care of my heap memory.

    &#xA;

    Can someone please explain where problem is and, why some times it run till third frame and some time till second frame of the audio stream ?

    &#xA;

    And please tell how can I improve this code.

    &#xA;