
Recherche avancée
Médias (3)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (59)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
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 -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (12661)
-
App review video ( App Store )
23 août 2016, par Arnold MappsI want to convert a video recorded with Quick Time ( resolution 750*1334 ) to 1080*1920.
Apple only accept resolution 1080*1920p for iphone6PLUS for App review video.My license key with final cut pro X has expired and
ffmpeg -i AppPreviewIphone6.mp4 -vf scale=1080:1920 AppPreviewIphone6PLUS.mp4 give me a resolution of 1079*1920 instead 1080*1920Have you an idea what software I can use to change video resolution ?
-
Flutter : How to use "ffmpeg_kit_flutter" to merge videos ?
28 mai 2024, par Hani Kanakrii am using "ffmpeg_kit_flutter" to merge two videos with code



import 'dart:io';

import 'package:ffmpeg_kit_flutter/ffmpeg_kit.dart';
import 'package:ffmpeg_kit_flutter/abstract_session.dart';
import 'package:ffmpeg_kit_flutter/return_code.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:wechat_assets_picker/wechat_assets_picker.dart';

import '/features/merge_videos/cubit/merge_videos_state.dart';

class MergeVideosCubit extends Cubit<mergevideosstate> {
 MergeVideosCubit(this.originalFile) : super(InitialMergeVideos());
 final File? originalFile;

 Future<void> selectVideo(BuildContext context) async {
 final List<assetentity>? videos = await AssetPicker.pickAssets(
 context,
 pickerConfig: const AssetPickerConfig(requestType: RequestType.video),
 );

 if (videos != null && videos.isNotEmpty) {
 for (AssetEntity asset in videos) {
 File? videoFile = await asset.file;
 if (videoFile != null) {
 print('Selected Asset Path: ${videoFile.path}');
 mergeVideos(originalFile!.path, videoFile.path);
 }
 }
 }
 }

 Future<void> mergeVideos(String inputPath1, String inputPath2) async {
 final String outputPath = "/storage/emulated/0/merged_video_${now()}.mp4";
 // final String command =
 // '-i $inputPath1 -i $inputPath2 -filter_complex "[0:v][0:a][1:v][1:a] concat=n=2:v=1:a=1[outv][outa]" -map "[outv]" -map "[outa]" -y $outputPath';
 final String command =
 '-i $inputPath1 -i $inputPath2 -filter_complex "[0:v][1:v]concat=n=2:v=1:a=0[outv]" -map "[outv]" -y $outputPath';
 print("FFmpeg process starting with command: $command");
 print(command);
 print("LOADING LOADING LOADING LOADING LOADING LOADING LOADING MERGE");
 emit(LoadMergeVideos());
 await FFmpegKit.execute(command).then((value) async {
 await value.getDuration();
 var id = await value.getSessionId();

 print(value);
 print(id);
 print(await value.getDuration());
 });
 await FFmpegKit.executeAsync(command, (session) async {
 final returnCode = await session.getReturnCode();
 await session.getSessionId();
 print(await session.getSessionId());

 if (ReturnCode.isSuccess(returnCode)) {
 print("SUCCESS: Video merged successfully at $outputPath");
 print("SUCCESS SUCCESS SUCCESS SUCCESS SUCCESS SUCCESS MERGE");
 emit(SuccessMergeVideos());

 } else if (ReturnCode.isCancel(returnCode)) {
 print("CANCELLED: Video merging was cancelled.");
 print("CANCEL CANCEL CANCEL CANCEL CANCEL CANCEL CANCEL MERGE");
 emit(CancelMergeVideos());

 } else {
 print("ERROR: Failed to merge videos.");
 print("ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR MERGE");
 emit(ErrorMergeVideos());

 final failLog = await session.getFailStackTrace();

 print("FFmpeg Failure Log: $failLog");
 }
 });
 }

 String now() {
 final DateTime now = DateTime.now();
 return "${now.year}${now.month}${now.day}_${now.hour}${now.minute}${now.second}";
 }
}
</void></assetentity></void></mergevideosstate>


The console when i run the code



D/EGL_emulation(23858): app_time_stats: avg=2379.66ms min=5.87ms max=23160.09ms count=10
I/PhotoManager(23858): uri: content://media/external/file
I/PhotoManager(23858): projection: _display_name, _data, _id, title, bucket_id, bucket_display_name, width, height, orientation, date_added, date_modified, mime_type, datetaken, duration, media_type, relative_path
I/PhotoManager(23858): selection: _id = ?
I/PhotoManager(23858): selectionArgs: 1000000039
I/PhotoManager(23858): sortOrder: null
I/PhotoManager(23858): sql: _id = 1000000039
I/PhotoManager(23858): cursor count: 1
I/flutter (23858): Selected Asset Path: /storage/emulated/0/Movies/VID_20240512_115116.mp4
I/flutter (23858): FFmpeg process starting with command: -i /storage/emulated/0/Movies/VID_20240512_115128.mp4 -i /storage/emulated/0/Movies/VID_20240512_115116.mp4 -filter_complex "[0:v][1:v]concat=n=2:v=1:a=0[outv]" -map "[outv]" -y /storage/emulated/0/merged_video_2024513_122719.mp4
I/flutter (23858): -i /storage/emulated/0/Movies/VID_20240512_115128.mp4 -i /storage/emulated/0/Movies/VID_20240512_115116.mp4 -filter_complex "[0:v][1:v]concat=n=2:v=1:a=0[outv]" -map "[outv]" -y /storage/emulated/0/merged_video_2024513_122719.mp4
I/flutter (23858): LOADING LOADING LOADING LOADING LOADING LOADING LOADING MERGE
I/flutter (23858): Instance of 'FFmpegSession'
I/flutter (23858): 1
I/flutter (23858): 246
I/flutter (23858): 2
I/flutter (23858): ERROR: Failed to merge videos.
I/flutter (23858): ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR MERGE
D/EGL_emulation(23858): app_time_stats: avg=87.27ms min=4.92ms max=319.92ms count=13
I/flutter (23858): FFmpeg Failure Log: null



In "mergeVideos" function the "returnCode" it return value "1" when i look in the package code


getState() async {
 try {
 return _platform
 .abstractSessionGetState(this.getSessionId())
 .then((state) {
 switch (state) {
 case 0:
 return SessionState.created;
 case 1:
 return SessionState.running;
 case 2:
 return SessionState.failed;
 case 3:
 default:
 return SessionState.completed;
 }
 });
 } on PlatformException catch (e, stack) {
 print("Plugin getState error: ${e.message}");
 return Future.error("getState failed.", stack);
 }
}



Which mean its keep running but in my code it does not wait until complete merging


how can i fix that ??!


but i think my problem is in command(concat)



-i /storage/emulated/0/Movies/VID_20240512_115128.mp4 -i /storage/emulated/0/Movies/VID_20240512_115116.mp4 -filter_complex "[0:v][1:v]concat=n=2:v=1:a=0[outv]" -map "[outv]" -y /storage/emulated/0/merged_video_2024513_122719.mp4



(This is my command when i run the code) ??


-
FFMpeg or other how to add dynamic text into video stream
17 février 2017, par FergusonI’am looking for a solution on how to add some dynamic text into the video stream. For example I have a underwater webcam (IP cam) and now I want to add information about measured temperature and salinity into video stream (as text). The final result must be a video stream with temp and salinity displayed in video.
For this project I’am using OrangePI pc with Armbian OS.
Can it be done with FFMpeg or is there some other option ?Regards
Ferguson