Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (51)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (6712)

  • Applescript to automatically convert new downloaded MKV files using ffmpeg

    18 février 2014, par user3315469

    I'm new to Applescript and would love some help figuring out how to use it to make my life easier. I want to create a script that automatically selects new movies added to a folder (actually a folder within a folder, as I have a "Movies" folder and then each movie gets its own folder within that), checks the extensions, and converts them using the Terminal if they have extension .mkv. The Terminal command I want to run is

    ffmpeg -i -y [movie_name].mkv -c copy [movie_name].mp4

    It will need to look in the correct folder for the movie, which is already automatically created when the movie is added. So, to clarify, there's a "Movies" folder, which contains the newly created folder for a specific movie, which in turn contains the newly added movie file.

    I am running Mavericks on a MacBook Pro.

  • How to hold the mpegts stream for few seconds ?

    8 août 2024, par Aven

    How to hold the mpegts stream for 5 seconds without changing frams's PTS ?

    


    I tried the tsduck command as below :

    


    aven.cheng@tgcusers-MacBook-Pro ~ % tsp -I ip 235.35.3.5:3535 -P timeshift --time 5000 -O ip 235.35.3.5:3536

* Warning: timeshift: unknown initial bitrate, discarding packets until a valid bitrate can set the buffer size


    


    the stream of 235.35.3.5:3536 did come out 5 seconds later after i executed the above command..
But the frames' PTS of 235.35.3.5:3536 are not the same anymore. For exsample, the PTS of my target frame is 10935000 from 235.35.3.5:3535, but the PTS of my target frame has changed to 10830542 from 235.35.3.5:3536.

    


    Is that possible to hold the stream for few seconds and also keep the PTS unchanged ? I don't necessarily have to use tsduck ; I am open to using other tools.

    


  • Hit noise when playing part of wave file with ALSA PCM interface

    11 décembre 2024, par wangt13

    I am working a WAVE file playing with ALSA PCM interface in Linux, and I heard noise when I played the file quickly and partially.

    


    Here is my playing function.

    


    static int playback_function(uint8_t *pcm_buf, int pcm_frames)
{
    int  rc;
    uint8_t *buf;
    int frame_size, sent;
    int periodsize;
    int left;

    frame_size = chan * av_get_bytes_per_sample(AV_SAMPLE_FMT_S16);
    periodsize = sys_periodsize; // 320 in my system
    buf = pcm_buf;
    left = pcm_frames;
    sent = 0;

    while (left > 0) {
        sent = (left > periodsize) ? periodsize : left;
        rc = snd_pcm_writei(pcm_handle, buf, sent);
        printf("rc: %d, sent: %d\n", rc, sent);
        if (rc == -EAGAIN || (rc >= 0 && (size_t)rc < sent)) {
            snd_pcm_wait(pcm_handle, 10);
        } else if (rc == -EPIPE) {
            snd_pcm_recover(pcm_handle, rc, 0);
        } else if (rc < 0) {
            break;
        }
        if (rc > 0) {
            left -= rc;
            buf += rc * frame_size;
        }
    }
    return rc;
}


    


    The pcm_buf and pcm_frames are got from swr_convert() in libswresample, in my case, the pcm_frames is 1187.

    


    By adding printf("rc: %d, sent: %d\n", rc, sent);, I got following logs.

    


    rc: 320, sent: 320
rc: 87, sent: 87
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103
rc: 320, sent: 320
rc: 320, sent: 320
rc: 87, sent: 87
rc: 320, sent: 320
rc: 320, sent: 320
rc: 103, sent: 103


    


    With above function, sometimes I can hear noise when playing the WAVE file quickly and repeatly.
    
So, how can I improve the WAVE playing without the noise ??

    


    I changed the above function by using filling 0 to the end of data buffer (to enforce silence).

    


    static int playback_test(uint8_t *pcm_buf, int pcm_frames)
{
    uint8_t *buf;
    int trd;
    int rc;
    int left;
    int frame_size, sent;
    int periodsize;
    int aligned = 0;

    frame_size = chan * av_get_bytes_per_sample(AV_SAMPLE_FMT_S16);
    periodsize = sys_periodsize; // 320 in my system

    buf = pcm_buf;
    left = pcm_frames;
    aligned = (left/periodsize + 1) * periodsize;
    memset(buf + left * frame_size, 0, (aligned - left) * frame_size);
    sent = 0;
///left = periodsize; // <== This causes more noise!!

    while (left > 0) {
        sent = (left > periodsize) ? periodsize : left;
        rc = snd_pcm_writei(pcm_handle, buf, sent);
        printf("rc: %d, sent: %d\n", rc, sent);
        if (rc == -EAGAIN || (rc >= 0 && (size_t)rc < sent)) {
            snd_pcm_wait(pcm_handle, 10);
        } else if (rc == -EPIPE) {
            snd_pcm_recover(pcm_handle, rc, 0);
        } else if (rc < 0) {
            break;
        }
        if (rc > 0) {
            left -= rc;
            buf += rc * frame_size;
        }
    }
    return rc;
}


    


    There is NO improvement as of the noise.