Recherche avancée

Médias (91)

Autres articles (73)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration 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 (...)

Sur d’autres sites (11035)

  • Mix additional audio file with video(+audio) in ffmpeg

    21 mai 2019, par Serg

    I’m trying to mix additional audio file with video which has also audio within. But the problem is that I already have complex ffmpeg command and don’t know how to combine them together.

    This is my existing ffmpeg command which uses some offsets and replaces additional audio file with embedded one (audio inside video) and also overlays few gauges and watermark to the video.

    ffmpeg -y
    -ss 00:00:01:213 -i videoFile.mp4
    -ss 00:00:03:435 -i audioFile.wav
    -i watermark.png
    -framerate 6 -i gauge1_path/img-%04d.png
    -framerate 1 -i gauge2_path/img-%04d.png
    -framerate 2 -i gauge3_path/img-%04d.png
    -framerate 2 -i gauge4_path/img-%04d.png
    -framerate 2 -i gauge5_path/img-%04d.png
    -framerate 2 -i gauge6_path/img-%04d.png
    -filter_complex [0][2]overlay=(21):(H-h-21)[ovr0];
    [ovr0][3]overlay=(W-w-21):(H-h-21)[ovr1];
    [ovr1][4]overlay=(W-w-21):(H-h-333)[ovr2];
    [ovr2][5]overlay=(W-w-21):(H-h-418)[ovr3];
    [ovr3][6]overlay=(W-w-21):(H-h-503)[ovr4];
    [ovr4][7]overlay=(W-w-21):(H-h-588)[ovr5];
    [ovr5][8]overlay=(W-w-21):(H-h-673)
    -map 0:v -map 1:a -c:v libx264 -preset ultrafast -crf 23 -t 00:5:10:000 output.mp4

    Now I would like to use ffmpeg's amix in order to mix both audios instead of replacing them, if possible with ability to set volumes. But official documentation amix says nothing about volume.

    Separately both seems to work ok.

    ffmpeg -y -i video.mp4 -i audio.mp3 -filter_complex [0][1]amix=inputs=2[a] -map 0:v -map [a] -c:v copy output.mp4

    and

    ffmpeg -y -i video.mp4 -i audio.mp3 -i watermark.png -filter_complex [0][2]overlay=(21):(H-h-21)[ovr0] -map [ovr0]:v -map 1:a -c:v libx264 -preset ultrafast -crf 23 output.mp4

    but together

    ffmpeg -y -i video.mp4 -i audio.mp3 -i watermark.png -filter_complex [0][1]amix=inputs=2[a];[a][2]overlay=(21):(H-h-21)[ovr0] -map [ovr0]:v -map [a] -c:v libx264 -preset ultrafast -crf 23 output.mp4

    I’m getting an error :

    ffmpeg version N-93886-gfbdb3aa179 Copyright (c) 2000-2019 the FFmpeg developers
     built with gcc 8.3.1 (GCC) 20190414
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --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 --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
     libavutil      56. 28.100 / 56. 28.100
     libavcodec     58. 52.101 / 58. 52.101
     libavformat    58. 27.103 / 58. 27.103
     libavdevice    58.  7.100 / 58.  7.100
     libavfilter     7. 53.101 /  7. 53.101
     libswscale      5.  4.101 /  5.  4.101
     libswresample   3.  4.100 /  3.  4.100
     libpostproc    55.  4.100 / 55.  4.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       creation_time   : 1970-01-01T00:00:00.000000Z
       encoder         : Lavf53.24.2
     Duration: 00:00:29.57, start: 0.000000, bitrate: 1421 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1032 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
       Metadata:
         creation_time   : 1970-01-01T00:00:00.000000Z
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
       Metadata:
         creation_time   : 1970-01-01T00:00:00.000000Z
         handler_name    : SoundHandler
    [mp3 @ 0000015e2f934ec0] Estimating duration from bitrate, this may be inaccurate
    Input #1, mp3, from 'audio.mp3':
     Duration: 00:00:45.33, start: 0.000000, bitrate: 128 kb/s
       Stream #1:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s
    Input #2, png_pipe, from 'watermark.png':
     Duration: N/A, bitrate: N/A
       Stream #2:0: Video: png, rgb24(pc), 100x56 [SAR 3779:3779 DAR 25:14], 25 tbr, 25 tbn, 25 tbc
    [Parsed_amix_0 @ 0000015e2ff2e940] Media type mismatch between the 'Parsed_amix_0' filter output pad 0 (audio) and the 'Parsed_overlay_1' filter input pad 0 (video)
    [AVFilterGraph @ 0000015e2f91c600] Cannot create the link amix:0 -> overlay:0
    Error initializing complex filters.
    Invalid argument

    So my question : whether it’s possible to combine amix and overlay together and how and in which order they should be used ? Or should I look something different because amix unable to set volume levels ?

    Thanks in advance !

  • How to compile a static FFmpeg binary on OS X

    29 juillet 2014, par Chitanda_Eru

    I want to compile a static ffmpeg binary by myself. I follow this guide, and then built one successfully.

    ./configure --extra-version=Chitanda_Eru --prefix=/Volumes/Chitanda_Eru/ --enable-gpl --enable-version3 --enable-nonfree --disable-shared --enable-static --enable-ffplay --disable-ffserver --enable-pthreads --enable-avisynth --enable-libvo-aacenc --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libxvid --enable-libbluray --enable-libtheora --enable-libcelt --enable-openssl --enable-libspeex --enable-postproc --enable-libvpx --enable-libgsm --enable-libopenjpeg --enable-libopus --enable-fontconfig --enable-libfreetype --enable-libass --enable-filters --disable-indev=qtkit --enable-runtime-cpudetect --enable-bzlib --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libtwolame --enable-openal --enable-libsoxr --enable-libwavpack --enable-libvidstab --enable-libilbc --enable-libschroedinger --enable-libcaca --enable-opengl --enable-frei0r --enable-libquvi

    But I come across a problem, the FFmpeg binary is only 15.5MB which is much smaller than the official builds, what’s more, it can’t work on my second Mac and with errors below.

    Library not loaded: /usr/local/lib/libx264.142.dylib
     Referenced from: /Applications/CLI/ffmpeg
     Reason: image not found
    Trace/BPT trap: 5

    And then I use otool command to see what the dynamic libraries ffmpeg rely on.

    otool -L /Applications/CLI/ffmpeg | grep local

       /usr/local/lib/libSDL-1.2.0.dylib (compatibility version 12.0.0, current version 12.4.0)
       /usr/local/lib/libx265.25.dylib (compatibility version 25.0.0, current version 1.2.0)
       /usr/local/lib/libx264.142.dylib (compatibility version 0.0.0, current version 0.0.0)
       /usr/local/lib/libvorbisenc.2.dylib (compatibility version 3.0.0, current version 3.10.0)
       /usr/local/lib/libvorbis.0.dylib (compatibility version 5.0.0, current version 5.7.0)
       /usr/local/lib/libogg.0.dylib (compatibility version 9.0.0, current version 9.2.0)
       /usr/local/lib/libvo-aacenc.0.dylib (compatibility version 1.0.0, current version 1.3.0)
       /usr/local/lib/libvidstab.0.9.dylib (compatibility version 0.9.0, current version 0.0.0)
       /usr/local/lib/libtheoraenc.1.dylib (compatibility version 3.0.0, current version 3.2.0)
       /usr/local/lib/libtheoradec.1.dylib (compatibility version 3.0.0, current version 3.4.0)
       /usr/local/lib/libspeex.1.dylib (compatibility version 7.0.0, current version 7.0.0)
       /usr/local/lib/libquvi.7.dylib (compatibility version 8.0.0, current version 8.1.0)
       /usr/local/lib/libopus.0.dylib (compatibility version 6.0.0, current version 6.0.0)
       /usr/local/lib/libopenjpeg.1.dylib (compatibility version 7.0.0, current version 7.0.0)
       /usr/local/lib/libopencore-amrwb.0.dylib (compatibility version 1.0.0, current version 1.3.0)
       /usr/local/lib/libopencore-amrnb.0.dylib (compatibility version 1.0.0, current version 1.3.0)
       /usr/local/lib/libmp3lame.0.dylib (compatibility version 1.0.0, current version 1.0.0)
       /usr/local/lib/libgsm.1.0.13.dylib (compatibility version 1.0.0, current version 1.0.13)
       /usr/local/lib/libfreetype.6.dylib (compatibility version 18.0.0, current version 18.2.0)
       /usr/local/lib/libfontconfig.1.dylib (compatibility version 10.0.0, current version 10.0.0)
       /usr/local/lib/libfdk-aac.0.dylib (compatibility version 1.0.0, current version 1.4.0)
       /usr/local/lib/libfaac.0.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
       /usr/local/lib/libcaca.0.dylib (compatibility version 100.0.0, current version 100.19.0)
       /usr/local/lib/libcelt0.2.dylib (compatibility version 3.0.0, current version 3.0.0)
       /usr/local/lib/libbluray.1.dylib (compatibility version 8.0.0, current version 8.0.0)
       /usr/local/lib/libass.5.dylib (compatibility version 6.0.0, current version 6.0.0)

    Most of my packages are installed by Homebrew, and Homebrew will install them with "—enable-static —enable-shared". And my guess is : when I compile ffmpeg, ffmpeg rather use the dynamic libraries than the static libraries, so the binary won’t work on other Macs.How can I build a static binary of ffmpeg ? Thanks.

    update : I successfully build static ffmpeg after moving all the dylibs which have static libraries as well to other dictionary and disable all the libraries that ./configure can’t find.

    ./configure --extra-version=Chitanda_Eru --prefix=/Volumes/Chitanda_Eru/ --enable-gpl --enable-version3 --enable-nonfree --disable-shared --enable-static --enable-ffplay --disable-ffserver --enable-pthreads --enable-avisynth --enable-libvo-aacenc --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libtheora --enable-libcelt --enable-openssl --enable-libspeex --enable-postproc --enable-libvpx --enable-libgsm --enable-libopenjpeg --enable-filters --disable-indev=qtkit --enable-runtime-cpudetect --enable-bzlib --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libtwolame --enable-libsoxr --enable-libwavpack --enable-libilbc --enable-opengl --enable-frei0r
  • Video Conferencing in HTML5 : WebRTC via Socket.io

    http://mirror.linux.org.au/linux.conf.au/2013/mp4/Code_up_your_own_video_conference_in_HTML5.mp4
    1er janvier 2014, par silvia

    Six months ago I experimented with Web sockets for WebRTC and the early implementations of PeerConnection in Chrome. Last week I gave a presentation about WebRTC at Linux.conf.au, so it was time to update that codebase.

    I decided to use socket.io for the signalling following the idea of Luc, which made the server code even smaller and reduced it to a mere reflector :

     var app = require(’http’).createServer().listen(1337) ;
     var io = require(’socket.io’).listen(app) ;
    

    io.sockets.on(’connection’, function(socket)
    socket.on(’message’, function(message)
    socket.broadcast.emit(’message’, message) ;
    ) ;
    ) ;

    Then I turned to the client code. I was surprised to see the massive changes that PeerConnection has gone through. Check out my slide deck to see the different components that are now necessary to create a PeerConnection.

    I was particularly surprised to see the SDP object now fully exposed to JavaScript and thus the ability to manipulate it directly rather than through some API. This allows Web developers to manipulate the type of session that they are asking the browsers to set up. I can imaging e.g. if they have support for a video codec in JavaScript that the browser does not provide built-in, they can add that codec to the set of choices to be offered to the peer. While it is flexible, I am concerned if this might create more problems than it solves. I guess we’ll have to wait and see.

    I was also surprised by the need to use ICE, even though in my experiment I got away with an empty list of ICE servers – the ICE messages just got exchanged through the socket.io server. I am not sure whether this is a bug, but I was very happy about it because it meant I could run the whole demo on a completely separate network from the Internet.

    The most exciting news since my talk is that Mozilla and Google have managed to get a PeerConnection working between Firefox and Chrome – this is the first cross-browser video conference call without a plugin ! The code differences are minor.

    Since the specification of the WebRTC API and of the MediaStream API are now official Working Drafts at the W3C, I expect other browsers will follow. I am also looking forward to the possibilities of :

    The best places to learn about the latest possibilities of WebRTC are webrtc.org and the W3C WebRTC WG. code.google.com has open source code that continues to be updated to the latest released and interoperable features in browsers.

    The video of my talk is in the process of being published. There is a MP4 version on the Linux Australia mirror server, but I expect it will be published properly soon. I will update the blog post when that happens.