Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (38)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (6832)

  • Decode Frame into a byte array to IplImage

    20 février 2015, par Ernesto Luis

    I have a .drv file with 4 channels of videos. I already remove the owner headers of each frame and I get a byte array that contains the frame bytes in Mpeg4 without any header. So what I need is decode this frame (byte array) using javaCv / ffmpeg to obtain a IplImage or .jpeg image.
    Here you have some code for ideas.

    public static void main(String[] args) throws IOException

       byte [] dvr1= new byte[8*1024];
       byte [] dvr;      
       try {  

          System.out.println("Leyendo...");    
          FileInputStream fileInput= new FileInputStream("D:\\muestra.drv");
          ByteArrayOutputStream baos= new ByteArrayOutputStream();

          if(fileInput!=null){
                BufferedInputStream bufferedInput = new BufferedInputStream(fileInput);

          // Streams y buffers de escritura.


           //Leer el fichero completo y ponerlo en memoria
                   int leidos = 0;
                    while((leidos= bufferedInput.read(dvr1))>=0){
                       baos.write(dvr1, 0, leidos);
                    }
                    //Pasar el contenido del fichero almacenado en memoria al arreglo de Bytes                        
                         dvr= baos.toByteArray();
                         baos.reset();
                         baos.close();
                         int lon= dvr.length;  


                     //Buscar el comienzo del header
                         int offset=0;
                         while(offset=dvr.length)
                                 break;
                         }

                         byte[] head= Arrays.copyOfRange(dvr, offset, offset+32);
                         offset+=32;
                             BasicHeader bHeader= new BasicHeader(head);
                             ExtraHeader xHeader= new ExtraHeader(head);
                             offset+=xHeader.SuperExtraSize;
                             PESHeader pesHeader= new PESHeader(Arrays.copyOfRange(dvr, offset,offset+32));
                             offset+=32;
                             byte[]frame;  

                             if(offset+bHeader.Size/ Here is the problem
                                     DecodeFrame(frame);                            

                         }                

        //  System.out.println("No se encontro el archivo");
       } catch (java.lang.Exception e) {
           // TODO: handle exception
            System.out.println(e.getMessage());
       }
  • NoClassDefFoundError at FFmpegFrameRecorder

    30 janvier 2015, par Sanjay Rapolu

    I am developing a android application and converting set of images into videos is one of its functionality. whenever I am trying to create an object of FFmpegFrameRecorder, NoClassDefFoundError java lang.ClassNotFoundException org.bytedeco.javacv.FFmpegFraerecorder exception is getting throwed. Here is the code on which I’m working. can anyone please suggest the reason for this error and the solution ?

    package com.example.makevideo;

    import java.io.File;

    import org.bytedeco.javacpp.opencv_core;
    import org.bytedeco.javacpp.opencv_core.IplImage;
    import org.bytedeco.javacv.FFmpegFrameRecorder;

    import android.app.Activity;
    import android.os.Bundle;
    import android.os.Environment;
    import android.util.Log;
    import android.view.View;
    import android.widget.Button;
    import android.widget.Toast;
    import static org.bytedeco.javacpp.opencv_highgui.cvLoadImage;


    public class MainActivity extends Activity {

            private static final String EXTR_DIR = "Screenshot";

            String path = Environment.getExternalStorageDirectory() + File.separator
                            + EXTR_DIR;
            Button Record;

            @Override
            protected void onCreate(Bundle savedInstanceState) {
                    super.onCreate(savedInstanceState);
                    setContentView(R.layout.activity_main);

                    System.out.println("Application Runs");

                    Toast.makeText(getApplicationContext(), path, Toast.LENGTH_SHORT)
                                    .show();
                    ;
                    recording();

            }

            private void recording() {
                    // TODO Auto-generated method stub

                    Record = (Button) findViewById(R.id.Record);

                    Record.setOnClickListener(new View.OnClickListener() {

                            @Override
                            public void onClick(View v) {
                                    // TODO Auto-generated method stub
                                    System.out.println(path);
                                    Toast.makeText(getApplicationContext(), path, Toast.LENGTH_LONG)
                                                    .show();
                                    Log.d("Record",
                                                    "Environment.getExternalStorageDirectory().getPath()  : "
                                                                    + path);
                                    record();
                            }
                    });
            }

            private void record() {

                    File folder = new File(path);

                    File[] listOfFiles = folder.listFiles();
                    opencv_core.IplImage[] iplimage = null;
                    if (listOfFiles.length > 0) {

                            System.out.println("in IFFF...");

                            // Toast.makeText(getApplicationContext(), listOfFiles.length,
                            // Toast.LENGTH_SHORT).show();
                            iplimage = new opencv_core.IplImage[listOfFiles.length];

                            for (int j = 0; j < listOfFiles.length; j++) {

                                    String files = "";

                                    if (listOfFiles[j].isFile()) {
                                            files = listOfFiles[j].getName();
                                            System.out.println(" j " + j + listOfFiles[j]);
                                    }

                                    String[] tokens = files.split("\\.(?=[^\\.]+$)");
                                    String name = tokens[0];

                                    Toast.makeText(getApplicationContext(),
                                                    "size=" + listOfFiles.length, Toast.LENGTH_SHORT)
                                                    .show();

                                    iplimage[j] = cvLoadImage(path + File.separator + name + ".jpg");

                            }

                    }

                    FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(path
                                    + File.separator + "OUTPUT" + System.currentTimeMillis()
                                    + ".mp4", 200, 150);

                    try {
                            recorder.setVideoCodec(13); // CODEC_ID_MPEG4 //CODEC_ID_MPEG1VIDEO
                            // //http://stackoverflow.com/questions/14125758/javacv-ffmpegframerecorder-properties-explanation-needed

                            recorder.setFrameRate(1); // This is the frame rate for video. If
                                                                                    // you really want to have good video
                                                                                    // quality you need to provide large set
                                                                                    // of images.
                            recorder.setPixelFormat(0); // PIX_FMT_YUV420P

                            recorder.start();

                            for (int i = 0; i < iplimage.length; i++) {

                                    recorder.record(iplimage[i]);

                            }
                           
                            recorder.stop();
                            Toast.makeText(MainActivity.this, "Record Completed",
                                            Toast.LENGTH_SHORT).show();

                    } catch (Exception e) {
                            e.printStackTrace();
                    }
            }

    }
  • how to create video from multiple sequence of images using FFMpeg ?

    24 février 2015, par Jignesh Patel

    Hello all i am new in android developing. I want to create video from sequence of images. And i already fetch images from the specific folder which is resides in external memory card in android devices but i do not know how to use FF MPEG library to convert images into a video file. i had much tried to find out solution but yet i could not get the solution.
    Any help would be appreciated and Thanks in advance.

    I implement below code but it does not working.

    private void convertImg_to_vid()

       // TODO Auto-generated method stub
       Process chperm;
       try {
           chperm=Runtime.getRuntime().exec("su");
             DataOutputStream os =
                 new DataOutputStream(chperm.getOutputStream());

                 os.writeBytes("ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg\n");
                 os.flush();

                 chperm.waitFor();

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