Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (59)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

Sur d’autres sites (11057)

  • Urgent Help Needed : FFmpeg Integration in .NET MAUI for Android [closed]

    15 juin 2024, par Billy Vanegas

    I'm currently facing a significant challenge with integrating FFmpeg into my .NET MAUI project for Android. While everything works smoothly on Windows with Visual Studio 2022, I'm having a hard time replicating this on the Android platform. Despite exploring various NuGet packages like FFMpegCore, which appear to be wrappers around FFmpeg but don't include FFmpeg itself, I'm still at a loss.

    


    I've tried following the instructions for integrating ffmpeg-kit for Android, but I keep running into issues, resulting in repeated failures and growing confusion. It feels like there is no straightforward way to seamlessly incorporate FFmpeg into a .NET MAUI project that works consistently across both iOS and Android.

    


    The Problem :

    


    I need to convert MP3 files to WAV format using FFmpeg on the Android platform within a .NET MAUI project. I’m using the FFMpegCore library and have downloaded the FFmpeg binaries from the official FFmpeg website.

    


    However, when attempting to use these binaries on an Android emulator, I encounter a permission denied error in the working directory : /data/user/0/com.companyname.projectname/files/ffmpeg

    


    Here’s the code snippet where the issue occurs :

    


    await FFMpegArguments
      .FromFileInput(mp3Path)
      .OutputToFile(wavPath, true, options => options
          .WithAudioCodec("pcm_s16le")
          .WithAudioSamplingRate(44100)
          .WithAudioBitrate(320000)
          )
      .ProcessAsynchronously();
    


    


    Additional Details :

    


    I've updated AndroidManifest.xml with permissions, but the issue persists.

    


    I've created a method ConvertMp3ToWav to handle the conversion.
I also have a method ExtractFFmpegBinaries to manage FFmpeg binaries extraction, but it seems the permission issue might be tied to how these binaries are accessed or executed.

    


    AndroidManifest.xml :

    


    &lt;?xml version="1.0" encoding="utf-8"?>&#xA;<manifest>&#xA;    <application></application>&#xA;    &#xA;    &#xA;    &#xA;    &#xA;</manifest>&#xA;

    &#xA;

    Method ConvertMp3ToWav :

    &#xA;

    private async Task ConvertMp3ToWav(string mp3Path, string wavPath)&#xA;{&#xA;    try&#xA;    {&#xA;        // Check directory and create if not exists&#xA;        var directory = Path.GetDirectoryName(wavPath);&#xA;        if (!Directory.Exists(directory))&#xA;            Directory.CreateDirectory(directory!);&#xA;&#xA;        // Check if WAV file exists&#xA;        if (!File.Exists(wavPath))&#xA;            Console.WriteLine($"File not found {wavPath}, creating empty file.");&#xA;            using var fs = new FileStream(wavPath, FileMode.CreateNew);&#xA;&#xA;        // Check if MP3 file exists&#xA;        if (!File.Exists(mp3Path))&#xA;            Console.WriteLine($"File not found {mp3Path}");&#xA;&#xA;        // Extract FFmpeg binaries&#xA;        string? ffmpegBinaryPath = await ExtractFFmpegBinaries(Platform.AppContext);&#xA;&#xA;        // Configure FFmpeg options&#xA;        FFMpegCore.GlobalFFOptions.Configure(new FFOptions { BinaryFolder = Path.GetDirectoryName(ffmpegBinaryPath!)! });&#xA;&#xA;        // Convert MP3 to WAV&#xA;        await FFMpegArguments&#xA;              .FromFileInput(mp3Path)&#xA;              .OutputToFile(wavPath, true, options => options&#xA;                  .WithAudioCodec("pcm_s16le")&#xA;                  .WithAudioSamplingRate(44100)&#xA;                  .WithAudioBitrate(320000)&#xA;                  )&#xA;              .ProcessAsynchronously();&#xA;    }&#xA;    catch (Exception ex)&#xA;    {&#xA;        Console.WriteLine($"An error occurred during the conversion process: {ex.Message}");&#xA;        throw;&#xA;    }&#xA;}&#xA;

    &#xA;

    Method ExtractFFmpegBinaries :

    &#xA;

    private async Task<string> ExtractFFmpegBinaries(Context context)&#xA;{&#xA;    var architectureFolder = "x86"; // Adjust according to device architecture&#xA;    var ffmpegBinaryName = "ffmpeg"; &#xA;    var ffmpegBinaryPath = Path.Combine(context.FilesDir!.AbsolutePath, ffmpegBinaryName);&#xA;    var tempFFMpegFileName = Path.Combine(FileSystem.AppDataDirectory, ffmpegBinaryName);&#xA;&#xA;    if (!File.Exists(ffmpegBinaryPath))&#xA;    {&#xA;        try&#xA;        {&#xA;            var assetPath = $"Libs/{architectureFolder}/{ffmpegBinaryName}";&#xA;            using var assetStream = context.Assets!.Open(assetPath);&#xA;           &#xA;            await using var tempFFMpegFile = File.OpenWrite(tempFFMpegFileName);&#xA;            await assetStream.CopyToAsync(tempFFMpegFile);&#xA;&#xA;            // Adjust permissions for FFmpeg binary&#xA;            Java.Lang.Runtime.GetRuntime()!.Exec($"chmod 755 {tempFFMpegFileName}");&#xA;        }&#xA;        catch (Exception ex)&#xA;        {&#xA;            Console.WriteLine($"An error occurred while extracting FFmpeg binaries: {ex.Message}");&#xA;            throw;&#xA;        }&#xA;    }&#xA;    else&#xA;    {&#xA;        Console.WriteLine($"FFmpeg binaries already extracted to: {ffmpegBinaryPath}");&#xA;    }&#xA;&#xA;    return tempFFMpegFileName!;&#xA;}&#xA;</string>

    &#xA;

    What I Need :

    &#xA;

    I urgently need guidance on how to correctly integrate and use FFmpeg in my .NET MAUI project for Android. Specifically :

    &#xA;

    How to properly set up and configure FFmpeg binaries for use on Android within a .NET MAUI project.&#xA;How to resolve the permission denied issue when attempting to execute FFmpeg binaries.

    &#xA;

    Any advice, solutions, or workarounds would be greatly appreciated as this is a critical part of my project and I'm running out of time to resolve it.

    &#xA;

    Thank you in advance for your help !

    &#xA;

  • Matomo recognised as a leading global Web Analytics Solution

    23 juin 2021, par Ben Erskine — Community, Marketing
    Matomo recognised as a leading data analytics solution by Capterra

    Matomo is proud to be named as one of the top global Web Analytics Software solutions for 2021. 

    From a substantial list of 320 products, Capterra analysed data and user reviews to identify the current top global web analytics solutions. The results formed the 2021 Capterra Shortlist.

    "I’m proud to see Matomo being named as a leading global web analytics platform, this independent recognition is thanks to the ongoing help of a dedicated and passionate community."

    Matthieu Aubry, Matomo founder

    As part of the Capterra Shortlist, Matomo was included in the emerging favourite category, aligned with other web analytics solutions that rate highly in customer satisfaction. Matomo rated in the top three solutions for positive user reviews and in the top six overall.

    Today Matomo is used on over 1.4 million websites, in over 190 countries, and accessible in over 50 languages.

    The Capterra Shortlist report constitutes the subjective opinions of individual end-user reviews, ratings, and data applied against a documented methodology ; they neither represent the views of, nor constitute an endorsement by, Capterra or its affiliates.

  • Vagrant provision fails to execute the next script without an obvious reason why

    14 juin 2016, par JakeTheSnake

    I’ve created/co-opted several bash scripts to provision my guest Ubuntu 14.04 OS ; the one giving me trouble right now is installing ffmpeg. When the script finishes, vagrant simply does nothing save for sending SSH keep-alives.

    Host OS : Windows 7 x64

    The last output before the infinitely repeating keep-alives is :

    INSTALL libavutil/sha.h
    INSTALL libavutil/sha512.h
    INSTALL libavutil/stereo3d.h
    INSTALL libavutil/threadmessage.h
    INSTALL libavutil/time.h
    INSTALL libavutil/timecode.h
    INSTALL libavutil/timestamp.h
    INSTALL libavutil/tree.h
    INSTALL libavutil/twofish.h
    INSTALL libavutil/version.h
    INSTALL libavutil/xtea.h
    INSTALL libavutil/tea.h
    INSTALL libavutil/lzo.h
    INSTALL libavutil/avconfig.h
    INSTALL libavutil/ffversion.h

    DEBUG ssh: stdout: INSTALL      libavutil/libavutil.pc

    DEBUG ssh: stdout: Done

    DEBUG ssh: Sending SSH keep-alive...
    DEBUG ssh: Sending SSH keep-alive...
    DEBUG ssh: Sending SSH keep-alive...

    Here are the relevant scripts :

    Vagrantfile

    # -*- mode: ruby -*-
    # vi: set ft=ruby :

    # All Vagrant configuration is done below. The "2" in Vagrant.configure
    # configures the configuration version (we support older styles for
    # backwards compatibility). Please don't change it unless you know what
    # you're doing.
    Vagrant.configure(2) do |config|
     # The most common configuration options are documented and commented below.
     # For a complete reference, please see the online documentation at
     # https://docs.vagrantup.com.

     # Every Vagrant development environment requires a box. You can search for
     # boxes at https://atlas.hashicorp.com/search.
     config.vm.box = 'ubuntu/trusty64'
     config.vm.hostname = 'dev'

     config.ssh.forward_agent = true
     config.ssh.pty = true

     # Create a private network, which allows host-only access to the machine
     # using a specific IP.
     config.vm.network :private_network, type: :dhcp, auto_config: false

     # Create a public network, which generally matched to bridged network.
     # Bridged networks make the machine appear as another physical device on
     # your network.
     config.vm.network :public_network,
                       ip: '192.168.11.14',
                       bridge: 'Realtek PCIe GBE Family Controller'

     # Share an additional folder to the guest VM. The first argument is
     # the path on the host to the actual folder. The second argument is
     # the path on the guest to mount the folder. And the optional third
     # argument is a set of non-required options.
     #
     # Do not share root directory of vagrant
     # config.vm.synced_folder '.', '/vagrant', disabled: true
     # Share ruby repository directories
     config.vm.synced_folder '.',
                             '/home/vagrant/apps',
                             nfs: true,
                             mount_options: [
                               'nfsvers=3',
                               'vers=3',
                               'actimeo=1',
                               'rsize=8192',
                               'wsize=8192',
                               'timeo=14',
                               :nolock,
                               :udp,
                               :intr,
                               :user,
                               :auto,
                               :exec,
                               :rw
                             ]

     # Provider-specific configuration so you can fine-tune various
     # backing providers for Vagrant. These expose provider-specific options.
     # Example for VirtualBox:
     #
     config.vm.provider :virtualbox do |vb|
       # Display the VirtualBox GUI when booting the machine
       vb.gui = true

       # Use VBoxManage to customize the VM.
       vb.name = 'Ubuntu'
       vb.cpus = 4
       vb.memory = 2048
       vb.customize ['modifyvm', :id, '--vram', 64]
       vb.customize ['modifyvm', :id, '--audio', :dsound]
       vb.customize ['modifyvm', :id, '--audiocontroller', :ac97]
       vb.customize ['modifyvm', :id, '--clipboard', :bidirectional]
     end

     # Provisioning
     config.vm.provision :shell, path: './provisioning/user/install-apps.sh',
                                 privileged: false, name: 'Applications'
     config.vm.provision :shell, path: './provisioning/user/install-rvm.sh',
                                 args: 'stable', privileged: false, name: 'RVM'
     config.vm.provision :shell, path: './provisioning/user/install-ruby.sh',
                                 args: '2.3.1', privileged: false, name: 'Ruby'
     config.vm.provision :shell, path: './provisioning/user/install-ruby-gems.sh',
                                 privileged: false, name: 'Ruby Gems'
     config.vm.provision :shell, path: './provisioning/root/install-nginx.sh',
                                 args: '1.9.9', name: 'Nginx'

     config.vm.provision :chef_solo do |chef|
       # chef.version = '12.10.40'

       # Paths to your cookbooks (on the host)
       chef.cookbooks_path = ['cookbooks']
       # Add chef recipes
       chef.add_recipe 'apt'
       chef.add_recipe 'git' # Is required for NPM
       chef.add_recipe 'sqlite'
       chef.add_recipe 'mysql'
       chef.add_recipe 'nodejs'
       chef.add_recipe 'memcached'
       chef.add_recipe 'imagemagick'
       chef.add_recipe 'optipng'
       chef.add_recipe 'sublime-text'
       chef.add_recipe 'tomcat'
     end
    end

    install-apps.sh

    #!/usr/bin/env bash

    echo Turning off console beeps...
    grep '^set bell-style none' /etc/inputrc || echo 'set bell-style none' >> /etc/inputrc

    echo Installing languages
    sudo apt-get -y update
    sudo locale-gen en_US en_US.UTF-8
    sudo dpkg-reconfigure locales

    echo Installing essential apps
    sudo apt-get -y install build-essential curl yasm

    echo Installing desktop apps
    sudo apt-get -y install ubuntu-desktop

    hash ffmpeg 2>/dev/null || {
     # Build ffmpeg
     echo Installing ffmpeg

     sudo apt-get -y install autoconf automake libass-dev libfreetype6-dev \
       libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev \
       libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev libx264-dev libmp3lame-dev libopus-dev

     mkdir ~/ffmpeg_sources
     cd ~/ffmpeg_sources
     wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
     tar xjvf ffmpeg-snapshot.tar.bz2
     cd ffmpeg
     PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
       --prefix="$HOME/ffmpeg_build" \
       --pkg-config-flags="--static" \
       --extra-cflags="-I$HOME/ffmpeg_build/include" \
       --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
       --bindir="$HOME/bin" \
       --enable-gpl \
       --enable-libass \
       --enable-libfreetype \
       --enable-libmp3lame \
       --enable-libopus \
       --enable-libtheora \
       --enable-libvorbis \
       --enable-libx264 \
       --enable-nonfree

     PATH="$HOME/bin:$PATH" make
     make install
     make distclean
     hash -r

     source ~/.profile
    }

    echo Done
    exit 0

    install-rvm.sh

    #!/usr/bin/env bash

    echo Installing RVM gpg key
    gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 --trust-model always

    echo Installing RVM
    \curl -sSL https://get.rvm.io | bash -s $1

    exit 0

    I won’t include the other scripts for the sake of brevity. When logging into vagrant with the gui nothing seems out of the ordinary, and ffmpeg is available...but nothing else is provisioned. No RVM, no Nginx, nothing.