Recherche avancée

Médias (0)

Mot : - Tags -/images

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

Autres articles (12)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (6846)

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

  • Ffmpeg - Remove rotate metadata

    16 mai 2014, par Ron I

    When I extract the images from a video, the resulting images are getting rotated. The orientation of the video is correct, and the images are upside down. The metadata for the original video is 180, and also for the output file, so it looks like it is copying that data and additionally rotating 180 degrees. However, since the original video is already rotated, it is flipping the video upside down.

    I would like to remove the metadata for the output file containing the ’rotate’ command. I tried adding -vf rotate=0, but it didn’t work.

    Here is the command I am running :

    ffmpeg -i left.MOV -r 1 -f image2 left-03%d.png

    I assume this is what is throwing it off (it looks like it is copying the rotate metadata from the input file and applying it to the output file) :

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'left.MOV':
    rotate          : 180

    Output #0, image2, to 'left-03%d.png':

    Metadata:
         rotate          : 180

    Here’s the full output :

       ffmpeg version 2.2.1 Copyright (c) 2000-2014 the FFmpeg developers
     built on Apr 11 2014 22:50:35 with Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/2.2.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid
     libavutil      52. 66.100 / 52. 66.100
     libavcodec     55. 52.102 / 55. 52.102
     libavformat    55. 33.100 / 55. 33.100
     libavdevice    55. 10.100 / 55. 10.100
     libavfilter     4.  2.100 /  4.  2.100
     libavresample   1.  2.  0 /  1.  2.  0
     libswscale      2.  5.102 /  2.  5.102
     libswresample   0. 18.100 /  0. 18.100
     libpostproc    52.  3.100 / 52.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'left.MOV':
     Metadata:
       major_brand     : qt  
       minor_version   : 0
       compatible_brands: qt  
       creation_time   : 2014-05-14 16:24:27
       make            : Apple
       make-eng        : Apple
       encoder         : 7.1.1
       encoder-eng     : 7.1.1
       date            : 2014-05-14T09:23:48-0700
       date-eng        : 2014-05-14T09:23:48-0700
       model           : iPhone 5
       model-eng       : iPhone 5
     Duration: 00:00:10.98, start: 0.000000, bitrate: 795 kb/s
       Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 62 kb/s (default)
       Metadata:
         creation_time   : 2014-05-14 16:24:27
         handler_name    : Core Media Data Handler
       Stream #0:1(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 568x320, 728 kb/s, 29.97 fps, 29.97 tbr, 600 tbn, 1200 tbc (default)
       Metadata:
         rotate          : 180
         creation_time   : 2014-05-14 16:24:27
         handler_name    : Core Media Data Handler
    Output #0, image2, to 'left-03%d.png':
     Metadata:
       major_brand     : qt  
       minor_version   : 0
       compatible_brands: qt  
       model-eng       : iPhone 5
       make            : Apple
       make-eng        : Apple
       model           : iPhone 5
       encoder-eng     : 7.1.1
       date            : 2014-05-14T09:23:48-0700
       date-eng        : 2014-05-14T09:23:48-0700
       encoder         : Lavf55.33.100
       Stream #0:0(und): Video: png, rgb24, 568x320, q=2-31, 200 kb/s, 90k tbn, 1 tbc (default)
       Metadata:
         rotate          : 180
         creation_time   : 2014-05-14 16:24:27
         handler_name    : Core Media Data Handler
    Stream mapping:
     Stream #0:1 -> #0:0 (h264 -> png)
    Press [q] to stop, [?] for help
    frame=   14 fps=0.0 q=0.0 Lsize=N/A time=00:00:14.00 bitrate=N/A dup=0 drop=315    
    video:1521kB audio:0kB subtitle:0 data:0 global headers:0kB muxing overhead -100.001411%