Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (47)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

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

Sur d’autres sites (7087)

  • python ffmpeg moov atom not found Invalid data when processing input

    11 mai 2018, par Isocrates

    I have a progress that records the screen, and audio from a microphone, and then combines the video and audio recording (.mp4 and .wav) into one mkv file.

    I am using python 3.6 and ffmpeg to achieve this aim. For short videos (<20 sec.) it works, but for longer recordings it presents the following error message :

    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55abb3a52540] moov atom not found
    tmp/tmp_0.mp4: Invalid data found when processing input

    Full output :

    ffmpeg version 3.3.7 Copyright (c) 2000-2018 the FFmpeg developers
    built with gcc 7 (GCC)
    configuration: --prefix=/usr --bindir=/usr/bin --
    datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --
    incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --
    arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,
    -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-
    buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-
    hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables' --extra-
    ldflags='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --
    extra-cflags='-I/usr/include/nvenc ' --enable-libopencore-amrnb --
    enable-
    libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib
    --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --
    enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-
    libcdio --enable-indev=jack --enable-libfreetype --enable-libfribidi --
    enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-
    opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-
    libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --
    enable-libtheora --enable-libvorbis --enable-libv4l2 --enable- libvidstab -
    -enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --
    enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --
    disable-static --enable-shared --enable-gpl --disable-debug --disable-
    stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libavresample   3.  5.  0 /  3.  5.  0
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    [wav @ 0x55abb3a0b880] Ignoring maximum wav data size, file may be invalid
    [wav @ 0x55abb3a0b880] Estimating duration from bitrate, this may be
    inaccurate
    Guessed Channel Layout for Input Stream #0.0 : stereo
    Input #0, wav, from 'tmp/tmp_0.wav':
     Metadata:
       encoder         : Lavf57.71.100
     Duration: 00:00:21.97, bitrate: 768 kb/s
    Stream #0:0: Audio: pcm_mulaw ([7][0][0][0] / 0x0007), 48000 Hz,
    stereo, s16, 768 kb/s
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55abb3a52540] moov atom not found
    tmp/tmp_0.mp4: Invalid data found when processing input

    The python file (ffmpeg.py) is as follows. The class, AV_COMPILE, is not yet complete, held up by the aforementioned error, and therefore still uses the initial test files as defaults. But otherwise it ought to work :

    import os, time, glob

    TMP_DIR = "tmp"
    DISPLAY = os.environ['DISPLAY']
    EXT = {
       'Video':'mp4',
       'Audio':'wav',
       'AV':'mkv',
    }

    class ffmpegVideo:

       FFMPEG_BIN = "ffmpeg"
       AUDIO = False

       def __init__(self, fps = 30, audio = True):
       global TMP_DIR, DISPLAY, EXT

       self.fps = fps

       if audio:
           self.AUDIO = True

       self.video_filename = self.unique_filename()

       self.command = [ self.FFMPEG_BIN,
           '-video_size', '1920x1080',
           '-framerate', str(fps),
           '-f', 'x11grab',
           '-i', DISPLAY,
           '-vcodec', 'libx264',
           '-qp', '0',
           '-preset', 'ultrafast',
           '-y', TMP_DIR + '/' + self.video_filename
       ]

    def start(self):
       import threading as th

       thread = th.Thread(target=self.record)
       thread.start()

    def record(self):
       import subprocess as sp

       self.pipe = sp.Popen(self.command, stderr=sp.PIPE)

       if self.AUDIO:
           ffmpegAudio().start()

    def stop(self):
       self.pipe.terminate()

    def unique_filename(self):
       global TMP_DIR, EXT

       i = 0

       while os.path.exists((TMP_DIR + '/' + 'tmp_%s.%s') % (i, EXT['Video'])):
           i += 1

       return ('tmp_%s.%s') % (i, EXT['Video'])

    class ffmpegAudio:

       FFMPEG_BIN = "ffmpeg"

       def __init__(self):

           self.audio_filename = self.unique_filename()

           self.command = [ self.FFMPEG_BIN,
               '-f', 'pulse',
               '-ac', '2',
               '-ar', '48000',
               '-i', 'default',
              '-acodec', 'pcm_mulaw',
              '-y', TMP_DIR + '/' + self.audio_filename
           ]

       def start(self):
           import threading as th

           au_thread = th.Thread(target=self.record)
           au_thread.start()

       def record(self):
            import subprocess as sp

           self.pipe = sp.Popen(self.command, stderr=sp.PIPE)

       def stop(self):
           self.pipe.terminate()

       def unique_filename(self):
           global TMP_DIR, EXT

           i = 0

           while os.path.exists((TMP_DIR + '/' + 'tmp_%s.%s') % (i, EXT['Audio'])):
           i += 1

           return ('tmp_%s.%s') % (i, EXT['Audio'])

    class AV_COMPILE:

       def __init__(self, au_in = TMP_DIR + '/' + 'out1.wav', vd_in =
    TMP_DIR + '/' + 'test4.mp4', out = TMP_DIR + '/' + 'av.mkv'):
           import subprocess as sp

           au_in = min(glob.iglob(TMP_DIR + '/*.wav'), key=os.path.getctime)
           vd_in = min(glob.iglob(TMP_DIR + '/*.mp4'), key=os.path.getctime)

           self.command = ('ffmpeg -i %s  -r 30 -i %s -shortest -c:a aac -c:v copy %s') % (au_in, vd_in, out)
           sp.call(self.command, shell=True)

    I would be grateful for any assistance you could provide in understanding why this happens and how to solve the error. Also, I am happy to receive any other tips on how to improve this code, or any other problems anyone might notice.

    EDIT :
    I now believe that the reason for this error in longer videos, and occasionally shorter, is that the program is proceeding to attempt to compile the av output whether or not it has finished compiling the original video file. I tested a time.sleep(10) function to delay AV_COMPILE, and this seems to work.

    However, as video files get larger, obviously the delay needs to be adjusted. So I should like to know how I can separately check the integrity of the video file and determine that it is safe to proceed to the next step.

  • FFmpeg videos not working on QuickPlayer (and therefore on OpenCV)

    7 mai 2018, par Gabrielle

    I know that there are several posts about FFMpeg not working on QuickPlayer (and OpenCV) and other players supporting only YUV planar color space, but NONE of the solutions I’ve found worked for me.

    I need it to run on OpenCV, but as far as I found, it will never run on OpenCV if it is not running on QuickPlayer, so, I think I might start fixing the QuickPlayer issue. The generated video is a screen record, and it works perfectly on VLC.

    Configurations used :

    MacOs High Sierra
    ffmpeg version 4.0 (installed with: --with-opus --with-libvpx )
    opencv version 3.4.1_4
    Homebrew 1.6.2 (used to install ffmpeg and opencv)

    Command used to record the video :

    ffmpeg -f avfoundation -video_size 1980x1140 -framerate 30 -i '1'
    -vcodec libx264 -preset ultrafast -an -qp 0 -pix_fmt yuv444p video.mkv -y

    Note1 : I already tried to change -pix_fmt to yuv420p

    Note2 : I already tried to add -vf scale=640:-2,format=yuv420p

    Note3 : I already tried to re-install OpenCV --with-ffmpeg

    Note4 : I tried mkv, mp4, avi. I really don’t care about the extension, I just need it to work.

    Note5 : I need it to be a cross-plataform solution, as far as I read ffmpeg should work in all OS, but first I am trying to fix on mac and then I will check others...

    Any ideas ? Maybe a missing flag ? A missing library ?

    @Gyan suggested me to change the qp flag to a number higher than 0, I did it

    ffmpeg -f avfoundation -video_size 1980x1140 -framerate 30 -i '1' -vcodec libx264 -preset ultrafast -an -qp 2 -pix_fmt yuv444p video_test.mp4 -y

    This is my output :

    ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
     built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-ffplay --enable-frei0r --enable-libass --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-librtmp --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.3.0/include/openjpeg-2.3 --enable-nonfree
     libavutil      56. 14.100 / 56. 14.100
     libavcodec     58. 18.100 / 58. 18.100
     libavformat    58. 12.100 / 58. 12.100
     libavdevice    58.  3.100 / 58.  3.100
     libavfilter     7. 16.100 /  7. 16.100
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  1.100 /  5.  1.100
     libswresample   3.  1.100 /  3.  1.100
     libpostproc    55.  1.100 / 55.  1.100
    [avfoundation @ 0x7fbb8f80ee00] Selected pixel format (yuv420p) is not supported by the input device.
    [avfoundation @ 0x7fbb8f80ee00] Supported pixel formats:
    [avfoundation @ 0x7fbb8f80ee00]   uyvy422
    [avfoundation @ 0x7fbb8f80ee00]   yuyv422
    [avfoundation @ 0x7fbb8f80ee00]   nv12
    [avfoundation @ 0x7fbb8f80ee00]   0rgb
    [avfoundation @ 0x7fbb8f80ee00]   bgr0
    [avfoundation @ 0x7fbb8f80ee00] Overriding selected pixel format to use uyvy422 instead.
    [avfoundation @ 0x7fbb8f80ee00] Stream #0: not enough frames to estimate rate; consider increasing probesize
    Input #0, avfoundation, from '1':
     Duration: N/A, start: 118955.291667, bitrate: N/A
       Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1440x900, 1000k tbr, 1000k tbn, 1000k tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    [mp4 @ 0x7fbb8f87d200] Frame rate very high for a muxer not efficiently supporting it.
    Please consider specifying a lower framerate, a different muxer or -vsync 2
    [libx264 @ 0x7fbb8f87f600] MB rate (5130000000) > level limit (16711680)
    [libx264 @ 0x7fbb8f87f600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x7fbb8f87f600] profile High 4:4:4 Predictive, level 6.2, 4:4:4 8-bit
    [libx264 @ 0x7fbb8f87f600] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=6 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=2 ip_ratio=1.40 aq=0
    Output #0, mp4, to 'video_test.mp4':
     Metadata:
       encoder         : Lavf58.12.100
       Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p, 1440x900, q=-1--1, 1000k fps, 1000k tbn, 1000k tbc
       Metadata:
         encoder         : Lavc58.18.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
  • FFMPEG failing to convert mov to flv

    3 mai 2018, par scripter78

    FFMPEG issue that I am not familiar with. seems to only happen with this particular file. Anyone by any chance can take a look at this long out put and provide any feedback on what might actually be causing this ?

    ffmpeg_18.exe -i "E:\TESTFILES\115637.mov" -vcodec libx264 -b:v 700k -s 720x480 -r 29.97 -pix_fmt yuv420p -vf yadif -aspect 4:3 -acodec libvo_aacenc -b:a 96k -ar 44100 -f mp4 -y "E:\TESTFILES\test\115637.flv"
    ffmpeg version N-39877-g4fa706a Copyright (c) 2000-2012 the FFmpeg developers
     built on Apr 16 2012 14:53:47 with gcc 4.6.3
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-li
    bnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
     libavutil      51. 46.100 / 51. 46.100
     libavcodec     54. 14.101 / 54. 14.101
     libavformat    54.  3.100 / 54.  3.100
     libavdevice    53.  4.100 / 53.  4.100
     libavfilter     2. 70.100 /  2. 70.100
     libswscale      2.  1.100 /  2.  1.100
     libswresample   0. 11.100 /  0. 11.100
     libpostproc    52.  0.100 / 52.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\TESTFILES\115637.mov':
     Metadata:
       major_brand     : qt
       minor_version   : 537199360
       compatible_brands: qt
       creation_time   : 2018-05-03 20:48:28
     Duration: 00:00:30.03, start: 0.000000, bitrate: 154663 kb/s
       Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080, 151585 kb/s, SAR 1920:1920 DAR 16:9, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc
       Metadata:
         creation_time   : 2018-05-03 20:48:28
         handler_name    : Apple Alias Data Handler
       Stream #0:1(eng): Audio: pcm_s16le (lpcm / 0x6D63706C), 48000 Hz, 4 channels, s16, 3072 kb/s
       Metadata:
         creation_time   : 2018-05-03 20:48:28
         handler_name    : Apple Alias Data Handler
       Stream #0:2(eng): Data: none (tmcd / 0x64636D74)
       Metadata:
         creation_time   : 2018-05-03 20:51:29
         handler_name    : Apple Alias Data Handler
         timecode        : 00:00:00;00
    [buffer @ 035c33a0] w:1920 h:1080 pixfmt:yuv420p tb:1/1000000 sar:1920/1920 sws_param:flags=2
    [yadif @ 01e7caa0] mode:0 parity:-1 auto_enable:0
    [scale @ 01e7c6a0] w:1920 h:1080 fmt:yuv420p sar:1920/1920 -> w:720 h:480 fmt:yuv420p sar:32/27 flags:0x4
    [libx264 @ 035b8c40] using SAR=8/9
    [libx264 @ 035b8c40] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX FMA3
    [libx264 @ 035b8c40] profile High, level 3.0
    [libx264 @ 035b8c40] 264 - core 120 r2164 da19765 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,
    11 fast_pskip=1 chroma_qp_offset=-2 threads=24 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitra
    te=700 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    [libvo_aacenc @ 01e7bae0] Unable to set encoding parameters
    Output #0, mp4, to 'E:\TESTFILES\test\115637.flv':
     Metadata:
       major_brand     : qt
       minor_version   : 537199360
       compatible_brands: qt
       creation_time   : 2018-05-03 20:48:28
       Stream #0:0(eng): Video: h264, yuv420p, 720x480 [SAR 8:9 DAR 4:3], q=-1--1, 700 kb/s, 90k tbn, 29.97 tbc
       Metadata:
         creation_time   : 2018-05-03 20:48:28
         handler_name    : Apple Alias Data Handler
       Stream #0:1(eng): Audio: aac, 44100 Hz, 4 channels, s16, 96 kb/s
       Metadata:
         creation_time   : 2018-05-03 20:48:28
         handler_name    : Apple Alias Data Handler
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 -> libx264)
     Stream #0:1 -> #0:1 (pcm_s16le -> libvo_aacenc)
    Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height