Recherche avancée

Médias (0)

Mot : - Tags -/signalement

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (17)

  • ANNEXE : Les extensions, plugins SPIP des canaux

    11 février 2010, par

    Un plugin est un ajout fonctionnel au noyau principal de SPIP. MediaSPIP consiste en un choix délibéré de plugins existant ou pas auparavant dans la communauté SPIP, qui ont pour certains nécessité soit leur création de A à Z, soit des ajouts de fonctionnalités.
    Les extensions que MediaSPIP nécessite pour fonctionner
    Depuis la version 2.1.0, SPIP permet d’ajouter des plugins dans le répertoire extensions/.
    Les "extensions" ne sont ni plus ni moins que des plugins dont la particularité est qu’ils se (...)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (5818)

  • File conversion to mp3 returning failure everytime using flutter package ffmpeg_kit_flutter

    6 novembre 2024, par Sanath balthar

    I am trying to convert a .wav audio file generated from a flutter's text to speech package - "flutter_tts" to mp3 file but it is failing everytime.
I have written the below code for file conversion. I have imported the package ffmpeg_kit_flutter. It doesnt even show why the conversion is failing.
I have looked up in stackoverflow and other sites but could not find any relevant solutions. I am using vscode as editor. I have attached flutter doctor output below as well. Could anyone please guide me ? Let me know if you need more information.

    


    List<string> command = [&#xA;              &#x27;-i&#x27;, &#x27;$filePath/998tts.wav&#x27;,&#xA;              &#x27;-c:a&#x27;, &#x27;mp3&#x27;,&#xA;              &#x27;$filePath/998.mp3&#x27;&#xA;            ];&#xA;&#xA; await FFmpegKitConfig.enableLogs();&#xA;            FFmpegKitConfig.enableLogCallback((log) =>print(&#x27;FFmpeg log: $log&#x27;));        &#xA;          FFmpegSession result = await FFmpegKit.executeWithArguments(command);&#xA;          dynamic resultcode = await result.getReturnCode();&#xA;          dynamic resultlogs = await result.getLogsAsString();&#xA;          // FFmpegKitConfig.setLogLevel(logLevel)&#xA;          if(ReturnCode.isSuccess(resultcode)){&#xA;          print("file saved after conversion at $filePath/998.mp3 and result : Success and logs : $resultlogs");&#xA;          }&#xA;          else{&#xA;            print("Result : failure and logs : $resultlogs");&#xA;          }&#xA;&#xA;Flutter doctor output:&#xA;[√] Flutter (Channel stable, 3.19.6, on Microsoft Windows [Version 10.0.22631.3296], locale en-IN)&#xA;[√] Windows Version (Installed version of Windows is version 10 or higher)&#xA;[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)&#xA;[√] Chrome - develop for the web&#xA;[!] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.5)&#xA;X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C&#x2B;&#x2B;"&#xA;workload, and include these components:&#xA;MSVC v142 - VS 2019 C&#x2B;&#x2B; x64/x86 build tools&#xA;- If there are multiple build tool versions available, install the latest&#xA;C&#x2B;&#x2B; CMake tools for Windows&#xA;Windows 10 SDK&#xA;[√] Android Studio (version 2023.2)&#xA;[√] VS Code (version 1.89.0)&#xA;[√] Connected device (3 available)&#xA;[√] Network resources&#xA;&#xA;! Doctor found issues in 1 category.&#xA;&#xA;</string>

    &#xA;

    Edit : Attaching error logs :

    &#xA;

    I/flutter (25865): Loading ffmpeg-kit-flutter.&#xA;D/ffmpeg-kit-flutter(25865): FFmpegKitFlutterPlugin com.arthenica.ffmpegkit.flutter.FFmpegKitFlutterPlugin@a5d9788 started listening to events on io.flutter.plugin.common.EventChannel$IncomingStreamRequestHandler$EventSinkImplementation@4cfb5f2.&#xA;I/flutter (25865): Loaded ffmpeg-kit-flutter-android-audio-arm64-v8a-6.0.3.&#xA;I/flutter (25865): Result : failure and logs : ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers&#xA;I/flutter (25865):   built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)&#xA;&#xA;I/flutter (25865):   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 &#xA;

    &#xA;

  • Building FFMPEG for Visual Studio development

    28 juillet 2016, par gboy

    I’m trying to use ffmpeg in Visual Studio 2013 C++ software (ultimately as part of an OpenCV project) - but right now I’m just trying to get basic FFMPEG functionality. In general, when building in Visual Studio, I build 64—bit software with Multi-threaded DLL runtime libraries. I have built ffmpeg using the general instructions for ’Native Windows compilation using ... MinGW-w64’ at http://ffmpeg.org/platform.html#Windows (I provide a more detailed set of steps I followed below...).

    After building the ffmpeg software on my system, I tried to create a simple ’hello world’ project in Visual Studio 2013. Specifically, I tried to implement the initial tutorial file presented at http://dranger.com/ffmpeg/tutorial01.html. Upon building the project, I get the error :

    c :\msys64\usr\local\ffmpeg\libavutil\common.h(45) : fatal error C1083 : Cannot
    open include file : ’libavutil/avconfig.h’ : No such file or directory

    The following are the detailed steps I took to build ffmpeg and create my basic Visual Studio project :

    ============ Building ffmpeg ===============

    1. Downloaded and intalled msys2-x86_64-20160205.exe from http://msys2.github.io
    2. Ran update-core to update the Msys2 install
    3. Ran pacman -Suu (twice) to complete the update (following the instructions about updating shortcuts, etc.)
    4. Then I quit out of the MSys2 shell and opened the MinGW-w64 Win64 Shell. In this new shell :
    5. Installed the following packages using pacman -S The list of packages I installed is : make, pkg-config, diffutils, mingw-w64-x86_64-yasm, mingw-w64-x86_64-gcc, mingw-w64-x86_64-SDL, git
    6. Then I cd’d into cd /usr/local
    7. Ran git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
    8. I wanted to build the ffmpeg library ’out-of-tree’ of this MSys64 folder. So, in the regular file system of my Windows machine I created a folder at C :\ffmpeg
    9. Back in the Win64 Shell, I cd’d to this new folder : cd /c/ffmpeg
    10. Then ran /usr/loca/ffmpeg/configure --enable-shared
    11. Then make -r
    12. And, finally make install

    Now, if I had to guess, my ’flaw’ was in the options I used when calling the ’configure’ script of ffmpeg. Do I need to use particular options so that I can take the ffmpeg libraries built here and use them as dynamic (DLL) libraries in Visual Studio ?

    ========== Configuring my Visual Studio Project ============

    Here’s how I created a simple hello world project in Visual Studio to see if ffmpeg is working.

    1. I created a new Visual C++ ’Empty Project’ in Visual Studio 2013
    2. I then configured the project properties as follows :

      a. In C/C++ => General => Additional Include Directories, I put

      C :\msys64\usr\local\ffmpeg

      b. In Linker=>General => Additional Library Directories, I pointed to each of the built library folders (basically I pointed at all of the libraries that were built to ensure I was not inadvertently missing the critical one). The list is as follows :

      • C :\ffmpeg\libavcodec
      • C :\ffmpeg\libavdevice
      • C :\ffmpeg\libavfilter
      • C :\ffmpeg\libavformat
      • C :\ffmpeg\libavutil
      • C :\ffmpeg\libswresample
      • C :\ffmpeg\libswscale
      • C :\ffmpeg

      c. In Linker=> Input => Additional Dependencies, I pointed to the particular libraries (again - I pointed to all of the ones present). The list is :

      • avcodec.lib
      • avdevice.lib
      • avfilter.lib
      • avformat.lib
      • avutil.lib
      • swresample.lib
      • swscale.lib
    3. I then created a new source file called ’tut01.c’ and copied/pasted the code from http://dranger.com/ffmpeg/tutorial01.c

    4. Then hit F7 and got the error specified above about not finding avconfig.h

    The above is my best guess as to the steps I need to follow to get this working in Windows (btw, it’s Windows 10, 64-bit) & Microsoft Visual Studio 2013. What should I change to get this basic program to build and run ?

  • Failed to execute : 0x80070057, when decoding video via ffmpeg with dxva2

    25 mars 2019, par CD83

    I have successfully implemented a video player using ffmpeg. I am now trying to use hardware decoding but I’m facing a couple issues.
    I found a post that I followed as a starting point here : https://ffmpeg.org/pipermail/libav-user/2014-August/007323.html

    I have updated the code that setup the necessary stuff for the decoder. The updated code is available here : https://drive.google.com/file/d/0B5ufHdoDzA4ieVk5UVpxcDNzRHc/view?usp=sharing

    And this is how I’m using it to initialize the decoder :

    // Prepare the decoding context
    AVCodec *codec = nullptr;
    _codecContext = _avFormatContext->streams[_streamIndex]->codec;
    if ((codec = avcodec_find_decoder(_codecContext->codec_id)) == 0)
    {
       std::cout &lt;&lt; "Unsupported video codec!" &lt;&lt; std::endl;
       return false;
    }

    _codecContext->thread_count = 1;  // Multithreading is apparently not compatible with hardware decoding
    InputStream *ist = new InputStream();
    ist->hwaccel_id = HWACCEL_AUTO;
    ist->hwaccel_device = "dxva2";
    ist->dec = codec;
    ist->dec_ctx = _codecContext;
    _codecContext->coded_width = _width;
    _codecContext->coded_height = _height;

    _codecContext->opaque = ist;
    dxva2_init(_codecContext);

    _codecContext->get_buffer2 = ist->hwaccel_get_buffer;
    _codecContext->get_format = GetHwFormat;
    _codecContext->thread_safe_callbacks = 1;

    if (avcodec_open2(_codecContext, codec, nullptr) &lt; 0)
    {
       std::cout &lt;&lt; "Video codec open error" &lt;&lt; std::endl;
       return false;
    }

    And here is the definition of GetHwFormat referenced above :

    AVPixelFormat GetHwFormat(AVCodecContext *s, const AVPixelFormat *pix_fmts)
    {
       InputStream* ist = (InputStream*)s->opaque;
       ist->active_hwaccel_id = HWACCEL_DXVA2;
       ist->hwaccel_pix_fmt = AV_PIX_FMT_DXVA2_VLD;
       return ist->hwaccel_pix_fmt;
    }

    When I open an mp4 (encoded in h264) video that is HD resolution or less, everything seems to be working fine. However, as soon as I try higher resolution videos like 3840x2160, I get the following errors repeatedly :

    Failed to execute: 0x80070057
    Hardware accelerator failed to decode picture

    I also start getting the following errors after a few seconds :

    co located POCs unavailable

    And the video is not displayed properly : I get a lot of artifacts all over the video and it is lagging. I checked the first error in the ffmpeg source code. It seems that IDirectXVideoDecoder_Execute fails because of an invalid parameter. Since this is happening withing ffmpeg, there must be something that I’m missing but I can’t figure out what. The only relevant post that I found with this error was because of multithreading but I set the thread_count to 1 before opening the codec.

    This issue is happening on my main computer which has the following specs :

    • i7-4790 CPU @ 3.6GHz
    • RAM 16 GB
    • Intel HD Graphics 4600
    • Windows 8.1

    The same issue is not happening on my second computer which has the following specs :

    • i7 4510U @ 2GHz
    • RAM 8 GB
    • NVIDIA GeForce GTX 750Ti
    • Windows 10

    If I use DXVAChecker on my main computer, it says that my graphics card supports DXVA2 for H264_VLD_*, and I can see that the calls to the Microsoft API are being made (DXVA2_DecodeDeviceCreated, DXVA2_DecodeDeviceBeginFrame, DXVA2_DecodeDeviceGetBuffer, DXVA2_DecodeDeviceExecute, DXVA2_DecodeDeviceEndFrame) while my video is playing.

    I also don’t see any increase of GPU usage (on either computer) between the version with hardware decoding and the version without ; however, I do see a decrease in CPU usage (not as much as I was expecting though). This is also very strange.

    Note that I tried both the Windows release available on the FFmpeg website, and a version that I compiled with —enable-dxva2. I have searched a lot already but I was unable to find what I’m doing wrong.

    Hopefully, someone can help me, or maybe point me to a better example ?