Recherche avancée

Médias (91)

Autres articles (83)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (6981)

  • Keep quality after drawtext in ffmpeg

    24 mai 2014, par NickName

    I am trying to use ffmpeg to put a subtitle in an avi video. I use this command to do it :

    -i input.avi -vf drawtext="fontsize=80:fontfile=C\\:/Windows/Fonts/arial.ttf:text=TEST_TEXT:y=h-line_h:x=(h+400)-(t*110)" output.avi

    The output of ffmpeg console is :

    >ffmpeg -i testwithout.avi -vf drawtext="fontsize=
    80:fontfile=C\\:/Windows/Fonts/arial.ttf:text=HELLO:y=h-line_h:x=(h+400)-(t*110)
    " -an withsubtitle.avi
    ffmpeg version N-62121-g634636e Copyright (c) 2000-2014 the FFmpeg developers
     built on Apr  3 2014 23:30:16 with gcc 4.8.2 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
    e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
    ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
    ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
    eex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aa
    cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavp
    ack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable
    -zlib
     libavutil      52. 73.100 / 52. 73.100
     libavcodec     55. 56.107 / 55. 56.107
     libavformat    55. 36.101 / 55. 36.101
     libavdevice    55. 11.100 / 55. 11.100
     libavfilter     4.  3.100 /  4.  3.100
     libswscale      2.  6.100 /  2.  6.100
     libswresample   0. 18.100 /  0. 18.100
     libpostproc    52.  3.100 / 52.  3.100
    [avi @ 041307e0] non-interleaved AVI
    Guessed Channel Layout for  Input Stream #0.1 : stereo
    Input #0, avi, from 'C:\\Users\\╬Χ╧Β╬│╬▒╧Δ╬ψ╬╡╧Γ\\Desktop\\testwithout.avi':
     Duration: 00:00:07.67, start: 0.000000, bitrate: 147822 kb/s
       Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 146812 k
    b/s, 30 tbr, 30 tbn, 30 tbc
       Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16
    , 1411 kb/s
    File 'withsubtitle.avi' already exists. Overwrite ? [y/N] y
    Output #0, avi, to 'withsubtitle.avi':
     Metadata:
       ISFT            : Lavf55.36.101
       Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 640x480, q=2-31, 200
    kb/s, 30 tbn, 30 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
    Press [q] to stop, [?] for help
    frame=  112 fps=0.0 q=20.0 size=     331kB time=00:00:03.93 bitrate= 689.8kbits/
    frame=  222 fps=220 q=31.0 size=     479kB time=00:00:07.60 bitrate= 516.8kbits/
    frame=  228 fps=210 q=28.7 Lsize=     485kB time=00:00:07.80 bitrate= 509.4kbits
    /s
    video:474kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing o
    verhead: 2.350742%

    But my input video is 135 MB and the output is only 613 KB. How i could keep the same quality of video ?

  • Popen.write - operation on closed file | images to video using FFmpeg

    10 juin 2014, par f.rodrigues

    I’m trying to create a video file from images from my webcam(using SimpleCV), the images are converted to PIL format and then tostring() [rawformat]

    I’m using python subprocess and Popen to create the video using the FFmpeg.

    I can pipe the one image to the FFmpeg and make a video out of it
    But when I try to do a bunch of them I get a error :

    ValueError: I/O operation on closed file

    here’s my code.

    import subprocess as sp
    from SimpleCV import *
    from Image import Image

    FFMPEG_BIN = "ffmpeg.exe"

    img = Camera().getImage().toRGB()


    command = [FFMPEG_BIN, '-y',  # (optional) overwrite output file if it exists
              '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%sx%s'%(img.width,img.height),  # size of one frame
              '-pix_fmt', 'rgb24', '-r', '24',  # frames per second
              '-i', '-',  # The imput comes from a pipe
              '-an',  # Tells FFMPEG not to expect any audio
              '-vcodec', 'libx264rgb',
              'my_output_videofile.mp4']


    pipe = sp.Popen(command, stdin=sp.PIPE)#, stderr=sp.PIPE)


    for n in xrange(10):
       img = Camera().getImage().toRGB().getPIL().tostring()
       pipe.stdin.write(img)


    pipe.terminate()

    It’s wierd because the pipe.terminate() is in the end of the code, and it should close the file right away.

    EDIT :
    Removed the stderr

     ffmpeg version N-63208-gbe1fbc0 Copyright (c) 2000-2014 the FFmpeg developers
     built on May 17 2014 01:30:26 with gcc 4.8.2 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib
     --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
     --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug
     --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
     --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
     --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
     --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
     --enable-decklink --enable-zlib
     libavutil      52. 83.100 / 52. 83.100
     libavcodec     55. 62.100 / 55. 62.100
     libavformat    55. 38.100 / 55. 38.100
     libavdevice    55. 13.101 / 55. 13.101
     libavfilter     4.  5.100 /  4.  5.100
     libswscale      2.  6.100 /  2.  6.100
     libswresample   0. 19.100 /  0. 19.100
     libpostproc    52.  3.100 / 52.  3.100
    Input #0, rawvideo, from 'pipe:':
     Duration: N/A, start: 0.000000, bitrate: 44236 kb/s
       Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240, 44236 kb/s, 24 tbr, 24 tbn, 24 tbc
    No pixel format specified, rgb24 for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
    [libx264rgb @ 0000000000359de0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
    [libx264rgb @ 0000000000359de0] profile High 4:4:4 Predictive, level 1.3, 4:4:4 8-bit
    [libx264rgb @ 0000000000359de0] 264 - core 142 r2431 ac76440 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 -
    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=6 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=24 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 'my_output_videofile.mp4':
     Metadata:
       encoder         : Lavf55.38.100
       Stream #0:0: Video: h264 (libx264rgb) ([33][0][0][0] / 0x0021), rgb24, 320x240, q=-1--1, 12288 tbn, 24 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo -> libx264rgb)
    frame=    7 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A
  • .swf file gets cut short after conversion to mp3 with ffmpeg

    23 mai 2014, par galdikas

    So I have a .swf file which i need to convert to .mp3 (or any other audio file), it looks like this :

    vytautas@vytautas-SATELLITE-C660:~/Desktop$ ffmpeg -i rem.swf
    ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
     built on May 18 2014 02:20:25 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
     configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-x11grab --enable-libpulse --enable-libx264 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr
     libavutil      52. 84.100 / 52. 84.100
     libavcodec     55. 62.100 / 55. 62.100
     libavformat    55. 38.100 / 55. 38.100
     libavdevice    55. 13.101 / 55. 13.101
     libavfilter     4.  5.100 /  4.  5.100
     libavresample   1.  2.  0 /  1.  2.  0
     libswscale      2.  6.100 /  2.  6.100
     libswresample   0. 19.100 /  0. 19.100
     libpostproc    52.  3.100 / 52.  3.100
    [swf @ 0x2762ae0] SWF compressed file detected
    [swf @ 0x2762ae0] Could not find codec parameters for stream 0 (Audio: pcm_u8, 5512 Hz, mono, 44 kb/s): unspecified sample format
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    Input #0, swf, from 'rem.swf':
     Duration: 00:00:00.55, bitrate: 98 kb/s
       Stream #0:0: Audio: pcm_u8, 5512 Hz, mono, 44 kb/s
       Stream #0:1: Audio: mp3, 22050 Hz, mono, s16p, 128 kb/s
    At least one output file must be specified

    So it’s length is : 00:00:00.55, but then I convert it to .mp3 using this command :

    ffmpeg -i rem.swf -map 0:1 -acodec copy rem.mp3

    and this is the output I get :

    **output ommited, as it is same as above**
    Input #0, swf, from 'rem.swf':
     Duration: 00:00:00.55, bitrate: 98 kb/s
       Stream #0:0: Audio: pcm_u8, 5512 Hz, mono, 44 kb/s
       Stream #0:1: Audio: mp3, 22050 Hz, mono, s16p, 128 kb/s
    File 'rem.mp3' already exists. Overwrite ? [y/N] y
    Output #0, mp3, to 'rem.mp3':
     Metadata:
       TSSE            : Lavf55.38.100
       Stream #0:0: Audio: mp3, 22050 Hz, mono, 128 kb/s
    Stream mapping:
     Stream #0:1 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    size=       5kB time=00:00:00.33 bitrate= 130.7kbits/s    
    video:0kB audio:5kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.080189%

    So now the length is only 00:00:00.33, any ideas ?

    Here is the link to the file, even if yous could try converting it on your own machine that would help as well :

    https://docs.google.com/file/d/0ByJlZbStPk2cS0FwN09TX2VkWjg/edit

    Thanks in advance !