Recherche avancée

Médias (1)

Mot : - Tags -/blender

Autres articles (76)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

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

  • Participer à sa documentation

    10 avril 2011

    La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
    Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
    Pour ce faire, vous pouvez vous inscrire sur (...)

Sur d’autres sites (11263)

  • continuous record/recognize audio with pocketsphinx/ffmpeg

    10 novembre 2017, par Michael

    as the title already says, I want to continuous record raw audio through my microphone.
    So the idea was running a simple C program in the background as service that would create chunks of audio and send those files through the sphinx speech recognition.

    After that I can do some processing with the recognized words.

    The problem is the (continuous) recognition. I can’t just record audio chunks containing 10 seconds what i’ve said, because maybe chunk[33] -> chunk[34] belong together and then sphinx would output something like :

    recognized chunk[33] -> ["enable light"]
    recognized chunk[34] -> ["5 with 50 percent"]

    Another approach would be to continuous record audio but then I can’t process big audio files with sphinx.

    I’m using the basic example from pocketsphinx :

    #include

    int main(int argc, char *argv[])
    {
    ps_decoder_t *ps;
    cmd_ln_t *config;
    FILE *fh;
    char const *hyp, *uttid;
    int16 buf[512];
    int rv;
    int32 score;

    config = cmd_ln_init(NULL, ps_args(), TRUE,
                "-hmm", MODELDIR "/en-us/en-us",
                "-lm", MODELDIR "/en-us/en-us.lm.bin",
                "-dict", MODELDIR "/en-us/cmudict-en-us.dict",
                NULL);
    if (config == NULL) {
    fprintf(stderr, "Failed to create config object, see log for details\n");
    return -1;
    }

    ps = ps_init(config);
    if (ps == NULL) {
    fprintf(stderr, "Failed to create recognizer, see log for details\n");
    return -1;
    }

    fh = fopen("audiochunk_33.raw", "rb");
    if (fh == NULL) {
    fprintf(stderr, "Unable to open input file goforward.raw\n");
    return -1;
    }

    rv = ps_start_utt(ps);

    while (!feof(fh)) {
    size_t nsamp;
    nsamp = fread(buf, 2, 512, fh);
    rv = ps_process_raw(ps, buf, nsamp, FALSE, FALSE);
    }

    rv = ps_end_utt(ps);
    hyp = ps_get_hyp(ps, &score);
    printf("Recognized: %s\n", hyp);

    fclose(fh);
    ps_free(ps);
    cmd_ln_free_r(config);

    return 0;

    }

    And here is a basic example using ffmpeg to create a simple audio file/chunk :

    #include
    #include
    #include

    #define N 44100

    void main()
    {
    // Create audio buffer
    int16_t buf[N] = {0}; // buffer
    int n;                // buffer index
    double Fs = 44100.0;  // sampling frequency

    // Generate 1 second of audio data - it's just a 1 kHz sine wave
    for (n=0 ; n<n></n>Fs);

    // Pipe the audio data to ffmpeg, which writes it to a wav file
    FILE *pipeout;
    pipeout = popen("ffmpeg -y -f s16le -ar 44100 -ac 1 -i - beep.wav", "w");
    fwrite(buf, 2, N, pipeout);
    pclose(pipeout);
    }

    BR
    Michael

  • How to force specific AVInputFormat in code (FFMPEG) ?

    18 février 2020, par kugipark

    ++Plaease understand that maybe some words or sentences could not be correct English.++

    I’m novice programmer and developing a video player app for Android which can play 5ch .avi video from http. It based on ffplay.c in FFMPEG libarary.

    Currently I have 2 problems for this below. It has occured only in android devices.


    1) Too much time taken for detecting format.

    • opening and finding stream info takes more than a minute when I trying to open 5ch video source whereas normal .mp4 (h264) source open almost immediately.

    2) Demuxing is too slow when it comes to large size video.

    • If the resolution of video getting larger, then displaying frame rate getting slower even though there are enough memory, network and CPU resources physically.

    To resolve my problem, I tried to force the format and decoders but I couldn’t found some information for specifying the input source in code level.
    The official doc site only refers to a sentence about those parameters like "If non-NULL, this parameter forces a specific input format. Otherwise the format is autodetected.". So I don’t have any clues how to set the number of streams, decoders, decoders’ private options, and etc. (And also which parameters should I manage.) If someone knows how to set the options(like AVDictionary), and pass to the av functions, please let me know an exmple. The source contains 2 video streams, 1 audio stream, and 2 more extra streams (for custom data like gps). The stream information of video is below. I printed it manually, and these are auto-detected information.

       ---------- File format information ----------
    flags=2097152
    video_codec_id=0 (NONE)
    audio_codec_id=0 (NONE)
    ctx_flags=0
    data_codec_id=0 (NONE)
    format_whitelist=(null)
    iformat=0xa19d0d2c
    ---------- Stream information ----------
    stream 1 of 5:
    ----- common ----------
    bit_rate: 11383235
    bits_per_coded_sample: 24
    bits_per_raw_sample: 0
    codec_id: 0x1C (H264)
    codec_tag: 875967048
    extradata_size: 0
    level: -99
    profile: -99
    sample_rate: 0
    ----- Video Stream ----------
    chroma_location: 0
    color_primaries: 2
    color_space: 2
    color_trc: 2
    field_order: 0
    format: -1 (NONE)
    height: 1080
    width: 1920
    sample_aspect_ratio.den: 1
    sample_aspect_ratio.num: 0
    video_delay: 0
    ----------------------------------------
    stream 2 of 5:
    ----- common ----------
    bit_rate: 6185438
    bits_per_coded_sample: 24
    bits_per_raw_sample: 0
    codec_id: 0x1C (H264)
    codec_tag: 875967048
    extradata_size: 0
    level: -99
    profile: -99
    sample_rate: 0
    ----- Video Stream ----------
    chroma_location: 0
    color_primaries: 2
    color_space: 2
    color_trc: 2
    field_order: 0
    format: -1 (NONE)
    height: 720
    width: 1280
    sample_aspect_ratio.den: 1
    sample_aspect_ratio.num: 0
    video_delay: 0
    ----------------------------------------
    stream 3 of 5:
    ----- common ----------
    bit_rate: 352800
    bits_per_coded_sample: 16
    bits_per_raw_sample: 0
    codec_id: 0x10000 (PCM_S16LE)
    codec_tag: 1
    extradata_size: 0
    level: -99
    profile: -99
    sample_rate: 22050
    ----- Audio Stream ----------
    block_align: 2
    channels: 1
    channel_layout: 0
    color_range: 0
    frame_size: 0
    initial_padding: 0
    seek_preroll: 0
    trailing_padding: 0
    ----------------------------------------
    stream 4 of 5:
    ----- common ----------
    bit_rate: 15625
    bits_per_coded_sample: 0
    bits_per_raw_sample: 0
    codec_id: 0x0 (NONE)
    codec_tag: 0
    extradata_size: 0
    level: -99
    profile: -99
    sample_rate: 0
    ----- Subtitle Stream ----------
    ----------------------------------------
    stream 5 of 5:
    ----- common ----------
    bit_rate: 33862
    bits_per_coded_sample: 0
    bits_per_raw_sample: 0
    codec_id: 0x0 (NONE)
    codec_tag: 0
    extradata_size: 0
    level: -99
    profile: -99
    sample_rate: 0
    ----- Subtitle Stream ----------
  • I want to convert images and sounds into video using php [closed]

    6 janvier 2023, par hossein ahmadi

    I have 5 pictures that contain 5 English words&#xA;Also, I have five audio files of pronunciation of the words above.

    &#xA;

    I want to write a program with php that puts five pictures together with intervals of five seconds and plays the audio file of each according to the words.

    &#xA;

    5s(word1.jpg)   5s(word2.jpg)   5s(word3.jpg)   ...&#xA;(audio1.mp3)    (audio2.mp3)    (audio3.mp3) ...&#xA;output.mp4&#xA;

    &#xA;

    I researched ffmpeg but still haven't found the answer to what I want to do

    &#xA;