Recherche avancée

Médias (91)

Autres articles (83)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (4228)

  • raspberry pi, ffmpeg, libmp3lame stream to icecast2 fails with : av_interleaved_write_frame() : Connection reset by peer

    9 avril 2016, par seekwhencer

    finally, i want to merge or mix audio channels from two streams into one new audio stream. but at first i want to relay or reencode an existing stream from an icecast2 server - and send it back to the icecast as new mountpoint. this stream comes from mpd on the same raspberry pi 2. and it works fine.

    i’ve got lame and ffmpeg on this way :

    cd /usr/src
    git clone https://github.com/rbrito/lame
    cd lame
    sudo ./configure
    sudo make
    sudo make install

    then ffmpeg

    cd /usr/src
    sudo rm -R ffmpeg
    git clone git://source.ffmpeg.org/ffmpeg.git
    cd ffmpeg
    sudo ./configure --arch=armel --target-os=linux --enable-gpl --enable-libmp3lame --enable-nonfree
    sudo make
    sudo make install

    A simple test fails with :

    **av_interleaved_write_frame(): Connection reset by peer
    Error writing trailer of icecast://admin:hackme@127.0.0.1:8000/listen: Connection reset by peersize=       5kB time=00:00:00.28 bitrate= 144.7kbits/s speed=1.73x**

    (with strange spaces)

    The reencoding ffmpeg script :

    ffmpeg \
    -i http://127.0.0.1:8000/live \
    -c:a libmp3lame -b:a 128k \
    -legacy_icecast 1 \
    -content_type audio/mpeg \
    -ice_name "hack radio" \
    -f mp3 icecast://admin:hackme@127.0.0.1:8000/listen \
    -y \
    -stats \
    -report

    I tried legacy_icecast 1 or 0.

    The ffmpeg report :

    ffmpeg started on 2016-04-09 at 00:57:56
    Report written to "ffmpeg-20160409-005756.log"
    Command line:
    ffmpeg -i http://127.0.0.1:8000/live -muxpreload 10 -c:a libmp3lame -b:a 128k -legacy_icecast 1 -content_type audio/mpeg -ice_name "NFS One Radio" -f mp3 icecast://admin:hackme@127.0.0.1:8000/listen -y -stats -report
    ffmpeg version N-79262-gae8a13c Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.6 (Debian 4.6.3-14+rpi1)
     configuration: --arch=armel --target-os=linux --enable-gpl --enable-libmp3lame --enable-nonfree
     libavutil      55. 20.100 / 55. 20.100
     libavcodec     57. 34.100 / 57. 34.100
     libavformat    57. 31.100 / 57. 31.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 41.100 /  6. 41.100
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Splitting the commandline.
    Reading option '-i' ... matched as input file with argument 'http://127.0.0.1:8000/live'.
    Reading option '-muxpreload' ... matched as option 'muxpreload' (set the initial demux-decode delay) with argument '10'.
    Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'libmp3lame'.
    Reading option '-b:a' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '128k'.
    Reading option '-legacy_icecast' ... matched as AVOption 'legacy_icecast' with argument '1'.
    Reading option '-content_type' ... matched as AVOption 'content_type' with argument 'audio/mpeg'.
    Reading option '-ice_name' ... matched as AVOption 'ice_name' with argument 'NFS One Radio'.
    Reading option '-f' ... matched as option 'f' (force format) with argument 'mp3'.
    Reading option 'icecast://admin:hackme@127.0.0.1:8000/listen' ... matched as output file.
    Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
    Reading option '-stats' ... matched as option 'stats' (print progress report during encoding) with argument '1'.
    Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option y (overwrite output files) with argument 1.
    Applying option stats (print progress report during encoding) with argument 1.
    Applying option report (generate a report) with argument 1.
    Successfully parsed a group of options.
    Parsing a group of options: input file http://127.0.0.1:8000/live.
    Successfully parsed a group of options.
    Opening an input file: http://127.0.0.1:8000/live.
    [http @ 0x343cee0] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
    [http @ 0x343cee0] request: GET /live HTTP/1.1
    User-Agent: Lavf/57.31.100
    Accept: */*
    Range: bytes=0-
    Connection: close
    Host: 127.0.0.1:8000
    Icy-MetaData: 1


    [mp3 @ 0x343c7e0] Format mp3 probed with size=262144 and score=50
    [mp3 @ 0x343c7e0] Skipping 656 bytes of junk at 0.
    [mp3 @ 0x343c7e0] Before avformat_find_stream_info() pos: 656 bytes read:272000 seeks:0
    [mp3 @ 0x343c7e0] All info found
    [mp3 @ 0x343c7e0] After avformat_find_stream_info() pos: 42640 bytes read:272000 seeks:0 frames:50
    Input #0, mp3, from 'http://127.0.0.1:8000/live':
     Metadata:
       icy-br          : 256
       icy-name        : NFS One Radio
       icy-pub         : 0
       StreamTitle     : x
     Duration: N/A, start: 0.000000, bitrate: 256 kb/s
       Stream #0:0, 50, 1/14112000: Audio: mp3, 44100 Hz, stereo, s16p, 256 kb/s
    Successfully opened the file.
    Parsing a group of options: output file icecast://admin:hackme@127.0.0.1:8000/listen.
    Applying option muxpreload (set the initial demux-decode delay) with argument 10.
    Applying option c:a (codec name) with argument libmp3lame.
    Applying option b:a (video bitrate (please use -b:v)) with argument 128k.
    Applying option f (force format) with argument mp3.
    Successfully parsed a group of options.
    Opening an output file: icecast://admin:hackme@127.0.0.1:8000/listen.
    [icecast @ 0x34492c0] No default whitelist set
    [http @ 0x344b9e0] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
    [http @ 0x344b9e0] request: SOURCE /listen HTTP/1.1
    User-Agent: Lavf/57.31.100
    Accept: */*
    Connection: close
    Host: 127.0.0.1:8000
    Content-Type: audio/mpeg
    Icy-MetaData: 1
    Ice-Name: NFS One Radio
    Ice-Public: 0
    Authorization: Basic YWRtaW46bWFyc2Jhc2U=

    The Output from ffmpeg :

    ffmpeg started on 2016-04-09 at 01:06:46
    Report written to "ffmpeg-20160409-010646.log"
    ffmpeg version N-79262-gae8a13c Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.6 (Debian 4.6.3-14+rpi1)
     configuration: --arch=armel --target-os=linux --enable-gpl --enable-libmp3lame --enable-nonfree
     libavutil      55. 20.100 / 55. 20.100
     libavcodec     57. 34.100 / 57. 34.100
     libavformat    57. 31.100 / 57. 31.100
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 41.100 /  6. 41.100
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    [mp3 @ 0x25ec7e0] Skipping 501 bytes of junk at 0.
    Input #0, mp3, from 'http://127.0.0.1:8000/live':
     Metadata:
       icy-br          : 256
       icy-name        : NFS One Radio
       icy-pub         : 0
       StreamTitle     : x
     Duration: N/A, start: 0.000000, bitrate: 256 kb/s
       Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 256 kb/s
    Output #0, mp3, to 'icecast://admin:hackme@127.0.0.1:8000/listen':
     Metadata:
       icy-br          : 256
       icy-name        : NFS One Radio
       icy-pub         : 0
       StreamTitle     : x
       TSSE            : Lavf57.31.100
       Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, s16p, 128 kb/s
       Metadata:
         encoder         : Lavc57.34.100 libmp3lame
    Stream mapping:
     Stream #0:0 -> #0:0 (mp3 (native) -> mp3 (libmp3lame))
    Press [q] to stop, [?] for help
    av_interleaved_write_frame(): Connection reset by peer
    Error writing trailer of icecast://admin:hackme@127.0.0.1:8000/listen: Connection reset by peersize=      16kB time=00:00:00.96 bitrate= 132.9kbits/s speed=3.14x
    video:0kB audio:16kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.183730%

    The icecast works fine with mpd. And icecast creates a new mountpoint when feeded.

    For some reason the connection to the icecast drops. Ideas ?

    Thanks

  • Anomalie #3769 : form_hidden insère un hidden en trop

    13 avril 2016, par jluc -

    Pour info voilà ce que ça affiche ( le probleme est le id_truc hidden dans le dernier résultat)

    ENV=
    Array
    (
    [page] => truc
    [id_truc] => 10
    [type-page] => truc
    [date] => 2016-04-13 19:25:44
    [date_default] => 1
    [date_redac] => 2016-04-13 19:25:44
    [date_redac_default] => 1
    )
    SELF
    ./ ?page=truc&id_truc=10
    SELF|form_hidden
    />/>
    url_pagetagada
    spip.php ?page=tagada
    URL_PAGEtagada|form_hidden
    />/>

  • ffmpeg av_interleaved_write_frame() : Broken pipe under windows

    7 avril 2016, par Allen

    I am using ffmpeg to convert original media file to rawvideo yuv format, ouputed the yuv to pipe, then my command tool receive the raw yuv as input, do some processing.

    e.g :

    D:\huang_xuezhong\build_win32_VDNAGen>ffmpeg -i test.mkv -c:v rawvideo -s 320x240 -f rawvideo - | my_tool -o output

    every time, when run the command, ffmpeg will dump this av_interleaved_write_frame(): Broken pipe error msg :

    Output #0, rawvideo, to 'pipe:':
     Metadata:
     encoder         : Lavf56.4.101
     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240 [SAR 120:91 DAR 160:91], q=2-31, 200 kb/s, 24 fps, 24 tbn, 24 tbc (default)
     Metadata:
         encoder         : Lavc56.1.100 rawvideo
     Stream mapping:
         Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
    Press [q] to stop, [?] for help
    av_interleaved_write_frame(): Broken pipe
    frame=    1 fps=0.0 q=0.0 Lsize=     112kB time=00:00:00.04 bitrate=22118.2kbits/s
    video:112kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing o
    verhead: 0.000000%
    Conversion failed!

    in my souce code : it take stdin as the input file, every time, it read a frame size content from it, if the content read is less than a frame size, then continue read, until a frame is fetched, then it use the frame content to generate something.

    int do_work (int jpg_width, int jpg_height)
    {
    int ret = 0;

    FILE *yuv_fp = NULL;
    unsigned char * yuv_buf = NULL;
    int frame_size = 0;
    int count = 0;
    int try_cnt = 0;

    frame_size = jpg_width * jpg_height * 3 / 2;
    va_log (vfp_log, "a frame size:%d\n", frame_size);

    yuv_fp = stdin;

    yuv_buf = (unsigned char *) aligned_malloc_int(
           sizeof(char) * (jpg_width + 1) * (jpg_height + 1) * 3, 128);

    if (!yuv_buf) {
       fprintf (stderr, "malloc yuv buf error\n");
       goto end;
    }

    memset (yuv_buf, 0, frame_size);
    while (1) {

       try_cnt++;
       va_log (vfp_log, "try_cnt is %d\n", try_cnt);

       //MAX_TRY_TIMES = 10
       if (try_cnt > MAX_TRY_TIMES) {
           va_log (vfp_log, "try time out\n");
           break;
       }

       count = fread (yuv_buf + last_pos, 1, frame_size - last_pos, yuv_fp);
       if (last_pos + count < frame_size) {
           va_log (vfp_log, "already read yuv: %d, this time:%d\n", last_pos + count, count);
           last_pos += count;
           continue;
       }

       // do my work here

       memset (yuv_buf, 0, frame_size);
       last_pos = 0;
       try_cnt = 0;
    }

    end:
    if (yuv_buf) {
       aligned_free_int (yuv_buf);
    }

    return ret;
    }

    my log :

    2016/04/05 15:20:38 : a frame size:115200
    2016/04/05 15:20:38 : try_cnt is 1
    2016/04/05 15:20:38 : already read yuv : 49365, this time:49365
    2016/04/05 15:20:38 : try_cnt is 2
    2016/04/05 15:20:38 : already read yuv : 49365, this time:0
    2016/04/05 15:20:38 : try_cnt is 3
    2016/04/05 15:20:38 : already read yuv : 49365, this time:0
    2016/04/05 15:20:38 : try_cnt is 4
    2016/04/05 15:20:38 : already read yuv : 49365, this time:0
    2016/04/05 15:20:38 : try_cnt is 5
    2016/04/05 15:20:38 : already read yuv : 49365, this time:0
    2016/04/05 15:20:38 : try_cnt is 6
    2016/04/05 15:20:38 : already read yuv : 49365, this time:0
    2016/04/05 15:20:38 : try_cnt is 7
    2016/04/05 15:20:38 : already read yuv : 49365, this time:0
    2016/04/05 15:20:38 : try_cnt is 8
    2016/04/05 15:20:38 : already read yuv : 49365, this time:0
    2016/04/05 15:20:38 : try_cnt is 9
    2016/04/05 15:20:38 : already read yuv : 49365, this time:0
    2016/04/05 15:20:38 : try_cnt is 10
    2016/04/05 15:20:38 : already read yuv : 49365, this time:0
    2016/04/05 15:20:38 : try_cnt is 11
    2016/04/05 15:20:38 : try time out
    ```

    my question :

    when piping used ,does ffmpeg write content to pipe buffer as soon as it has content, or it will buffer some size content, then flushes them to pipe ?Maybe some internal logic that I misunderstood,any one could help explain or fix my code ?

    PS : this command run ok under linux.