Recherche avancée

Médias (91)

Autres articles (58)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (14403)

  • Deploying QT project with opencv and ffmpeg dylib error

    9 juillet 2019, par Clarky

    When I build my project using the opencv and ffmpeg dylibs my application crashes upon opining with the error :

    Dyld Error Message :
    Library not loaded :
    /usr/local/Cellar/ffmpeg/4.1.3/lib/libswresample.3.dylib

    Referenced from :
    /Applications/myApp.app/Contents/Frameworks/libavcodec.58.dylib
    Reason : image not found

    I have tried using the install_name_tool to try and change the paths using this :

    install_name_tool -change libavcodec.58.dylib

    @executable_path/../Frameworks/libavcodec.58.dylib

    /Users/me/code/build_output/MyAppQML/myApp.app/Contents/MacOS/myApp

    Although this modified the file I was still getting the same error and crash at run time.

    Is install_name_tool suitable to fix this issue or should I be looking at something else ?

    I’ve used otool on libavcodec.58.dylib which showed that some of the paths where linked to the @executable_path

    @executable_path/../Frameworks/libavcodec.58.dylib (compatibility version 58.0.0, current version 58.35.100)
       /usr/local/Cellar/ffmpeg/4.1.3/lib/libswresample.3.dylib (compatibility version 3.0.0, current version 3.3.100)
       /usr/local/Cellar/ffmpeg/4.1.3/lib/libavutil.56.dylib (compatibility version 56.0.0, current version 56.22.100)
       /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
       /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
       @executable_path/../Frameworks/liblzma.5.dylib (compatibility version 8.0.0, current version 8.4.0)
       @executable_path/../Frameworks/libopencore-amrwb.0.dylib (compatibility version 1.0.0, current version 1.3.0)
  • Get lengths of intermediate concatenated files in ffmpeg filter-complex

    17 juillet 2019, par Matthew

    I’m writing a media Electron app that occasionally needs to individually trim => individually normalize => concatenate => convert a varying number of WAV files into MP3.
    I’ve successfully used FFMPEG (via Fluent-ffmpeg) to do so (command wrapped for visibility) :

    ffmpeg -i 3.301_to_8.752_Careful.wav -i 8.752_to_18.751_Careful.wav -y
    -filter_complex
    [0]silenceremove=start_periods=1:start_threshold=-50dB[mid];[mid]loudnorm=I=-16:TP=-1.5:LRA=11[out];
    [1]silenceremove=start_periods=1:start_threshold=-50dB[mid];[mid]loudnorm=I=-16:TP=-1.5:LRA=11[b];
    [out][b]concat=v=0:a=1[out]
    -b:a 128k -ac 1 -acodec libmp3lame -f mp3 -map [out] -y Careful_Merged.mp3

    Here’s the relevant parts of the output :

    Guessed Channel Layout for Input Stream #0.0 : mono
    Input #0, wav, from '3.301_to_8.752_Careful.wav':
     Duration: 00:00:05.50, bitrate: 705 kb/s
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s
    Guessed Channel Layout for Input Stream #1.0 : mono
    Input #1, wav, from '8.752_to_18.751_Careful.wav':
     Duration: 00:00:10.30, bitrate: 705 kb/s
       Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s
    Stream mapping:
     Stream #0:0 (pcm_s16le) -> silenceremove
     Stream #1:0 (pcm_s16le) -> silenceremove
     concat -> Stream #0:0 (libmp3lame)
    Press [q] to stop, [?] for help
    Output #0, mp3, to 'Careful_Merged.mp3':
     Metadata:
       TSSE            : Lavf58.28.101
       Stream #0:0: Audio: mp3 (libmp3lame), 48000 Hz, mono, fltp, 128 kb/s (default)
       Metadata:
         encoder         : Lavc58.53.101 libmp3lame
    size=     246kB time=00:00:15.69 bitrate= 128.4kbits/s speed=33.8x
    video:0kB audio:246kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.170563%

    The benefit is that the process chains nicely, but the downside is that I don’t know the resulting length of the intermediate files after the automagic trim. My app needs a "table of contents" showing the start and end of each segment, but I can’t figure out how to export the duration of each trimmed file before concatenation between
    [0]silenceremove=start_periods=1:start_threshold=-50dB[mid];[mid]loudnorm=I=-16:TP=-1.5:LRA=11[out] and the concatenation [out][b]concat=v=0:a=1[out].

    It’s so elegant as it is, I’d prefer not to save the intermediate files to disk or trim the audio twice to get the info I need. All I need is a duration for each, and I can do the math.
    Is there a filter that I can put inline to export the intermediate duration, or a way to get a log of the concatenation action ?

    Any ideas ?

  • FFmpeg from Python has Corrupted Output

    14 juillet 2019, par Mazyod

    In a python script, I have :

    os.system(ff_cmd)
    # also tried Popen(ff_cmd, shell=True).wait()

    Then, I ran that same ff_cmd from terminal directly. Here are the results :

    # ff_cmd
    ffmpeg -i "114006.mp3" -acodec pcm_s16le -ar 16000 -ac 1 "114-006-a4dec52a.wav"

    # after running from python
    % file 114-006-a4dec52a.wav
    114-006-a4dec52a.wav: Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v2,  40 kbps, 16 kHz, Monaural

    # after running from terminal
    % file 114-006-a4dec52a.wav
    114-006-a4dec52a.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 16000 Hz

    Can anyone please explain why in the world would they result in different outputs ?


    Output from Python :

    ffmpeg version 4.1.4 Copyright (c) 2000-2019 the FFmpeg developers
     built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.4 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
     libavutil      56. 22.100 / 56. 22.100
     libavcodec     58. 35.100 / 58. 35.100
     libavformat    58. 20.100 / 58. 20.100
     libavdevice    58.  5.100 / 58.  5.100
     libavfilter     7. 40.101 /  7. 40.101
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  3.100 /  5.  3.100
     libswresample   3.  3.100 /  3.  3.100
     libpostproc    55.  3.100 / 55.  3.100
    [mp3 @ 0x7ffa34001800] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '/.../114006.mp3':
     Duration: 00:00:09.53, start: 0.000000, bitrate: 64 kb/s
       Stream #0:0: Audio: mp3, 22050 Hz, stereo, fltp, 64 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
    Press [q] to stop, [?] for help
    Output #0, wav, to '/.../114-006-a4dec52a.wav':
     Metadata:
       ISFT            : Lavf58.20.100
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s
       Metadata:
         encoder         : Lavc58.35.100 pcm_s16le
    size=     298kB time=00:00:09.53 bitrate= 256.1kbits/s speed= 166x    
    video:0kB audio:298kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.025564%

    Output from terminal :

    ffmpeg version 4.1.4 Copyright (c) 2000-2019 the FFmpeg developers
     built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.4 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
     libavutil      56. 22.100 / 56. 22.100
     libavcodec     58. 35.100 / 58. 35.100
     libavformat    58. 20.100 / 58. 20.100
     libavdevice    58.  5.100 / 58.  5.100
     libavfilter     7. 40.101 /  7. 40.101
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  3.100 /  5.  3.100
     libswresample   3.  3.100 /  3.  3.100
     libpostproc    55.  3.100 / 55.  3.100
    [mp3 @ 0x7f98ed005800] Estimating duration from bitrate, this may be inaccurate
    Input #0, mp3, from '/.../114006.mp3':
     Duration: 00:00:09.53, start: 0.000000, bitrate: 64 kb/s
       Stream #0:0: Audio: mp3, 22050 Hz, stereo, fltp, 64 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
    Press [q] to stop, [?] for help
    Output #0, wav, to '/.../114-006-a4dec52a.wav':
     Metadata:
       ISFT            : Lavf58.20.100
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s
       Metadata:
         encoder         : Lavc58.35.100 pcm_s16le
    size=     298kB time=00:00:09.53 bitrate= 256.1kbits/s speed= 469x    
    video:0kB audio:298kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.025564%