
Recherche avancée
Médias (29)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (63)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...) -
Activation de l’inscription des visiteurs
12 avril 2011, parIl est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)
Sur d’autres sites (10138)
-
How to export a video with a widget overlay in a Flutter app ?
30 juin 2024, par Mohammed BekeleI'm developing a Flutter app for a caption embeding on a video that needs to export a video file after processing it. I'm using the flutter_ffmpeg_kit package. However, I'm having trouble getting the export to work correctly.


Here's the code I'm using :


initially this is my stack


Expanded(
 child: Stack(
 children: [
 Center(
 child: _videoPlayerController.value.isInitialized
 ? AspectRatio(
 aspectRatio:
 _videoPlayerController.value.aspectRatio,
 child: VideoPlayer(_videoPlayerController),
 )
 : CircularProgressIndicator(),
 ),
 if (_currentCaption.isNotEmpty)
 Positioned.fill(
 child: Center(child: _buildCaptionText()),
 ),
 ],
 ),
 ),



and in export button i executed this function


Future<void> _exportVideo() async {
 setState(() {
 _isProcessing = true;
 });

 try {
 final directory = await getExternalStorageDirectory();
 final rootPath = directory?.parent.parent.parent.parent.path;
 final mobixPath = path.join(rootPath!, 'Mobix App');
 final appPath = path.join(mobixPath, 'Caption');
 final outputPath = path.join(appPath, 'Output');

 // Create the directories if they don't exist
 await Directory(outputPath).create(recursive: true);

 final timestamp = DateTime.now().millisecondsSinceEpoch;
 final outputFilePath = path.join(outputPath, 'output-$timestamp.mp4');


 // Generate the FFmpeg command
 final ffmpegCommand = _generateFFmpegCommand(
 widget.videoPath,
 outputFilePath,
 widget.words,
 _fontSize,
 _isBold,
 _isItalic,
 _fontColor,
 _backgroundColor,
 );

 // Execute the FFmpeg command
 await FFmpegKit.execute(
 ffmpegCommand,
 ).then(
 (session) async {
 // Update progress if needed
 final returnCode = await session.getReturnCode();
 if (ReturnCode.isSuccess(returnCode)) {
 setState(() {
 _outputFilePath = outputFilePath;
 });
 ScaffoldMessenger.of(context).showSnackBar(
 SnackBar(content: Text('Export successful: $_outputFilePath')),
 );
 } else {
 print('Export failed with rc: $returnCode');

 ScaffoldMessenger.of(context).showSnackBar(
 SnackBar(content: Text('Export failed with rc: $returnCode')),
 );
 }
 setState(() {
 _isProcessing = false;
 });
 },
 );
 } catch (e) {
 print('Export failed: $e');
 ScaffoldMessenger.of(context).showSnackBar(
 SnackBar(content: Text('Export failed: $e')),
 );
 setState(() {
 _isProcessing = false;
 });
 }
 }

 String _generateFFmpegCommand(
 String inputPath,
 String outputPath,
 List<dynamic> words,
 double fontSize,
 bool isBold,
 bool isItalic,
 Color fontColor,
 Color backgroundColor,
 ) {
 final ffmpegCommand = StringBuffer();

 // Add input file
 ffmpegCommand.write('-i $inputPath ');

 // Add subtitles filter
 final subtitleFilter = StringBuffer();
 for (var word in words) {
 final startTime = word['startTime'].toDouble();
 final endTime = word['endTime'].toDouble();
 final caption = word['word'];

 final fontStyle = isBold && isItalic
 ? 'bold italic'
 : isBold
 ? 'bold'
 : isItalic
 ? 'italic'
 : 'normal';
 final fontColorHex = fontColor.value.toRadixString(16).substring(2);
 final backgroundColorHex =
 backgroundColor.value.toRadixString(16).substring(2);

 subtitleFilter.write(
 "drawtext=text='$caption':x=(w-tw)/2:y=h-(2*lh):fontcolor=$fontColorHex:fontsize=$fontSize:fontStyle=$fontStyle:box=1:boxcolor=$backgroundColorHex@0.5:boxborderw=5:enable='between(t,$startTime,$endTime)',");
 }
 ffmpegCommand.write('-vf "${subtitleFilter.toString()}" ');

 // Add output file
 ffmpegCommand.write('$outputPath');

 return ffmpegCommand.toString();
 }
</dynamic></void>


when i run this it returns ReturnCode 1. what am i doing wrong ?


-
Using FFMPEG to automatically set a single max filesize across multiple different sized files
14 juin 2020, par DuffCreeperI don't really know how to word it any better but I'm trying to convert WEBM/GIF to MP4 with no sound



The problem I'm facing is retaining the quality without having to sacrifice it across multiple files by having to resize them to 420p



The idea was to hopefully somehow get FFMPEG to automatically determine the bitrate required for the file to hit the filesize of 10mb. Though I have looked everywhere online and I have not found a single answer regarding it, so either it's not possible or I'm blind


-
FFMPEG AMF Hardware Acceleration on AMD Ryzen™ 7 7700 Server in Ubuntu 22.04 [closed]
4 décembre 2024, par LoNormalyI was trying to make ffmpeg available with AMF and have access to the AMF hardware acceleration (in
ffmpeg -hwaccels
) but failed.

At first, the kernel that the server as Ubuntu 22.04 came with was 5.15 and after contacting support I was explained that I need to upgrade the kernel to have access to /dev/dri.


So I upgraded to 6.8 and then I had access to /dev/dri and was able to use ffmpeg 7.1 with vaapi working.


In AMD, they have their own hardware acceleration named AMF, that allows much better speed and quality of transcoding.


I installed the AMD GPU drivers like it's explained here : https://www.amd.com/en/support/download/linux-drivers.html


I installed AMF as well, and compiled my own ffmpeg build with
--enable-amf
flag.

Still in ffmpeg -hwaccels I get access to vaapi and drm only.


Can you share if you know any solution to this enigma ?


These are the instructions with which I installed the drivers, AMF and ffmpeg with :


Install AMD GPU Pro Drivers:
wget https://repo.radeon.com/amdgpu-install…60203-1_all.deb
sudo apt install ./amdgpu-install_6.2.60203-1_all.deb

amdgpu-install --usecase=amf,multimedia -y
sudo amdgpu-install -y --usecase=amf,graphics --accept-eula --opencl=rocr,legacy --vulkan=amdvlk,pro



CompilationGuide/Ubuntu – FFmpeg
Compiling ffmpeg:

sudo apt-get update -qq && sudo apt-get -y install \
autoconf \
automake \
build-essential \
cmake \
git-core \
libass-dev \
libfreetype6-dev \
libgnutls28-dev \
libmp3lame-dev \
libtool \
libvorbis-dev \
meson \
ninja-build \
pkg-config \
texinfo \
wget \
yasm \
zlib1g-dev

sudo apt install libunistring-dev libaom-dev libdav1d-dev -y

mkdir -p ~/ffmpeg_sources ~/bin

// Install prerequisites
apt-get update && apt-get install -y \
build-essential \
pkg-config \
yasm \
nasm \
libtool \
automake \
cmake \
libx264-dev \
libx265-dev \
libvpx-dev \
libfdk-aac-dev \
libopus-dev \
libaom-dev \
libdrm-dev \
libva-dev \
vainfo
 
 
cd ~/ffmpeg_sources && \
wget https://ffmpeg.org/releases/ffmpeg-7.1.tar.bz2 && \
tar -xjf ffmpeg-7.1.tar.bz2 && \
mkdir ffmpeg_build && \
cd ffmpeg_build && \
mkdir include && \
cd include && \


// Install AMF
git clone https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git && \
mv ~/ffmpeg_build/include/AMF/amf ~/ffmpeg_build/include/ && \
rm -rf AMF && \

// From here: https://askubuntu.com/questions/1440…-ubuntu-20-04-5
// Correct install:
cd ~/
git clone https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git
mkdir /usr/local/include/AMF
cd /usr/local/include/AMF
ln -sf ~/AMF/amf/public/include/core
ln -sf ~/AMF/amf/public/include/components

// Install libvmaf
cd ~/ffmpeg_sources && \
wget https://github.com/Netflix/vmaf/archive/v3.0.0.tar.gz && \
tar xvf v3.0.0.tar.gz && \
mkdir -p vmaf-3.0.0/libvmaf/build && \

cd vmaf-3.0.0/libvmaf && \
meson setup build --buildtype=release --default-library=static --prefix="$HOME/ffmpeg_build" && \
ninja -C build && \
ninja -C build install

cd ~/ffmpeg_sources/ffmpeg-7.1
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" \
--extra-libs="-lpthread -lm" \
--ld="g++" \
--bindir="$HOME/bin" \
--enable-gpl \
--enable-gnutls \
--enable-libaom \
--enable-libass \
--enable-libfdk-aac \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libdav1d \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--enable-libdrm \
--enable-vaapi \
--enable-libvmaf \
--enable-amf \
--enable-nonfree && \
PATH="$HOME/bin:$PATH" make && \
make -j$(nproc) install && \
hash -r


./ffmpeg -buildconf



Test VMAF to compare quality:
./ffmpeg -i input.mp4 -i reference.mp4 -lavfi libvmaf -f null -
// example output: [Parsed_libvmaf_0 @ 0x74a0f8004940] VMAF score: 98.930249ate=N/A speed=9.06x