Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (105)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

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

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (12145)

  • Merge video and audio with ffmpeg. Loop the video while audio is not over

    3 novembre 2016, par fstephany

    I’m trying to merge an audio file with a video file.
    I have two options :

    • Have a very small video file (e.g., 10 seconds) that loop while the audio file is not over.

    • Have a very long video file (longer than any of my audio file) on which I can attach the audio file. I would like to cut the video when the audio is finished.

    I’ve using the latter with the -t option of ffmpeg. It means I have to get the duration of the audio file to feed it into ffmpeg. Is it possible to avoid this step ?

    Any pointer for the first solution ?

  • Playing RTSP stream in Android

    9 décembre 2014, par Kamil

    I’m trying to play video stream on Android device. Unfortunatelly I still get the same problem with MediaPlayer/VideoView. I’m searching for a few days, but still haven’t found any working solution.
    For test purposes I’m using MediaPlayer app from API Demos (API Demos/Media/MediaPlayer/Play Streaming Video).
    Here is code snippet for playing stream

    mMediaPlayer = new MediaPlayer();
    mMediaPlayer.setDataSource(path);
    mMediaPlayer.setDisplay(holder);
    mMediaPlayer.prepare();
    mMediaPlayer.setOnBufferingUpdateListener(this);
    mMediaPlayer.setOnCompletionListener(this);
    mMediaPlayer.setOnPreparedListener(this);
    mMediaPlayer.setOnVideoSizeChangedListener(this);

    When I try to play stream I get this info from logcat
    http://pastebin.com/5Uib5CH5

    This is configuration of ffserver streaming the video

    Port 8090
    BindAddress 0.0.0.0

    RTSPPort 7654
    RTSPBindAddress 0.0.0.0

    MaxHTTPConnections 2000
    MaxClients 1000
    MaxBandwidth 10000

    CustomLog -
    NoDaemon
    <Feed feed1.ffm>

    File /tmp/feed1.ffm
    FileMaxSize 5M

    Launch ffmpeg -i mmsh://tempserv.cam/vid1

    ACL allow 127.0.0.1

    </Feed>

    <Stream rat1.mpg>
    Feed feed1.ffm
    Format rtp
    NoAudio
    VideoBitRate 56k
    VideoBufferSize 40
    VideoFrameRate 12
    VideoSize 176x144
    VideoGopSize 12
    VideoCodec libx264
    AVPresetVideo baseline
    </Stream>

    If anyone can advise me how to fix it, or at least indicate an mistake, I will be grateful.

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