Recherche avancée

Médias (91)

Autres articles (32)

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

  • Receive rtp (opus) stream from ffmpeg on other computer with VLC

    27 juin 2015, par Friendlyghost89

    I am currently trying to get an opus stream to play on a separate computer using VLC.

    Currently the setup is as follows :

    Odroid-U2 running ffmpeg to capture audio and send as rtp opus stream to remote computer....
    command used : ffmpeg -f alsa -ac 1 -i hw:0 -acodec libopus -ab 32k -ac 1 -f rtp rtp ://192.168.0.115:2032

    the remote computer (on same local network) is at 192.168.0.115
    the Odroid is at 192.168.0.124

    If i use libmp3lame in libopus’s place then the stream will run through without a problem and will not prompt the fact that it requires sdp....

    VLC output on remote computer :

    SDP required: A description in SDP format is required to receive the RTP stream. Note that rtp:// URIs cannot work with dynamic RTP payload format (97).

    If i use an *.sdp file that I drop into vlc to play the stream it does nothing (no errors and no playback)

    SDP file used :

       SDP:
       v=0
       o=- 0 0 IN IP4 127.0.0.1
       s=No Name
       c=IN IP4 192.168.0.115
       t=0 0
       a=tool:libavformat 55.2.100
       m=audio 2032 RTP/AVP 97
       b=AS:32
       a=rtpmap:97 opus/48000

    ffmpeg output on Odroid :

       linaro@linaro-ubuntu-desktop:~$ ffmpeg -f alsa -ac 1 -i hw:0 -acodec libopus -ab 32k -ac 1         -f rtp rtp://192.168.0.115:2032
       ffmpeg version git-2013-04-13-87dd62e Copyright (c) 2000-2013 the FFmpeg developers
         built on Apr 13 2013 09:47:34 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
         configuration: --enable-gpl --enable-libmp3lame --enable-libopencore-amrnb --enable-        libopencore-amrwb --enable-libspeex --enable-librtmp --enable-libtheora --enable-libvorbis         --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3         --enable-libopus
         libavutil      52. 26.100 / 52. 26.100
         libavcodec     55.  2.100 / 55.  2.100
         libavformat    55.  2.100 / 55.  2.100
         libavdevice    55.  0.100 / 55.  0.100
         libavfilter     3. 53.101 /  3. 53.101
         libswscale      2.  2.100 /  2.  2.100
         libswresample   0. 17.102 /  0. 17.102
         libpostproc    52.  3.100 / 52.  3.100
       Guessed Channel Layout for  Input Stream #0.0 : mono
       Input #0, alsa, from 'hw:0':
         Duration: N/A, start: 1365868129.196234, bitrate: 768 kb/s
           Stream #0:0: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
       Output #0, rtp, to 'rtp://192.168.0.115:2032':
         Metadata:
           encoder         : Lavf55.2.100
           Stream #0:0: Audio: opus, 48000 Hz, mono, s16, 32 kb/s
       Stream mapping:
         Stream #0:0 -> #0:0 (pcm_s16le -> libopus)
       SDP:
       v=0
       o=- 0 0 IN IP4 127.0.0.1
       s=No Name
       c=IN IP4 192.168.0.115
       t=0 0
       a=tool:libavformat 55.2.100
       m=audio 2032 RTP/AVP 97
       b=AS:32
       a=rtpmap:97 opus/48000

    Any help is greatly appreciated....

    Regards

  • ffmpeg decoding yuv420p to rgb shifts luminance/brightness down

    6 avril 2013, par glopes

    I'm recording video from a grayscale camera into an MPEG4 video file using FFMPEG. Recently I noticed a weird effect : if I playback the file using FFMPEG or windows media player, the output frames are noticeably darker (by about 10 brightness values) than the original source.

    I thought the encoding step was doing this until I opened the same file in VLC and it gave me back the correct result. I played around with FFMPEG command lines to decode a single frame and realized that if I decode a frame into GRAY8 pixel format, the brightness/luminance values are preserved. Here's the command and ffmpeg output :

    ffmpeg -ss 0.5 -i video.avi -vframes 1 -t 1 -s 1280x680 -pix_fmt gray gray.bmp

    ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers
     built on Apr  4 2013 12:40:58 with gcc 4.6.2 (GCC)
     configuration: --enable-w32threads
     libavutil      52. 18.100 / 52. 18.100
     libavcodec     54. 92.100 / 54. 92.100
     libavformat    54. 63.104 / 54. 63.104
     libavdevice    54.  3.103 / 54.  3.103
     libavfilter     3. 42.103 /  3. 42.103
     libswscale      2.  2.100 /  2.  2.100
     libswresample   0. 17.102 /  0. 17.102
    Input #0, avi, from 'video.avi':
     Metadata:
       encoder         : Lavf53.32.100
     Duration: 00:00:07.47, start: 0.000000, bitrate: 16532 kb/s
       Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 128
    0x720 [SAR 1:1 DAR 16:9], 30 tbr, 30 tbn, 30 tbc
    Output #0, image2, to 'gray.bmp':
     Metadata:
       encoder         : Lavf54.63.104
       Stream #0:0: Video: bmp, gray, 1280x680 [SAR 17:18 DAR 16:9], q=2-31, 200 kb
    /s, 90k tbn, 30 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (mpeg4 -> bmp)
    Press [q] to stop, [?] for help
    frame=    1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.03 bitrate=N/A
    video:851kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.002524%

    However, if I decode the same frame into an rgb color pixel format, I end up again with the darker frames :

    ffmpeg -ss 0.5 -i video.avi -vframes 1 -t 1 -s 1280x680 -pix_fmt bgr24 rgb.bmp

    ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers
     built on Apr  4 2013 12:40:58 with gcc 4.6.2 (GCC)
     configuration: --enable-w32threads
     libavutil      52. 18.100 / 52. 18.100
     libavcodec     54. 92.100 / 54. 92.100
     libavformat    54. 63.104 / 54. 63.104
     libavdevice    54.  3.103 / 54.  3.103
     libavfilter     3. 42.103 /  3. 42.103
     libswscale      2.  2.100 /  2.  2.100
     libswresample   0. 17.102 /  0. 17.102
    Input #0, avi, from 'video.avi':
     Metadata:
       encoder         : Lavf53.32.100
     Duration: 00:00:07.47, start: 0.000000, bitrate: 16532 kb/s
       Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 128
    0x720 [SAR 1:1 DAR 16:9], 30 tbr, 30 tbn, 30 tbc
    Output #0, image2, to 'rgb.bmp':
     Metadata:
       encoder         : Lavf54.63.104
       Stream #0:0: Video: bmp, bgr24, 1280x680 [SAR 17:18 DAR 16:9], q=2-31, 200 k
    b/s, 90k tbn, 30 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (mpeg4 -> bmp)
    Press [q] to stop, [?] for help
    frame=    1 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.03 bitrate=N/A
    video:2550kB audio:0kB subtitle:0 global headers:0kB muxing overhead -100.000843%

    This happens with every single grayscale video that I encode to MPEG4 with FFMPEG. My best guess so far is it has to do with how the container pixel format gets converted to/from. Since I'm using MPEG4, the file pixel format is YUV420P. I have no idea how ffmpeg encodes from GRAY8 to YUV420P, but maybe it stores just the luminance values in Y... if this happens, then decoding from this to RGB could produce darker pixels by the scaling factor that is applied to the luminance matrix ?

    To sum it up :

    1) How can encoding a grayscale video to YUV420P with FFMPEG and decoding back produce wrong (darker) brightness values when decoding to RGB versus GRAY8 ? Presumably once the frames are in YUV420P format it shouldn't matter whether the source is actually grayscale or not so the result should be equivalent, no ?

    2) How does VLC avoid this situation ? I was under the impression that VLC used FFMPEG as well for video decoding, but somehow they managed to figure out how to produce the correct values without requiring me to indicate explicitly that the video was grayscale.

  • convert h.264 avi container to mp4 with ffmpeg

    31 août 2014, par Tom

    I’d like to convert my h.264 avi container to a mp4 container with ffmpeg. I’ve found this works :

    ./ffmpeg -i myfile.avi -vcodec copy myfile.mp4
    ffmpeg version N-51169-gcedf276 Copyright (c) 2000-2013 the FFmpeg developers
     built on Mar 21 2013 05:12:00 with gcc 4.6 (Debian 4.6.3-1)
     configuration: --prefix=/root/ffmpeg-static/32bit --arch=x86_32 --extra-cflags='-m32 -I/root/ffmpeg-static/32bit/include -static' --extra-ldflags='-m32 -L/root/ffmpeg-static/32bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
     libavutil      52. 22.100 / 52. 22.100
     libavcodec     55.  1.100 / 55.  1.100
     libavformat    55.  0.100 / 55.  0.100
     libavdevice    55.  0.100 / 55.  0.100
     libavfilter     3. 48.100 /  3. 48.100
     libswscale      2.  2.100 /  2.  2.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  2.100 / 52.  2.100
    [avi @ 0x9fff660] non-interleaved AVI
    Guessed Channel Layout for  Input Stream #0.1 : mono
    Input #0, avi, from 'myfile.avi':
     Metadata:
       encoder         : Lavf52.64.2
     Duration: 00:00:10.40, start: 0.000000, bitrate: 409 kb/s
       Stream #0:0: Video: h264 (Baseline) (H264 / 0x34363248), yuvj420p, 640x480, 10 fps, 10 tbr, 10 tbn, 30 tbc
       Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono, s16, 128 kb/s
    Output #0, mp4, to 'myfile.mp4':
     Metadata:
       encoder         : Lavf55.0.100
       Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuvj420p, 640x480, q=2-31, 10 fps, 10240 tbn, 10 tbc
       Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 8000 Hz, mono, s16, 128 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (pcm_s16le -> libvo_aacenc)
    Press [q] to stop, [?] for help
    [mp4 @ 0xa006ea0] pts has no value
       Last message repeated 100 times
    frame=  101 fps=0.0 q=-1.0 Lsize=     350kB time=00:00:11.06 bitrate= 259.3kbits/s
    video:332kB audio:15kB subtitle:0 global headers:0kB muxing overhead 0.926809%

    This generates a file that I can play with the HTML5 video player but for legacy browsers I’d like to use a flash player (Flowplayer). The file doesn’t play with Flowplayer, in fact it causes it to crash.

    However if I use :

    ./ffmpeg -i myfile.avi myfile2.mp4
    ffmpeg version N-51169-gcedf276 Copyright (c) 2000-2013 the FFmpeg developers
     built on Mar 21 2013 05:12:00 with gcc 4.6 (Debian 4.6.3-1)
     configuration: --prefix=/root/ffmpeg-static/32bit --arch=x86_32 --extra-cflags='-m32 -I/root/ffmpeg-static/32bit/include -static' --extra-ldflags='-m32 -L/root/ffmpeg-static/32bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
     libavutil      52. 22.100 / 52. 22.100
     libavcodec     55.  1.100 / 55.  1.100
     libavformat    55.  0.100 / 55.  0.100
     libavdevice    55.  0.100 / 55.  0.100
     libavfilter     3. 48.100 /  3. 48.100
     libswscale      2.  2.100 /  2.  2.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  2.100 / 52.  2.100
    [avi @ 0x9b02660] non-interleaved AVI
    Guessed Channel Layout for  Input Stream #0.1 : mono
    Input #0, avi, from 'myfile.avi':
     Metadata:
       encoder         : Lavf52.64.2
     Duration: 00:00:10.40, start: 0.000000, bitrate: 409 kb/s
       Stream #0:0: Video: h264 (Baseline) (H264 / 0x34363248), yuvj420p, 640x480, 10 fps, 10 tbr, 10 tbn, 30 tbc
       Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono, s16, 128 kb/s
    No pixel format specified, yuvj420p for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
    [libx264 @ 0x9b065a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
    [libx264 @ 0x9b065a0] profile High, level 2.2
    [libx264 @ 0x9b065a0] 264 - core 129 r2230 1cffe9f - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=10 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'myfile2.mp4':
     Metadata:
       encoder         : Lavf55.0.100
       Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuvj420p, 640x480, q=-1--1, 10240 tbn, 10 tbc
       Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 8000 Hz, mono, s16, 128 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 -> libx264)
     Stream #0:1 -> #0:1 (pcm_s16le -> libvo_aacenc)
    Press [q] to stop, [?] for help
    frame=   47 fps=0.0 q=25.0 size=      21kB time=00:00:04.40 bitrate=  39.9kbits/s dup=3 dropframe=   59 fps= 56 q=25.0 size=      56kB time=00:00:05.68 bitrate=  80.2kbits/s dup=3 dropframe=   71 fps= 45 q=25.0 size=      89kB time=00:00:06.84 bitrate= 106.9kbits/s dup=3 dropframe=   83 fps= 40 q=25.0 size=     124kB time=00:00:08.12 bitrate= 124.9kbits/s dup=3 dropframe=   94 fps= 36 q=25.0 size=     157kB time=00:00:09.14 bitrate= 140.4kbits/s dup=4 dropframe=  105 fps= 23 q=25.0 Lsize=     309kB time=00:00:11.06 bitrate= 228.8kbits/s dup=4 drop=0
    video:291kB audio:15kB subtitle:0 global headers:0kB muxing overhead 1.108651%
    [libx264 @ 0x9b065a0] frame I:1     Avg QP:17.65  size: 12772
    [libx264 @ 0x9b065a0] frame P:94    Avg QP:19.46  size:  2868
    [libx264 @ 0x9b065a0] frame B:10    Avg QP:21.58  size:  1464
    [libx264 @ 0x9b065a0] consecutive B-frames: 82.9% 13.3%  0.0%  3.8%
    [libx264 @ 0x9b065a0] mb I  I16..4: 16.6% 66.3% 17.1%
    [libx264 @ 0x9b065a0] mb P  I16..4:  4.2%  6.3%  0.5%  P16..4: 27.0%  9.5%  5.1%  0.0%  0.0%    skip:47.4%
    [libx264 @ 0x9b065a0] mb B  I16..4:  0.8%  1.0%  0.0%  B16..8: 39.1%  4.6%  0.5%  direct: 2.4%  skip:51.7%  L0:39.8% L1:56.4% BI: 3.9%
    [libx264 @ 0x9b065a0] 8x8 transform intra:58.0% inter:74.7%
    [libx264 @ 0x9b065a0] coded y,uvDC,uvAC intra: 47.3% 0.0% 0.0% inter: 16.6% 0.0% 0.0%
    [libx264 @ 0x9b065a0] i16 v,h,dc,p: 29% 19% 10% 42%
    [libx264 @ 0x9b065a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 21% 29%  2%  3%  4%  4%  3%  3%
    [libx264 @ 0x9b065a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 39% 28% 18%  2%  3%  3%  3%  2%  2%
    [libx264 @ 0x9b065a0] i8c dc,h,v,p: 100%  0%  0%  0%
    [libx264 @ 0x9b065a0] Weighted P-Frames: Y:5.3% UV:0.0%
    [libx264 @ 0x9b065a0] ref P L0: 67.9% 12.0% 12.6%  6.8%  0.6%
    [libx264 @ 0x9b065a0] ref B L0: 76.9% 23.1%
    [libx264 @ 0x9b065a0] ref B L1: 99.7%  0.3%
    [libx264 @ 0x9b065a0] kb/s:226.31

    This works great. But the timing is quite different not to mention CPU cycles. The first command is measured in milli-secs while the second can take quite some time ( 5-40secs).

    Is there another way I can convert the avi to a mp4 container quickly ? Ideally by re-muxing as opposed to re-encoding.

    EDIT

    I’m using this right now which I find to be the fastest for re-encoding. But again I’d rather not do this. I just want to re-mux the code.

    ffmpeg -loglevel quiet -i myfile.avi -vcodec libx264 -profile:v baseline -preset ultrafast myfile.mp4