Recherche avancée

Médias (0)

Mot : - Tags -/configuration

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

Autres articles (98)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

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

Sur d’autres sites (7775)

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

    8 septembre 2023, 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 ?
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 !

    


  • input/output error with ffmpeg using an input URL in docker

    12 décembre 2023, par Grimou

    I need to use ffmpeg to listen to an rtmp url within a running docker container using ffmpeg.
my ffmpeg command is quite simple : ffmpeg -listen 1 -i rtmp://localhost:1935/live/app ./output.wav

    


    ffmpeg seems to start correctly and listen to the url.

    


    But, when I start the stream (using OBS Studio) I have an input/output error. Here is the logs (with debug log level)

    


    ❯ ffmpeg -loglevel debug -listen 1 -i rtmp://127.0.0.1:1935/live/app ./output.wav
ffmpeg version 5.1.4-0+deb12u1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)
  configuration: --prefix=/usr --extra-version=0+deb12u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-listen' ... matched as AVOption 'listen' with argument '1'.
Reading option '-i' ... matched as input url with argument 'rtmp://127.0.0.1:1935/live/app'.
Reading option './output.wav' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url rtmp://127.0.0.1:1935/live/app.
Successfully parsed a group of options.
Opening an input file: rtmp://127.0.0.1:1935/live/app.
[NULL @ 0x56288f8e7a00] Opening 'rtmp://127.0.0.1:1935/live/app' for reading
[rtmp @ 0x56288f8e8200] No default whitelist set
[tcp @ 0x56288f8e8d40] No default whitelist set
[rtmp @ 0x56288f8e8200] Proto = rtmp, path = /live/app, app = live, fname = app
[rtmp @ 0x56288f8e8200] New incoming chunk size = 4096
rtmp://127.0.0.1:1935/live/app: Input/output error


    


    The last 3 lines only appear when I start the stream.

    


    It doesn't seems to be a permission problem with the file system, since using ffmpeg -i ./test.mp4 ./output.wav works inside the container.

    


    I also did not find any problem with the network. I am currently using network_mode: "host" in my docker_compose.yml and the logs show that it did receive data before the error appear.

    


    It also doesn't seem to be a problem with the ffmpeg command, since the exact same command works when using it without docker involved.

    


    What else could be the problem ?

    


    here is my docker_compose.yml

    


    version: '3'

services:
  ffmpeg-container:
    build:
      context: .
    network_mode: "host"
    tty: true  # Allocate a pseudo-TTY for interactive use



    


    Dockerfile

    


    FROM python:3

# Install ffmpeg
RUN apt-get update && apt-get install -y ffmpeg

# Create a working directory
WORKDIR app

# Copy the Python script to the container
COPY app.py .
COPY test.mp4 .

# Run the Python script
CMD ["python", "app.py"]



    


  • Merge commit 'bca41545b371efc34e38d1fa8bb12dba8b614da0'

    12 février 2018, par James Almer
    Merge commit 'bca41545b371efc34e38d1fa8bb12dba8b614da0'
    

    * commit 'bca41545b371efc34e38d1fa8bb12dba8b614da0' :
    configure : Group code that sets the license string with licensing checks

    Merged-by : James Almer <jamrial@gmail.com>

    • [DH] configure