
Recherche avancée
Autres articles (43)
-
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 -
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 ;
-
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 (8531)
-
FFMPEG Flutter : attaching captions to a video issue
24 juillet 2024, par Aqib JavedI am working on an app where i first extract audio from a video, then transcribe it and then i wanna attach that transcribed captions or subtitles to the original video.


Everything is working smooth except the subtitles attaching part
if im running the FFMPEG command directly in terminal, it works fine but not in flutter


here is my code of attaching the subtitles to the video :


Future<void> attachCaptionsToVideo(DeepGramResponse deepGramResponse) async {
 var tempDir = await getTemporaryDirectory();

 final outputPath = "${tempDir.path}/outputWithCaptions.mp4";
 final String subtitlePath = deepGramResponse.captionsPath
 .replaceAll('\\', '\\\\')
 .replaceAll(' ', '\\ ');
 final String command =
 '-y -i ${deepGramResponse.videoPath} -vf subtitles=$subtitlePath $outputPath';
 await FFmpegKit.executeAsync(command, (session) async {
 final returnCode = await session.getReturnCode();
 final output = await session.getOutput();
 final error = await session.getFailStackTrace();

 log('FFmpeg command executed with return code: $returnCode');
 if (ReturnCode.isSuccess(returnCode)) {
 log('Captions attached successfully');
 deepGramResponse.copyWith(
 videoPath: outputPath,
 );
 Get.to(() => VideoPlayerScreen(videoPath: outputPath));
 } else {
 log('FFmpeg command failed');
 log('Error output: $output');
 log('Error details: $error');
 Fluttertoast.showToast(
 msg: 'Something went wrong, please try again later');
 }
 });
 }
</void>


here is the error im getting :




[AVFilterGraph @ 0x7b8a3f35f0] No option name near
'/data/user/0/com.example.blink/app_flutter/captions.srt'
[AVFilterGraph @ 0x7b8a3f35f0] Error parsing a filter description around :
[AVFilterGraph @ 0x7b8a3f35f0] Error parsing filterchain 'subtitles=/data/user/0/com.example.blink/app_flutter/captions.srt'
around :
Error reinitializing filters !
Failed to inject frame into filter network : Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed !




-
FFMPEG combining 2 command to make multiple overlay [closed]
11 avril 2020, par Nano WibisonoI have two different commands and both work. but here I have a problem, how to combine these two commands into one output



the first command is to add a video overlay



ffmpeg -i final.mp4 -vf "movie=LOGO.mov, scale=100: -1 [inner]; [in][inner] overlay =10: 10 [out] " completed.mp4




the second command is to add a text overlay



ffmpeg -i final.mp4 -vf drawtext="fontfile=C\\:/Windows/Fonts/arial.ttf:fontsize=20: fontcolor=red:x=10:y=50:text='test tect'" completedtextGB.mp4




I was wondering is it possible to combine these into the 1 command ?



Thanks
Nano


-
Audio async after using setpts, converting to ts and concatenating
11 janvier 2018, par Aurelius SchnitzlerI am using f.i.
ffmpeg -y -ss 00:00:09.664 -t 00:00:06.939 -i "test.mp4" -an -c:v libx264 -filter:v "setpts=0.1*PTS" test2.mp4
to speed up a video by 10.
But there is still audio in it when being used with
ffmpeg -y -i test2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts 2f.ts
and
ffmpeg -y -i "concat:2f.ts|..." -bsf:a aac_adtstoasc -movflags faststart -c copy final.mp4
later on, yet every part’s audio in the final video is async.
In some videos added with concat the video is not sped up, ie no
-filter:v "setpts=0.1*PTS"
and the audio is kept, ie no-an
as inffmpeg -y -ss 1 -t 2 -i "test3.mp4" -an -c:v libx264 test4.mp4
ffmpeg -y -i test4.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts 4f.tsHow do I mute the sped up parts and have audio not be async in the final video ?