
Recherche avancée
Autres articles (81)
-
Les images
15 mai 2013 -
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
Sur d’autres sites (7173)
-
Image overlay on video between two time using mobile-ffmpeg android
8 mars 2021, par Saeid HonardanI am trying to add image overlay on video using "mobile-ffmpeg-full-gpl:4.4" library but faced following error :


Error when evaluating the expression 'between(t' for enable' error.



I have a class that create overlay filter for adding image :


class ImageFilter {

static String getFilter(String input, String output, ArrayList<extratl> listImage, int order){
 String filter="";
 for (int i=0; icode></extratl>


FFMPEG Command used :


-loop 1 -i /storage/emulated/0/OP_Video_Editor/.temp/background.png -ss 0.0 -t 21.18 -i /storage/emulated/0/OP_Video_Editor/.temp/1614097633623.mp4 -i /storage/emulated/0/OP_Video_Editor/.resource/sticker_i02.png -filter_complex [1:v]crop=640:360:0:0[crop];[crop]scale=1280:720[v_scale];color=black:1280x720,fps=30[bgr0];[bgr0][0:v]overlay[bgr];[bgr][v_scale]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:shortest=1[v1];[1:a]aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo,volume=1.0[a1];[v1][a1]concat=n=1:v=1:a=1[v][a];[a]aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo,volume=1.0[a0];[a0]amix=inputs=1:duration=longest:dropout_transition=1[outAudio];[2:v]scale=333:333,rotate=-0.0:c=none:ow=rotw(-0.0):oh=roth(-0.0)[ov2];[v][ov2]overlay=333.33334:333.33334:enable='between(t,0.0,10.0)'[inText] -map [inText] -map [outAudio] -format yuva420p -preset ultrafast -video_track_timescale 90k -b:v 2000k -c:v libx264 -bufsize 64k -c:a aac -bsf aac_adtstoasc -strict -2 -y /storage/emulated/0/videoExport/videoplayback_22_21_28_18_44_10.mp4 



Also my log when I run program is :


'2021-03-03 17:26:32.165 11664-11830/com.hecorat.azplugin2 E/mobile-ffmpeg: [overlay @ 0xdc5f3b80] [Eval @ 0xc5bd6b70] Missing ")" or too many args in "between(t"

2021-03-03 17:26:32.167 11664-11830/com.hecorat.azplugin2 E/mobile-ffmpeg: [overlay @ 0xdc5f3b80] Error when evaluating the expression "between(t" for enable'



How can I resolve this error ?


-
Splitting the videos per every 8 seconds using FFMpeg in android
4 mai 2017, par Anil kumarHi i am trying to splitting the videos files per every 8 seconds using FFMpeg,I am using below code for this
but when i run my code i am getting exception like No such file or DictionaryWhere did i do mistack can some one suggest me please
code :
public void getSplitCommand(String inputFileUrl, String outputFileUrl) {
inputFileUrl= /storage/emulated/0/1492848702.mp4;
outputFileUrl= /storage/emulated/0/1492848702.mp4;
;
String cmd[] = new String[]{"-i ",inputFileUrl+" ","-c ","copy ","-map ","0 ",
"-segment_time ","8 ","-f ","segment/sdcard/Download/output%03d.mp4"};
executeBinaryCommand(fFmpeg, cmd);
}
/**
* executeBinaryCommand
*
* @param ffmpeg
* @param command
*/
public void executeBinaryCommand(FFmpeg ffmpeg, String[] command) {
try {
if (ffmpeg != null) {
ffmpeg.execute(command,
new ExecuteBinaryResponseHandler() {
@Override
public void onFailure(String response) {
System.out.println("failure====>" + response.toString());
}
@Override
public void onSuccess(String response) {
System.out.println("resposense====>" + response.toString());
}
@Override
public void onProgress(String response) {
System.out.println("on progress");
}
@Override
public void onStart() {
System.out.println("start");
}
@Override
public void onFinish() {
System.out.println("Finish");
}
});
}
} catch (FFmpegCommandAlreadyRunningException exception) {
exception.printStackTrace();
}
} -
How to add text on a video using FFMPEG in android
19 juin 2014, par Divya MotiwalaI am trying to add text to the video but not getting the syntax right.
I am forming the command as a string (given below) :String concatePath = "data/data/"+ this.getPackageName() +"/cache/ffmpeg" + " -y -i " +
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM)+"/Camera/wildlife.mp4 -vf " +
"drawtext=fontfile=/system/fonts/DroidSans.ttf\\: text='this' \\:x=(w-text_w)/2\\:y=H-60 \\:fontcolor=white \\:box=1 -y "
+ Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC)+"/test/output_text.mp4";So the command that gets executed is :
data/data/com.example.videomerger/cache/ffmpeg -y -i /storage/emulated/0/DCIM/Camera/wildlife.mp4 -vf drawtext=fontfile=/system/fonts/DroidSans.ttf\: text='this' \:x=(w-text_w)/2\:y=H-60 \:fontcolor=white \:box=1 -y /storage/emulated/0/Music/test/output_text.mp4
It is giving the error :
Unable to find a suitable output format for ’text=’this’’
, text=’this’ : Invalid argumentHow to solve it ?
Update : I could add text to the video but it takes only single words. When i give space for multi words, it considers it as an invalid argument ! How can i add space to it ?