
Recherche avancée
Autres articles (36)
-
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users.
Sur d’autres sites (6710)
-
Android ffmpeg command shows java.io.IOException : Error running exec()
26 mai 2023, par JamalI would like to use
ffmpeg
binary executable in my Android project.for this purpose I have used pre built ffmpeg Android binary from this(https://github.com/hiteshsondhi88/ffmpeg-android/releases/download/v0.3.3/prebuilt-binaries.zip) link.


As per procedure I have to place the
executable
file into/data/data/com.example.rampedsample
directory, herecom.example.rampedsample
is my project packageName.I couldn't find this location in my device as it is un rooted.So I pasted that executable intoAndroid emulator
'scom.example.rampedsample
directory usingDDMS
perspective.


In my Activity used the below code



try {
 Process p = Runtime.getRuntime().exec("/data/data/com.example.rampedsample/ffmpeg "+Environment.getExternalStorageDirectory()+"/Movies/ramp_video.mp4"
 +" -map 0:v -codec copy "+Environment.getExternalStorageDirectory()+"/Movies/ramp_video2.mp4");


 } catch (IOException e) {
 // TODO Auto-generated catch block
 e.printStackTrace();
 }




AndroidManifest permission








error



04-13 16:59:55.314: W/System.err(11387): java.io.IOException: Error running exec(). Command: [/data/data/com.example.rampedsample/ffmpeg, /mnt/sdcard/Movies/ramp_video.mp4, -map, 0:v, -codec, copy, /mnt/sdcard/Movies/ramp_video2.mp4] Working Directory: null Environment: null
04-13 16:59:55.314: W/System.err(11387): at java.lang.ProcessManager.exec(ProcessManager.java:211)
04-13 16:59:55.355: W/System.err(11387): at java.lang.Runtime.exec(Runtime.java:168)
04-13 16:59:55.355: W/System.err(11387): at java.lang.Runtime.exec(Runtime.java:241)
04-13 16:59:55.355: W/System.err(11387): at java.lang.Runtime.exec(Runtime.java:184)
04-13 16:59:55.355: W/System.err(11387): at com.example.rampedsample.MainActivity.onCreate(MainActivity.java:18)
04-13 16:59:55.355: W/System.err(11387): at android.app.Activity.performCreate(Activity.java:5008)
04-13 16:59:55.355: W/System.err(11387): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)



-
How to install JavaCV on Android and use FrameGrabber
16 mars 2023, par MarkCould someone tell me where I'm doing wrong ? These are the steps that I have followed :


- 

-
Downloaded the adt-bundle-windows from android developer website


-
Created a new project and a libs/armeabi folder


-
Extract all the *.so files from javacv-android-arm.jar, opencv-2.4.3-android-arm.zip, and ffmpeg-1.0-android-arm.zip directly into the newly created "libs/armeabi" folder, without creating any new subdirectories.


(A part that I don't understand is "Extract all the *.so files from javacv-android-arm.jar", I simply inserted the javacv-android-arm.jar file inside libs/armeabi folder)


-
Navigated to Project > Properties > Java Build Path > Libraries and click "Add JARs...".


-
Selected both javacpp.jar and javacv.jar from the newly created "libs" folder.














After that I have downloaded OpenCV2.4.3 from here and ffmpeg from here and extracted the files on my C :/ root.
Finally after setting my system path...,


C:\opencv\build\x64\vc10\bin;C:\ffmpeg-64\bin;C:\Program Files\Java\jdk1.7.0_10\bin



...if I try to use simply FrameGrabber in my Android application...


import com.googlecode.javacv.FFmpegFrameGrabber;
import com.googlecode.javacpp.Loader;
import com.googlecode.javacv.*;
import com.googlecode.javacv.cpp.*;
import static com.googlecode.javacv.cpp.opencv_core.*;
import static com.googlecode.javacv.cpp.opencv_imgproc.*;
import static com.googlecode.javacv.cpp.opencv_calib3d.*;
import static com.googlecode.javacv.cpp.opencv_objdetect.*;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;

public class MainActivity extends Activity {

 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_main);
 
 FFmpegFrameGrabber i = new FFmpegFrameGrabber("/mnt/sdcard/SinglePerson.avi"); 
 }



...I get the following errors :


01-29 17:59:26.976: E/AndroidRuntime(30656): FATAL EXCEPTION: main
01-29 17:59:26.976: E/AndroidRuntime(30656): java.lang.NoClassDefFoundError: com.googlecode.javacv.FFmpegFrameGrabber
01-29 17:59:26.976: E/AndroidRuntime(30656): at com.example.xxxxxxxxx.MainActivity.onCreate(MainActivity.java:23)
01-29 17:59:26.976: E/AndroidRuntime(30656): at android.app.Activity.performCreate(Activity.java:4465)
01-29 17:59:26.976: E/AndroidRuntime(30656): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
01-29 17:59:26.976: E/AndroidRuntime(30656): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
01-29 17:59:26.976: E/AndroidRuntime(30656): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
01-29 17:59:26.976: E/AndroidRuntime(30656): at android.app.ActivityThread.access$600(ActivityThread.java:123)
01-29 17:59:26.976: E/AndroidRuntime(30656): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
01-29 17:59:26.976: E/AndroidRuntime(30656): at android.os.Handler.dispatchMessage(Handler.java:99)
01-29 17:59:26.976: E/AndroidRuntime(30656): at android.os.Looper.loop(Looper.java:137)
01-29 17:59:26.976: E/AndroidRuntime(30656): at android.app.ActivityThread.main(ActivityThread.java:4424)
01-29 17:59:26.976: E/AndroidRuntime(30656): at java.lang.reflect.Method.invokeNative(Native Method)
01-29 17:59:26.976: E/AndroidRuntime(30656): at java.lang.reflect.Method.invoke(Method.java:511)
01-29 17:59:26.976: E/AndroidRuntime(30656): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
01-29 17:59:26.976: E/AndroidRuntime(30656): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
01-29 17:59:26.976: E/AndroidRuntime(30656): at dalvik.system.NativeStart.main(Native Method)



Someone can help me please ?


-
-
ffmpeg :how to apply animation in multiple images that will me merged in a video template in android
1er mars 2023, par Pavan GhanateI am trying to merge number of selected images from gallery to a video template in order to make video status or short video in a android app, I am able to merge the selected images in the video using below cammand now i want to add animation


ArrayList<string> cmd2 = new ArrayList<>();
 cmd2.add("-y");
 cmd2.add("-i");
 if (video_temp_path!= null){
 cmd2.add(video_temp_path);
 }else {
 cmd2.add(Environment.getExternalStorageDirectory().getPath()
 + "/Download/happy.mp4");
 }


 for (int no = 0; no < paths.length; no++) {
 cmd2.add("-i");

 cmd2.add(paths[no]);

 }

 cmd2.add("-filter_complex");



 cmd2.add("[0][1]overlay=x=100:y=200:enable='between(t,3,8)'[v1];" +
 "[v1][2]overlay=x=100:y=200:enable='between(t,10,15)'[v2];" +
 "[v2][3]overlay=x=100:y=200:enable='gt(t,17)'[v3]");
 cmd2.add("-map");
 cmd2.add("[v3]");
 cmd2.add("-map");
 cmd2.add( "0:a");
 cmd2.add(Environment.getExternalStorageDirectory().getPath()
 + "/Download/output.mp4");
</string>


but now i want to add fade in out animation to images so I am using this cammand generated by chatgpt but its giving me error


ArrayList<string> cmd2 = new ArrayList<>();
 cmd2.add("-y");
 cmd2.add("-i");

 if (video_temp_path != null) {
 cmd2.add(video_temp_path);
 } else {
 cmd2.add(Environment.getExternalStorageDirectory().getPath() +
 "/Download/happy.mp4");
}

for (int no = 0; no < paths.length; no++) {
 cmd2.add("-loop");
 cmd2.add("1"); // loop the image

 cmd2.add("-t");
 cmd2.add("5"); // duration of the image

 cmd2.add("-i");
 cmd2.add(paths[no]);

 cmd2.add("-filter_complex");
 cmd2.add("[1:v]fade=in:st=0:d=1[tin];" +
 "[1:v]fade=out:st=4:d=1[tout];" +
 "[0:v][tin]overlay=x=100:y=200" +
 "[v1];" +
 "[v1][tout]overlay=x=100:y=200:enable='between(t,10,15)'[v2];" +
 "[v2][2:v]overlay=x=100:y=200:enable='gt(t,17)'[v3]");

 cmd2.add("-map");
 cmd2.add("[v3]");
 cmd2.add("-map");
 cmd2.add("0:a");
}

cmd2.add(Environment.getExternalStorageDirectory().getPath() +
 "/Download/output.mp4");
</string>


error is


Option map (set input stream mapping) cannot be applied to input url /storage/emulated/0/Pictures/temp/1677570327312.jpg -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.



2023-03-01 12:50:50.707 5950-6326/com.android.mergevideo E/mobile-ffmpeg : Error parsing options for input file /storage/emulated/0/Pictures/temp/1677570327312.jpg.
2023-03-01 12:50:50.707 5950-6326/com.android.mergevideo E/mobile-ffmpeg : Error opening input files :
2023-03-01 12:50:50.707 5950-6326/com.android.mergevideo E/mobile-ffmpeg : Invalid argument