Recherche avancée

Médias (91)

Autres articles (67)

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

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

Sur d’autres sites (5598)

  • Heroku : FFMpeg installed but php worker can't find it

    4 décembre 2019, par Greco Jonathan

    Context

    I’ve a RabbitMQ’s queue that contains AMQPMessage, those messages are referencing a video that needs to be treated (cut essentially and encoded in x264 also)

    Here’s the code that cause the issue (pretty straightforward)

           $ffprobe = FFProbe::create([
               'ffmpeg.binaries'  => '/usr/bin/ffmpeg',
               'ffprobe.binaries' => '/usr/bin/ffprobe',
           ]);

    Error Message

    TL ;DR :
    Error: "Unable to load FFProbe"

    [2019-12-03 14:55:07] messenger.ERROR : Error thrown while handling message App\Api\Message\AMQPvideoFFMPEG. Sending for retry #1 using 1000 ms delay. Error : "Unable to load FFProbe" "message" :"[object] (App\Api\Message\AMQPvideoFFMPEG : {})","class" :"App\Api\Message\AMQPvideoFFMPEG","retryCount":1,"delay":1000,"error" :"Unable to load FFProbe","exception" :"[object] (Symfony\Component\Messenger\Exception\HandlerFailedException(code : 0) : Unable to load FFProbe at /app/vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php:80, FFMpeg\Exception\ExecutableNotFoundException(code : 0) : Unable to load FFProbe at /app/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFProbeDriver.php:50, Alchemy\BinaryDriver\Exception\ExecutableNotFoundException(code : 0) : Executable not found, proposed : /usr/bin/ffprobe at /app/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php:160)" []

    Configuration & tests

    On Heroku I’ve 2 dynos :

    - web $(composer config bin-dir)/heroku-php-nginx -C config/packages/dev/heroku_nginx.conf public/
    - worker php bin/console messenger:consume ffmpeg

    On this platform, I’ve also 3 buildpacks, look below, with this specific buildpack :

    with a custom buildpack for ffmpeg

    To make sure that all is available here’s the results of my checks :

    heroku run "ffmpeg -version" -a project-dev
    Running ffmpeg -version on ⬢ project-dev... up, run.6134 (Hobby)
    ffmpeg version N-67574-g9d6ad68 Copyright (c) 2000-2014 the FFmpeg developers
    built on Nov 12 2014 11:35:09 with gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)
    configuration: --enable-static --disable-shared --disable-asm --extra-libs=-L/app/vendor/libs/lib --extra-cflags=-I/app/vendor/libs/include --prefix=/app/vendor/ffmpeg --enable-libfdk-aac --enable-nonfree --enable-libx264 --enable-gpl
    libavutil      54. 11.100 / 54. 11.100
    libavcodec     56. 12.100 / 56. 12.100
    libavformat    56. 12.103 / 56. 12.103
    libavdevice    56.  2.100 / 56.  2.100
    libavfilter     5.  2.103 /  5.  2.103
    libswscale      3.  1.101 /  3.  1.101
    libswresample   1.  1.100 /  1.  1.100
    libpostproc    53.  3.100 / 53.  3.100
    heroku run "ffprobe -version" -a projet-dev
    Running ffprobe -version on ⬢ projet-dev... up, run.2357 (Hobby)
    ffprobe version N-67574-g9d6ad68 Copyright (c) 2007-2014 the FFmpeg developers
    built on Nov 12 2014 11:35:09 with gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)
    configuration: --enable-static --disable-shared --disable-asm --extra-libs=-L/app/vendor/libs/lib --extra-cflags=-I/app/vendor/libs/include --prefix=/app/vendor/ffmpeg --enable-libfdk-aac --enable-nonfree --enable-libx264 --enable-gpl
    libavutil      54. 11.100 / 54. 11.100
    libavcodec     56. 12.100 / 56. 12.100
    libavformat    56. 12.103 / 56. 12.103
    libavdevice    56.  2.100 / 56.  2.100
    libavfilter     5.  2.103 /  5.  2.103
    libswscale      3.  1.101 /  3.  1.101
    libswresample   1.  1.100 /  1.  1.100
    libpostproc    53.  3.100 / 53.  3.100

    All good !

    Disclaimer

    This code is working well on another platform (handled by kubernetes), so it may need some adjustments with heroku. But can’t find it.

    Why this error since my configuration is not showing any missconfigurations ? What am I missing here ?

  • Open letter to the European Parliament’s LIBE committee

    28 novembre 2019, par Joselyn Khor — Uncategorized

    An open letter to the European Parliament’s LIBE committee

    e-evidence newsletter

    In an effort to stem the tide of external control over user privacy, Matomo has rallied with other like-minded companies like Protonmail, NextCloud, Tutanota and Mailfence, to advocate for pro-privacy changes to the European Commission’s “e-evidence” proposal.

    Excerpt from the letter : 

    “The Commission’s e-evidence proposal threatens the competitive advantage European tech businesses have over their American counterparts by undermining the protections we can provide to our customers. It breaks with the long-standing rule that only trusted national judicial authorities can order companies to hand over customer data for criminal investigations. Instead, the Commission’s e-evidence proposal would allow any foreign law enforcement agency from across the EU to force us to hand out customer data without our own authorities doublechecking the foreign order.

    “Different from American Big Tech firms, European privacy tech companies lack the resources to verify the legality of each foreign order. Because of the way the e-evidence proposal is phrased, we would not even be able to properly authenticate foreign authorities to ensure that we are not replying to a malicious actor – let alone object to an order if we found it to be unwarranted.”

    Matomo Founder, Matthieu Aubry emphasises, “It is time that privacy-minded tech companies work together to defend their users, their businesses, and the values they are founded on. This is why we are supporting Privacy Tech Europe.”

    Read our open letter to members of the LIBE Committee in full.

  • Frozen images at the beginning of a mts to mp4 conversion

    26 novembre 2019, par nounou

    I am trying to convert a file h264 mpegts to h264 mp4.

    ffmpeg.exe -i input.mts -f mp4 -vf "scale=512:384 " -c:a aac -b:a 64k  -c:v libx264   -pix_fmt yuv420p -movflags faststart -map 0:v -map 0:a  -y  output.mp4

    This conversion produces an output file longer than the input file and the image freezes (around 1 second) at startup, but there is already sound
    After about 1 second the picture and sound are synchronous.
    I have these messages before transcoding :

    ffmpeg version git-2019-11-13-a7245ad Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 9.2.1 (GCC) 20191010
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libo
    pencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-lib
    webp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enab
    le-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
     libavutil      56. 35.101 / 56. 35.101
     libavcodec     58. 62.100 / 58. 62.100
     libavformat    58. 35.100 / 58. 35.100
     libavdevice    58.  9.100 / 58.  9.100
     libavfilter     7. 66.100 /  7. 66.100
     libswscale      5.  6.100 /  5.  6.100
     libswresample   3.  6.100 /  3.  6.100
     libpostproc    55.  6.100 / 55.  6.100
    [mp3float @ 00000000003f63c0] Header missing
    [h264 @ 00000000003f5300] SPS unavailable in decode_picture_timing
    [h264 @ 00000000003f5300] non-existing PPS 0 referenced
    [h264 @ 00000000003f5300] SPS unavailable in decode_picture_timing
    [h264 @ 00000000003f5300] non-existing PPS 0 referenced
    [h264 @ 00000000003f5300] decode_slice_header error
    [h264 @ 00000000003f5300] no frame!
    [h264 @ 00000000003f5300] SPS unavailable in decode_picture_timing
    [h264 @ 00000000003f5300] non-existing PPS 0 referenced
    [h264 @ 00000000003f5300] SPS unavailable in decode_picture_timing
    -----
    [h264 @ 00000000003f5300] SPS unavailable in decode_picture_timing
    [h264 @ 00000000003f5300] non-existing PPS 0 referenced
    [h264 @ 00000000003f5300] decode_slice_header error
    [h264 @ 00000000003f5300] no frame!
    [mpegts @ 00000000003f1500] start time for stream 0 is not set in estimate_timings_from_pts
    [mpegts @ 00000000003f1500] PES packet size mismatch
    ---
    Press [q] to stop, [?] for help
    [mp2 @ 0000000003b1e500] Header missing
    Error while decoding stream #0:2: Invalid data found when processing input
    [libx264 @ 0000000002b200c0] using SAR=4/3
    [libx264 @ 0000000002b200c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0000000002b200c0] profile High, level 2.1, 4:2:0, 8-bit
    [libx264 @ 0000000002b200c0] 264 - core 158 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x1
    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=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interl
    =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=crf mbtree=1 crf=23.0 qc
    tio=1.40 aq=1:1.00
    Output #0, mp4, to 'c:\temp\output.mp4':
     Metadata:
       encoder         : Lavf58.35.100
       Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 512x384 [SAR 4:3 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
       Metadata:
         encoder         : Lavc58.62.100 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
       Stream #0:1(fre): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 64 kb/s
       Metadata:
         encoder         : Lavc58.62.100 aac
    c:\temp\input.MTS: corrupt decoded frame in stream 10:10.56 bitrate= 198.6kbits/s dup=42 drop=0 speed=7.03x
    [mp4 @ 0000000002a16d40] Starting second pass: moving the moov atom to the beginning of the filespeed=7.12x
    frame=  750 fps=175 q=-1.0 Lsize=    1806kB time=00:00:30.01 bitrate= 492.8kbits/s dup=42 drop=0 speed=   7x
    video:1546kB audio:236kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.326814%

    If I try to cut the first 3 seconds on the source file.

    ffmpeg.exe -ss 3 -i input.mts -f mpegts -c:v copy -c:a copy -map v -map a input_ss3.mts

    Then redo the conversion h264 mpegts to h264 mp4
    I have the same result.

    For the moment, in order to have an output file without frozen images at the beginning ; i need to do the following :

    I have to extract the video and sound, look for the delay betwen video and sound, cutting sound at the begining of audio file,
    concatenate the audio file et the video file, then convert to h264 - mp4.

    ffmpeg.exe -ss xx -i input.mts  -f mpegts -c:a copy -vn audio.mts
    ffmpeg.exe -i input.mts  -f mpegts -c:v copy -an video.mts
    ffmpeg.exe -i audio.mst -i video.mts   -f mpegts  -c:v copy -c:a copy -map 1:v -map 0:a  new_input.mts
    ffmpeg.exe -i new_input.mts -f mp4 -vf "scale=512:384 " -c:a aac -b:a 64k  -c:v libx264   -pix_fmt yuv420p -movflags faststart -map 0:v -map 0:a  output.mp4

    Can you tell me if there is a way to fix the source file or if there is another way to do it ?

    Maybe I should cut my source file to the first intra image and do the conversion afterwards.

    ffmpeg.exe input.mts -ss first_intra_frame  -f mpegts -c:v copy -c:a copy -map v -map a:0 new_input.mts
    ffmpeg.exe -i new_input.mts -f mp4 -vf "scale=512:384 " -c:a aac -b:a 64k  -c:v libx264   -pix_fmt yuv420p -movflags faststart -map 0:v -map 0:a  output.mp4

    But I have to find the exact position of the first intra frame.

    I try with the command :

    ffmpeg.exe -skip_frame nokey -i input.mts -t 10  -vf showinfo -vsync 0 -f null -

    But, I get "pts_time" which does not seem to match the position in "seconds.milliseconds" of the first intra frame.

    I try with the command :

    ffprobe.exe  input.mts -show_frames  -select_streams v:0  -show_entries frame=pkt_pts,pkt_pts_time,pkt_dts,pkt_dts_time,pkt_pos,coded_picture_number,pict_type > input.txt

    I also do not find the position of the first intra frame.

    Could you help me to find the exact position in "seconds.milliseconds" of the firsts intra frames ?