
Recherche avancée
Autres articles (112)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains 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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (5518)
-
File conversion to mp3 returning failure everytime using flutter package ffmpeg_kit_flutter
6 novembre 2024, par Sanath baltharI 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 = [
 '-i', '$filePath/998tts.wav',
 '-c:a', 'mp3',
 '$filePath/998.mp3'
 ];

 await FFmpegKitConfig.enableLogs();
 FFmpegKitConfig.enableLogCallback((log) =>print('FFmpeg log: $log')); 
 FFmpegSession result = await FFmpegKit.executeWithArguments(command);
 dynamic resultcode = await result.getReturnCode();
 dynamic resultlogs = await result.getLogsAsString();
 // FFmpegKitConfig.setLogLevel(logLevel)
 if(ReturnCode.isSuccess(resultcode)){
 print("file saved after conversion at $filePath/998.mp3 and result : Success and logs : $resultlogs");
 }
 else{
 print("Result : failure and logs : $resultlogs");
 }

Flutter doctor output:
[√] Flutter (Channel stable, 3.19.6, on Microsoft Windows [Version 10.0.22631.3296], locale en-IN)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[!] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.5)
X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++"
workload, and include these components:
MSVC v142 - VS 2019 C++ x64/x86 build tools
- If there are multiple build tool versions available, install the latest
C++ CMake tools for Windows
Windows 10 SDK
[√] Android Studio (version 2023.2)
[√] VS Code (version 1.89.0)
[√] Connected device (3 available)
[√] Network resources

! Doctor found issues in 1 category.

</string>


Edit : Attaching error logs :


I/flutter (25865): Loading ffmpeg-kit-flutter.
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.
I/flutter (25865): Loaded ffmpeg-kit-flutter-android-audio-arm64-v8a-6.0.3.
I/flutter (25865): Result : failure and logs : ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers
I/flutter (25865): built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)

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++ --ranlib=aarch64-linux-android-ranlib --strip=aarch64-linux-android-strip --nm=aarch64-linux-android-nm --extra-libs='-L/Users/sue/Projects/arthenica/ffmpeg-kit/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --disable-autodetect --enable-cross-compile 



-
Building FFMPEG for Visual Studio development
28 juillet 2016, par gboyI’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 directoryThe following are the detailed steps I took to build ffmpeg and create my basic Visual Studio project :
============ Building ffmpeg ===============
- Downloaded and intalled msys2-x86_64-20160205.exe from http://msys2.github.io
- Ran
update-core
to update the Msys2 install - Ran
pacman -Suu
(twice) to complete the update (following the instructions about updating shortcuts, etc.) - Then I quit out of the MSys2 shell and opened the MinGW-w64 Win64 Shell. In this new shell :
- 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 - Then I cd’d into
cd /usr/local
- Ran
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
- 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
- Back in the Win64 Shell, I cd’d to this new folder :
cd /c/ffmpeg
- Then ran
/usr/loca/ffmpeg/configure --enable-shared
- Then
make -r
- 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.
- I created a new Visual C++ ’Empty Project’ in Visual Studio 2013
-
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
-
I then created a new source file called ’tut01.c’ and copied/pasted the code from http://dranger.com/ffmpeg/tutorial01.c
- 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 ?
-
Change AVI creation date with ffmpeg ?
1er novembre 2016, par brockAs far as I can tell the following ffmpeg command should copy all existing metadata in the input file to the output file and modify the specified field in the output file :
ffmpeg -i VID_20130502_220104.avi -metadata creation_time="2013-05-02 22:01:04" -codec copy VID_20130502_220104-2.avi
Instead, it seems to strip all metadata from the output file. Here is the output of a few commands. I am going nuts. I think this should work, but why is it not ?
Command to edit the creation time :
ffmpeg -i VID_20130502_220104.avi -metadata creation_time="2013-05-02 22:01:04" -codec copy VID_20130502_220104-2.avi
ffmpeg version 3.1.5 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, avi, from 'VID_20130502_220104.avi':
Metadata:
encoder :
maker : NIKON
model : COOLPIX S4300
creation_time : 2011-01-01 00:00:00
Duration: 00:01:30.50, start: 0.000000, bitrate: 32135 kb/s
Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, 31782 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, 1 channels, s16, 352 kb/s
[avi @ 000000000032ad40] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Last message repeated 1 times
Output #0, avi, to 'VID_20130502_220104-2.avi':
Metadata:
creation_time : 2013-05-02 22:01:04
maker : NIKON
model : COOLPIX S4300
ISFT : Lavf57.41.100
Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, q=2-31, 31782 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, mono, 352 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 891 fps=0.0 q=-1.0 size= 116171kB time=00:00:29.69 bitrate=32043.1kbits/s speed=59.4x
frame= 1739 fps=1739 q=-1.0 size= 227191kB time=00:00:57.96 bitrate=32107.5kbits/s speed= 58x
frame= 2609 fps=1739 q=-1.0 size= 340940kB time=00:01:26.96 bitrate=32115.9kbits/s speed= 58x
frame= 2715 fps=1734 q=-1.0 Lsize= 355018kB time=00:01:30.49 bitrate=32136.3kbits/s speed=57.8x
video:350984kB audio:3897kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.038597%Command to inspect the output file metadata with ffmpeg :
ffmpeg -i VID_20130502_220104-2.avi
ffmpeg version 3.1.5 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, avi, from 'VID_20130502_220104-2.avi':
Metadata:
encoder : Lavf57.41.100
Duration: 00:01:30.50, start: 0.000000, bitrate: 32136 kb/s
Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, 31782 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, 1 channels, s16, 352 kb/s
At least one output file must be specifiedCommand to inspect the input file metadata with exiftool :
exiftool.exe VID_20130502_220104.avi
ExifTool Version Number : 10.30
File Name : VID_20130502_220104.avi
Directory : .
File Size : 347 MB
File Modification Date/Time : 2013:05:13 16:33:52-04:00
File Access Date/Time : 2015:11:10 23:08:25-05:00
File Creation Date/Time : 2015:11:10 23:08:25-05:00
File Permissions : rw-rw-rw-
File Type : AVI
File Type Extension : avi
MIME Type : video/x-msvideo
Frame Rate : 30
Max Data Rate : 488.3 kB/s
Frame Count : 2715
Stream Count : 2
Stream Type : Video
Video Codec : mjpg
Video Frame Rate : 30
Video Frame Count : 2715
Quality : 10000
Sample Size : Variable
Image Width : 1280
Image Height : 720
Planes : 1
Bit Depth : 24
Compression : MJPG
Image Length : 2764800
Pixels Per Meter X : 0
Pixels Per Meter Y : 0
Num Colors : Use BitDepth
Num Important Colors : All
Audio Codec :
Audio Sample Rate : 22050
Audio Sample Count : 1995256
Encoding : Microsoft PCM
Num Channels : 1
Sample Rate : 22050
Avg Bytes Per Sec : 44100
Bits Per Sample : 16
Maker Note Type : NIKON
Maker Note Version : 0.1.0.0
Make : NIKON
Model : COOLPIX S4300
Software : V1.0
Equipment : NIKON DIGITAL CAMERA
Orientation : Horizontal (normal)
Exposure Time : 1/15
F Number : 3.5
Exposure Compensation : 0
Max Aperture Value : 3.2
Metering Mode : Multi-segment
Focal Length : 4.6 mm
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Date/Time Original : 2011:01:01 00:00:00
Create Date : 2011:01:01 00:00:00
Focus Mode : AF-S
Digital Zoom : 1
Color Mode : COLOR
Sharpness : AUTO
White Balance : NORMAL
Noise Reduction : OFF
Thumbnail Image : (Binary data 3082 bytes, use -b option to extract)
Aperture : 3.5
Duration : 0:01:30
Image Size : 1280x720
Megapixels : 0.922
Shutter Speed : 1/15
Focal Length : 4.6 mmCommand to inspect the output file metadata with exiftool :
exiftool.exe VID_20130502_220104-2.avi
ExifTool Version Number : 10.30
File Name : VID_20130502_220104-2.avi
Directory : .
File Size : 347 MB
File Modification Date/Time : 2016:11:01 00:17:38-04:00
File Access Date/Time : 2016:11:01 00:17:36-04:00
File Creation Date/Time : 2016:11:01 00:15:18-04:00
File Permissions : rw-rw-rw-
File Type : AVI
File Type Extension : avi
MIME Type : video/x-msvideo
Frame Rate : 30
Max Data Rate : 3923 kB/s
Frame Count : 2715
Stream Count : 2
Stream Type : Video
Video Codec : MJPG
Video Frame Rate : 30
Video Frame Count : 2715
Quality : Default
Sample Size : Variable
Image Width : 1280
Image Height : 720
Planes : 1
Bit Depth : 24
Compression : MJPG
Image Length : 2764800
Pixels Per Meter X : 0
Pixels Per Meter Y : 0
Num Colors : Use BitDepth
Num Important Colors : All
Audio Codec : .
Audio Sample Rate : 22050
Audio Sample Count : 1995256
Encoding : Microsoft PCM
Num Channels : 1
Sample Rate : 22050
Avg Bytes Per Sec : 44100
Bits Per Sample : 16
Software : Lavf57.41.100
Duration : 0:01:30
Image Size : 1280x720
Megapixels : 0.922