Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (24)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

Sur d’autres sites (5930)

  • 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
  • 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.&#xA;my ffmpeg command is quite simple : ffmpeg -listen 1 -i rtmp://localhost:1935/live/app ./output.wav

    &#xA;

    ffmpeg seems to start correctly and listen to the url.

    &#xA;

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

    &#xA;

    ❯ ffmpeg -loglevel debug -listen 1 -i rtmp://127.0.0.1:1935/live/app ./output.wav&#xA;ffmpeg version 5.1.4-0&#x2B;deb12u1 Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with gcc 12 (Debian 12.2.0-14)&#xA;  configuration: --prefix=/usr --extra-version=0&#x2B;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&#xA;  libavutil      57. 28.100 / 57. 28.100&#xA;  libavcodec     59. 37.100 / 59. 37.100&#xA;  libavformat    59. 27.100 / 59. 27.100&#xA;  libavdevice    59.  7.100 / 59.  7.100&#xA;  libavfilter     8. 44.100 /  8. 44.100&#xA;  libswscale      6.  7.100 /  6.  7.100&#xA;  libswresample   4.  7.100 /  4.  7.100&#xA;  libpostproc    56.  6.100 / 56.  6.100&#xA;Splitting the commandline.&#xA;Reading option &#x27;-loglevel&#x27; ... matched as option &#x27;loglevel&#x27; (set logging level) with argument &#x27;debug&#x27;.&#xA;Reading option &#x27;-listen&#x27; ... matched as AVOption &#x27;listen&#x27; with argument &#x27;1&#x27;.&#xA;Reading option &#x27;-i&#x27; ... matched as input url with argument &#x27;rtmp://127.0.0.1:1935/live/app&#x27;.&#xA;Reading option &#x27;./output.wav&#x27; ... matched as output url.&#xA;Finished splitting the commandline.&#xA;Parsing a group of options: global .&#xA;Applying option loglevel (set logging level) with argument debug.&#xA;Successfully parsed a group of options.&#xA;Parsing a group of options: input url rtmp://127.0.0.1:1935/live/app.&#xA;Successfully parsed a group of options.&#xA;Opening an input file: rtmp://127.0.0.1:1935/live/app.&#xA;[NULL @ 0x56288f8e7a00] Opening &#x27;rtmp://127.0.0.1:1935/live/app&#x27; for reading&#xA;[rtmp @ 0x56288f8e8200] No default whitelist set&#xA;[tcp @ 0x56288f8e8d40] No default whitelist set&#xA;[rtmp @ 0x56288f8e8200] Proto = rtmp, path = /live/app, app = live, fname = app&#xA;[rtmp @ 0x56288f8e8200] New incoming chunk size = 4096&#xA;rtmp://127.0.0.1:1935/live/app: Input/output error&#xA;

    &#xA;

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

    &#xA;

    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.

    &#xA;

    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.

    &#xA;

    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.

    &#xA;

    What else could be the problem ?

    &#xA;

    here is my docker_compose.yml

    &#xA;

    version: &#x27;3&#x27;&#xA;&#xA;services:&#xA;  ffmpeg-container:&#xA;    build:&#xA;      context: .&#xA;    network_mode: "host"&#xA;    tty: true  # Allocate a pseudo-TTY for interactive use&#xA;&#xA;

    &#xA;

    Dockerfile

    &#xA;

    FROM python:3&#xA;&#xA;# Install ffmpeg&#xA;RUN apt-get update &amp;&amp; apt-get install -y ffmpeg&#xA;&#xA;# Create a working directory&#xA;WORKDIR app&#xA;&#xA;# Copy the Python script to the container&#xA;COPY app.py .&#xA;COPY test.mp4 .&#xA;&#xA;# Run the Python script&#xA;CMD ["python", "app.py"]&#xA;&#xA;

    &#xA;

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

    &#xA;&#xA;

    I've looked at these questions :&#xA;Can ffmpeg show a progress bar ?&#xA;catching stdout in realtime from subprocess

    &#xA;&#xA;

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

    &#xA;&#xA;

    import subprocess, time, os, sys&#xA;&#xA;cmd = "rsync -vaz -P source/ dest/"&#xA;p, line = True, &#x27;start&#x27;&#xA;&#xA;&#xA;p = subprocess.Popen(cmd,&#xA;                     shell=True,&#xA;                     bufsize=64,&#xA;                     stdin=subprocess.PIPE,&#xA;                     stderr=subprocess.PIPE,&#xA;                     stdout=subprocess.PIPE)&#xA;&#xA;for line in p.stdout:&#xA;    print("OUTPUT>>> " &#x2B; str(line.rstrip()))&#xA;    p.stdout.flush()&#xA;

    &#xA;&#xA;

    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

    &#xA;&#xA;

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

    &#xA;&#xA;

    Which I could use to figure out progress.

    &#xA;&#xA;

    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)

    &#xA;&#xA;


    &#xA;&#xA;

    EDIT :&#xA;I ended up going with jlp's solution, my code looked like this :

    &#xA;&#xA;

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

    &#xA;&#xA;

    Which gives this output :

    &#xA;&#xA;

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

    &#xA;&#xA;

    Perfect !

    &#xA;