Recherche avancée

Médias (91)

Autres articles (37)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (5014)

  • Any suggestion for a reliable video format for industrial applications ?

    2 juin 2017, par fstab

    I am currently using videos encoded in MPEG4 (h264). This makes the content of the frames rely on the content of other frames.

    In my case this is undesirable as I often need to quickly split video files without re-compressing or altering the content and seek many times trough the video.

    The video format that I need needs to be reliable and the frames need to be independent from each other.

    Any idea on which video format might be best for these requirements ?

    Maybe there is a sub-type of MPEG4 encoding that allows to reach this result ?

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

    


  • ffmpeg problem in ubuntu (libavcodec.so)

    7 décembre 2016, par lyuba

    I run Ubuntu and try to use the ffmpeg wrapper in Java from here :
    http://code.google.com/p/javacv/

    It seems to work fine on other systems, but in Ubuntu the project crashes
    with the following mistake :
    Exception in thread "main" java.lang.UnsatisfiedLinkError : Error looking up
    function ’avcodec_decode_video2’ : /usr/lib/i686/cmov/libavcodec.so :
    undefined symbol : avcodec_decode_video2

    ffmpeg is working great from the command line, though.

    JavaCV author recommended me to check this link :
    http://linux-tipps.blogspot.com/2009/05/pretending-package-is-installed-by.html

    Probably I’m doing something wrong, but it cannot reinstall libavcodec51
    like this.

    So the questions are :
    1. Is those solution above a good one so I should bring it to success
    somehow ?
    2. What are the other ways to solve the problem ?

    Thank you for your suggestions in advance !