Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (22)

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

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

Sur d’autres sites (3141)

  • Use FFMPEG to create video from jpeg, and index using vlc

    16 novembre 2011, par Greg

    OpenSuse 11.4
    FFMEG 0.8.5

    I'm using FFMPEG to create a 5 minute mpeg from about 2100 individual jpegs (7fps). I've been using the following command (OpenSuse 11.4)
    /usr/bin/ffmpeg -y -r 7.01 -i %03d-capture.jpg -s 800x600 -r 25 Event-3692-r1-s1-3.mpg

    Now I Try to open the file (In windows XP with VLC 1.1.11 Player).
    Media->AdvancedFileOpen
    *I select "Show more options" and set StartTime to 5s. I expect that the video should start 5 seconds in, but instead it starts at a seemingling random (although consistent) time of 30 seconds in.

    I also tried changing ffmpeg command to :
    /usr/bin/ffmpeg -sameq -y -r 7.01 -i %03d-capture.jpg -s 800x600 -r 25 Event-3692-r1-s1-3.mpg
    *This result in about a constant 2x offset (5sec => 10sec) (10s => 20s) etc. But filesize is also about 6x larger, which is a strain on my storage.

    I also tried
    /usr/bin/ffmpeg -y -r 7.01 -i %03d-capture.jpg -s 800x600 -r 25 -f mpegts Event-3692-r1-s1-3.mpg
    *This result in vlc not indexing at all into my video. Also not desired. Anybody have any clues what is going on here. It is very important for me to be able to use this VLC feature and have it work correctly.

    Thanks in advance

  • DirectShow RTSP SourceFilter with MPEG-4 Video Stream

    5 octobre 2011, par 6.45.Vapuru

    I create a simple direct show source filter using FFmpeg.I read rtp packets from RTSP source and give them to decoder. It works for h264 stream.

    MyRtspSourceFilter[H264 Stream] ---> h264 Decoder --> Video Renderer

    The bad news is that it does not work for MPEG-4. I can able to connect my rtsp source filter with MPEG-Decoder. I got no exception but video renderer does not show anything. Actually just show one frame then nothing [just stop]... Decoders and Renderers are 3rd party so i can not debug them.

    MyRtspSourceFilter[MP4 Stream] ---> MPEG-4 Decoder --> Video Renderer

    I can able to get rtp packets from MPEG-4 RTSP Source using FFmpeg sucessfully.There is no problem with it.

    It seems that i have not set something(?) in my Rtsps Source
    Filter which is not necessary for H264 stream but may be important for
    MPEG-4 stream

    What may cause this h264 stream and MPEG-4 stream difference in a direct show rtsp source filter ? Any ideas.

    More Info :

    — First i try some other rtsp source filters for MPEG-4 Stream...Although my rtsp source is same i see different subtypes in their pin connections.

    — Secondly i realy get suspicious if the source is really MPEG-4 SO i check with FFmpeg...FFmpeg gives the source codec id as "CODEC_ID_MPEG4".

    Update :
    [ Hack ]

    I just set m_bmpInfo.biCompression = DWORD('xvid') it just worked fine...But it is static. How to dynamically get/determine this value using ffmpeg or other ways...

  • Getting realtime output from ffmpeg to be used in progress bar (PyQt4, stdout)

    8 mars 2017, par Jason O'Neil

    I’ve looked at a number of questions but still can’t quite figure this out. I’m using PyQt, and am hoping to run ffmpeg -i file.mp4 file.avi and get the output as it streams so I can create a progress bar.

    I’ve looked at these questions :
    Can ffmpeg show a progress bar ?
    http://stackoverflow.com/questions/1606795/catching-stdout-in-realtime-from-subprocess

    I’m able to see the output of a rsync command, using this code :

    import subprocess, time, os, sys

    cmd = "rsync -vaz -P source/ dest/"
    p, line = True, 'start'


    p = subprocess.Popen(cmd,
                        shell=True,
                        bufsize=64,
                        stdin=subprocess.PIPE,
                        stderr=subprocess.PIPE,
                        stdout=subprocess.PIPE)

    for line in p.stdout:
       print("OUTPUT>>> " + str(line.rstrip()))
       p.stdout.flush()

    But when I change the command to ffmpeg -i file.mp4 file.avi I receive no output. I’m guessing this has something to do with stdout / output buffering, but I’m stuck as to how to read the line that looks like

    frame=   51 fps= 27 q=31.0 Lsize=     769kB time=2.04 bitrate=3092.8kbits/s

    Which I could use to figure out progress.

    Can someone show me an example of how to get this info from ffmpeg into python, with or without the use of PyQt (if possible)


    EDIT :
    I ended up going with jlp’s solution, my code looked like this :

    #!/usr/bin/python
    import pexpect

    cmd = 'ffmpeg -i file.MTS file.avi'
    thread = pexpect.spawn(cmd)
    print "started %s" % cmd
    cpl = thread.compile_pattern_list([
       pexpect.EOF,
       "frame= *\d+",
       '(.+)'
    ])
    while True:
       i = thread.expect_list(cpl, timeout=None)
       if i == 0: # EOF
           print "the sub process exited"
           break
       elif i == 1:
           frame_number = thread.match.group(0)
           print frame_number
           thread.close
       elif i == 2:
           #unknown_line = thread.match.group(0)
           #print unknown_line
           pass

    Which gives this output :

    started ffmpeg -i file.MTS file.avi
    frame=   13
    frame=   31
    frame=   48
    frame=   64
    frame=   80
    frame=   97
    frame=  115
    frame=  133
    frame=  152
    frame=  170
    frame=  188
    frame=  205
    frame=  220
    frame=  226
    the sub process exited

    Perfect !