Recherche avancée

Médias (91)

Autres articles (78)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

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

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

Sur d’autres sites (9106)

  • ffmpeg : PNGs to mp4 video is strange scaled quicktime

    15 mai 2024, par v_b

    I am trying to create a video from multiple PNG files.
    
The files contain an animation of a line.
    
However, the output MP4 video looks really strange, as if the content is stretched or scaled.

    


    Below, you can see screenshots of one of the PNG files and the resulting video file.

    


    Some additional information :
    
I am on a MacPro M3 w. latest MacOs updates.
    
The images have transparent backgrounds.

    


    Command :

    


    ffmpeg -framerate 30 -pattern_type glob -i "*.png" -s:v 1600x800 -pix_fmt yuv420p -c:v libx264 result.mp4


    


    Example PNG file :
enter image description here

    


    PNG Information :
enter image description here

    


    Resulting Video :
enter image description here

    


    Video Info :

    


    ffprobe ./result.mp4                                                                
ffprobe version 7.0 Copyright (c) 2007-2024 the FFmpeg developers
  built with Apple clang version 15.0.0 (clang-1500.3.9.4)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.0_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './result.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf61.1.100
  Duration: 00:00:03.03, start: 0.000000, bitrate: 103 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, unknown/bt709/iec61966-2-1, progressive), 1600x800, 98 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
        encoder         : Lavc61.3.100 libx264


    


    ffmpeg version

    


    ffmpeg version 7.0 Copyright (c) 2000-2024 the FFmpeg developers
  built with Apple clang version 15.0.0 (clang-1500.3.9.4)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.0_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
Universal media converter
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...


    


  • Amplification of recorded audio in flutter app using FFMPEG not working correctly

    20 mai 2024, par Noman khanbhai

    In my app I need to record audio and send it to server, server then sends the file to a hardware using mqtt and then file gets played on the hardware. I am using flutter to build app and using record 5.0.5 package for audio recording and for amplification ffmpeg_kit_flutter 6.0.3 package to do the amplification.

    


    The issue is it doesnt seems like there is much change in amplitude, I used different values for amplification factor but audio remains same.

    


    Here is the code for amplification

    


    Future<string>? amplifyAudio(&#xA;      String inputPath, String outputPath) async {&#xA;&#xA;    // Build FFmpeg command to amplify audio&#xA;    outputPath = await modifyOutputPath(inputPath)!;&#xA;    String audioFilter = &#x27;volume=${amplificationFactor}dB&#x27;; &#xA;    //-c:a aac&#xA;    String command = &#x27;-i $inputPath -af $audioFilter $outputPath&#x27;;&#xA;&#xA;    // Execute FFmpeg command&#xA;    await FFmpegKit.executeAsync(command).then((session) async {&#xA;      debugPrint("After executeAsync session ${session.toString()}");&#xA;      debugPrint(&#xA;          "After executeAsync returncode ${await session.getReturnCode()}");&#xA;      debugPrint("After executeAsync command ${session.getCommand()}");&#xA;      log("After executeAsync alllogs ${await session.getAllLogs()}");&#xA;      log("After executeAsync alllogstring ${await session.getAllLogsAsString()}");&#xA;      log("After executeAsync failStackTrace ${await session.getFailStackTrace()}");&#xA;    }).onError((error, stackTrace) {&#xA;      debugPrint("After executeAsync error ${error.toString()}");&#xA;    });&#xA;&#xA;    return outputPath;&#xA;  }&#xA;&#xA;</string>

    &#xA;

    This are the logs when above method gets executed.

    &#xA;

    FFMpeg command -> `-i /data/user/0/com.orgname.flutter.appname/app_flutter/1716209206469.aac -af volume=10.0dB /storage/emulated/0/Download/1716209213238_amplified.aac`&#xA;&#xA;> Logs&#xA;> After executeAsync alllogstring ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers&#xA;> built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)&#xA;> configuration: --cross-prefix=aarch64-linux-android- --sysroot=/Users/sue/Library/Android/sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/darwin-x86_64/sysroot --prefix=/Users/sue/Projects/arthenica/ffmpeg-kit/prebuilt/android-arm64/ffmpeg --pkg-config=/opt/homebrew/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --ar=aarch64-linux-android-ar --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang&#x2B;&#x2B; --ranlib=aarch64-linux-android-ranlib --strip=aarch64-linux-android-strip --nm=aarch64-linux-android-nm --extra-libs=&#x27;-L/Users/sue/Projects/arthenica/ffmpeg-kit/prebuilt/android-arm64/cpu-features/lib -lndk_compat&#x27; --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-gmp --enable-gnutls --enable-iconv --disable-sdl2 --disable-openssl --enable-zlib --enable-mediacodec&#xA;> libavutil      58.  2.100 / 58.  2.100&#xA;> libavcodec     60.  3.100 / 60.  3.100&#xA;> libavformat    60.  3.100 / 60.  3.100&#xA;> libavdevice    60.  1.100 / 60.  1.100&#xA;> libavfilter     9.  3.100 /  9.  3.100&#xA;> libswscale      7.  1.100 /  7.  1.100&#xA;> libswresample   4. 10.100 /  4. 10.100&#xA;> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/data/user/0/com.orgname.flutter.appname/app_flutter/1716209206469.aac&#x27;:&#xA;> Metadata:&#xA;> major_brand     : mp42&#xA;> minor_version   : 0&#xA;> compatible_brands: isommp42&#xA;> creation_time   : 2024-05-20T12:46:52.000000Z&#xA;> com.android.version: 12&#xA;> Duration: 00:00:04.76, start: 0.000000, bitrate: 131 kb/s&#xA;> Stream #0:0[0x1](eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)&#xA;> Metadata:&#xA;> creation_time   : 2024-05-20T12:46:52.000000Z&#xA;> handler_name    : SoundHandle&#xA;> vendor_id       : [0][0][0][0]&#xA;> Stream mapping:&#xA;> Stream #0:0 -> #0:0 (aac (native) -> aac (native))&#xA;> Press [q] to stop, [?] for help&#xA;

    &#xA;

    Note - I am also playing the audio after recording and before amplification in app, and also saving in download. to make sure audio file is correct.

    &#xA;

    Amplified file also gets saved but there is almost no difference.

    &#xA;

    I have also searched/googled/ and also done chatgpt to resolve issue. but nothing worked.

    &#xA;

  • Moviepy not updating FFmpeg Version after FFmpeg Install ?

    31 mai 2024, par The_ Game12

    I've been toying around with MoviePy, and recently switched a project to a new computer at home to continue messing around with it. However, I tried running what I had previously written (which ran perfectly fine on the other computer) and I get this :

    &#xA;

    OSError: MoviePy error: failed to read the first frame of video file ./Gameplay/minecraft-&#xA;gameplay2.mp4. That might mean that the file is corrupted. That may also mean that you are using &#xA;a deprecated version of FFMPEG. On Ubuntu/Debian for instance the version in the repos is &#xA;deprecated. Please update to a recent version from the website.&#xA;&#xA;

    &#xA;

    After reading the error, I did as it instructed, and updated my FFmpeg :

    &#xA;

    $ ffmpeg&#xA;ffmpeg version N-115387-g8e27bd025f-20240525 Copyright (c) 2000-2024 the FFmpeg developers&#xA;  built with gcc 13.2.0 (crosstool-NG 1.26.0.65_ecc5e41)&#xA;  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-openssl --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --enable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --enable-libdvdread --enable-libdvdnav --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libaribcaption --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-libs=&#x27;-ldl -lgomp&#x27; --extra-ldflags=-pthread --extra-ldexeflags=-pie --cc=x86_64-ffbuild-linux-gnu-gcc --cxx=x86_64-ffbuild-linux-gnu-g&#x2B;&#x2B; --ar=x86_64-ffbuild-linux-gnu-gcc-ar --ranlib=x86_64-ffbuild-linux-gnu-gcc-ranlib --nm=x86_64-ffbuild-linux-gnu-gcc-nm --extra-version=20240525&#xA;  libavutil      59. 20.100 / 59. 20.100&#xA;  libavcodec     61.  5.104 / 61.  5.104&#xA;  libavformat    61.  3.104 / 61.  3.104&#xA;  libavdevice    61.  2.100 / 61.  2.100&#xA;  libavfilter    10.  2.102 / 10.  2.102&#xA;  libswscale      8.  2.100 /  8.  2.100&#xA;  libswresample   5.  2.100 /  5.  2.100&#xA;  libpostproc    58.  2.100 / 58.  2.100&#xA;Universal media converter&#xA;usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...&#xA;

    &#xA;

    And I continued getting the same error. So I looked at what version my moviepy was using, and it was still 4.X. I read somewhere that your FFmpeg version is determined on the first use, which made sense, so I uninstalled and reinstalled, to get the same error.

    &#xA;

    I am honestly lost at this point, as I have the newest version of FFmpeg, but I still get this from moviepy :

    &#xA;

    >>> import moviepy&#xA;>>> print(moviepy.config.FFPMEG_BINARY)&#xA;ffmpeg : /home/<username>/.local/lib/python3.9/site-packages/imageio_ffmpeg/binaries/ffmpeg-linux64-v4.2.2&#xA;</username>

    &#xA;

    Any Ideas as to what I'm doing wrong ?

    &#xA;

    (Note : I'm using Crostini which I believe is using an Ubuntu or Ubuntu-Like shell)

    &#xA;

    Thanks :)

    &#xA;