Recherche avancée

Médias (1)

Mot : - Tags -/livre électronique

Autres articles (82)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (8065)

  • Revision 8fb9f083f2 : Merge changes I0b51674f,I1ea6ebf9,I89076d93 into experimental * changes : lint

    14 août 2012, par John Koleszar

    Merge changes I0b51674f,I1ea6ebf9,I89076d93 into experimental * changes : lint_hunks : show style violations in the index intersect_diffs : split out diff classes ftfy : update to match current astyle rule

  • opencv + opengl + ffmpeg ?

    4 août 2012, par JeiKei

    I'm trying to write a application that uses ffmpeg to play a video, opencv to analysis camera input data and opengl to show UI.

    The reason I want to use openGL is because opencv does not support transparent images for UI, also opencv does not support playing sound of a video.

    is there any tutorial for this ?

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