Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (99)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
    Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.

Sur d’autres sites (12246)

  • Unable to merge videos in Android using JavaCV ("Sample Description" Error)

    15 décembre 2015, par San

    I am creating a video from images via FFMPEG and I am able to get the video from images. I am also making use of JavaCV to merge two videos and I am able to join videos using JavaCV without any issues provided both the videos are taken via camera, i.e, a video actually recorded via mobile camera.

    Issue that I’m facing :

    I am not able to merge the video that was generated from FFMPEG using the images along with the video user has chosen which will mostly be a video that was not generated and taken via mobile camera.

    CODE :
    Code to generate Video via Images :

                     FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(path + "/" + "dec16.mp4", 800, 400);
                               try {
                                   recorder.setVideoCodec(avcodec.AV_CODEC_ID_MPEG4);
                                   //recorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
                                   recorder.setVideoCodecName("H264");
                                   recorder.setVideoOption("preset", "ultrafast");
                                   recorder.setFormat("mp4");
                                   recorder.setFrameRate(frameRate);
                                   recorder.setVideoBitrate(60);
                                   recorder.setPixelFormat(avutil.AV_PIX_FMT_YUV420P);
                                   startTime = System.currentTimeMillis();
                                   recorder.start();
                                   for(int j=0;j recorder.getTimestamp()) {

                                           recorder.setTimestamp(t);
                                           recorder.record(image);
                                       }
                                   }
                                   recorder.stop();
                               } catch (Exception e) {
                                   e.printStackTrace();
                               }

    Code to merge Videos :

    int count = file_path.size();
               System.out.println("final_joined_list size " + file_path.size());
               if (file_path.size() != 1) {
                   try {
                       Movie[] inMovies = new Movie[count];
                       mediaStorageDir = new File(
                               Environment.getExternalStorageDirectory()
                                       + "/Pictures");

                       for (int i = 0; i < count; i++) {
                           File file = new File(file_path.get(i));
                           System.out.println("fileeeeeeeeeeeeeeee " + file);
                           System.out.println("file exists!!!!!!!!!!");

                           FileInputStream fis = new FileInputStream(file);
                           FileChannel fc = fis.getChannel();
                           inMovies[i] = MovieCreator.build(fc);
                           fis.close();
                           fc.close();

                       }
                       List<track> videoTracks = new LinkedList<track>();
                       List<track> audioTracks = new LinkedList<track>();
                       Log.d("Movies length", "isss  " + inMovies.length);
                       if (inMovies.length != 0) {

                           for (Movie m : inMovies) {

                               for (Track t : m.getTracks()) {
                                   if (t.getHandler().equals("soun")) {
                                       audioTracks.add(t);
                                   }
                                   if (t.getHandler().equals("vide")) {
                                       videoTracks.add(t);
                                   }
                                   if (t.getHandler().equals("")) {

                                   }
                               }

                           }
                       }

                       Movie result = new Movie();

                       System.out.println("audio and videoo tracks : "
                               + audioTracks.size() + " , " + videoTracks.size());
                       if (audioTracks.size() > 0) {
                           result.addTrack(new AppendTrack(audioTracks
                                   .toArray(new Track[audioTracks.size()])));
                       }
                       if (videoTracks.size() > 0) {
                           result.addTrack(new AppendTrack(videoTracks
                                   .toArray(new Track[videoTracks.size()])));
                       }
                       IsoFile out = null;
                       try {
                           out = (IsoFile) new DefaultMp4Builder().build(result);
                       } catch (Exception e) {
                           // TODO Auto-generated catch block
                           e.printStackTrace();
                       }

                       long timestamp = new Date().getTime();
                       String timestampS = "" + timestamp;

                       File storagePath = new File(mediaStorageDir
                               + File.separator);
                       storagePath.mkdirs();
                       File myMovie = new File(storagePath, String.format("%s.mp4", timestampS));
                       FileOutputStream fos = new FileOutputStream(myMovie);
                       FileChannel fco = fos.getChannel();
                       fco.position(0);
                       out.getBox(fco);
                       fco.close();
                       fos.close();

                   } catch (FileNotFoundException e) {
                       // TODO Auto-generated catch block
                       e.printStackTrace();
                   } catch (IOException e) {
                       // TODO Auto-generated catch block
                       e.printStackTrace();
                   }
                   String mFileName = Environment.getExternalStorageDirectory()
                           .getAbsolutePath();
                   // mFileName += "/output.mp4";

                   File sdCardRoot = Environment.getExternalStorageDirectory();
                   File yourDir = new File(mediaStorageDir + File.separator);
                   for (File f : yourDir.listFiles()) {
                       if (f.isFile())
                           name = f.getName();
                       // make something with the name
                   }
                   mFileName = mediaStorageDir.getPath() + File.separator
                           + "output-%s.mp4";
                   System.out.println("final filename : "
                           + mediaStorageDir.getPath() + File.separator
                           + "output-%s.mp4" + "names of files : " + name);
                   single_video = false;
                   return name;
               } else {
                   single_video = true;
                   name = file_path.get(0);
                   return name;
               }
    </track></track></track></track>

    Error :

    The Error that I am facing while trying to merge the videos generated via Images and a normal video is

    12-15 12:26:06.155  26022-26111/? W/System.err﹕ java.io.IOException: Cannot append com.googlecode.mp4parser.authoring.Mp4TrackImpl@45417c38 to com.googlecode.mp4parser.authoring.Mp4TrackImpl@44ffac60 since their Sample Description Boxes differ
    12-15 12:26:06.155  26022-26111/? W/System.err﹕ at com.googlecode.mp4parser.authoring.tracks.AppendTrack.<init>(AppendTrack.java:48)
    </init>

    Fix that I tried :

    Google advised me to change the CODEC in JavaCV from avcodec.AV_CODEC_ID_MPEG4 to avcodec.AV_CODEC_ID_H264. But when I did that, I am not able to get the video from images thereby throwing the following error :

    12-15 12:26:05.840  26022-26089/? W/linker﹕ libavcodec.so has text relocations. This is wasting memory and is a security risk. Please fix.
    12-15 12:26:05.975  26022-26089/? W/System.err﹕ com.googlecode.javacv.FrameRecorder$Exception: avcodec_open2() error -1: Could not open video codec.
    12-15 12:26:05.975  26022-26089/? W/System.err﹕ at com.googlecode.javacv.FFmpegFrameRecorder.startUnsafe(FFmpegFrameRecorder.java:492)
    12-15 12:26:05.975  26022-26089/? W/System.err﹕ at com.googlecode.javacv.FFmpegFrameRecorder.start(FFmpegFrameRecorder.java:267)

    What I need :

    Creating video from Images is inevitable and that video will definitely be used to merge with other videos which might have any Codec Formats. So I need to find a way to merge any kind of videos irrespective of their Codecs or any other parameters. I am trying to keep it simple by just using the Jars and SO files and I dont want to drive myself crazy by going on a full scale implementation of FFMPEG Library. That being said, I am also ready to look into that library if I dont have any other ways to achieve what I want but a solid resource with an ALMOST working code would be much appreciated. Cheers.

    Update :
    I looked upon the issues mentioned at GitHub of OpenCV, but didnt find anything solid from it.
    OpenCV Issues

  • muxing overhead error when converting a video via ffmpeg

    16 décembre 2016, par john smoth

    I’m using ffmpeg to converting videos on my site.
    I’m converting all the videos to flv . if I upload flv , it has not problem but if I upload any other file type except flv , it shows me this error :

    ffmpeg version 0.7.11, Copyright (c) 2000-2011 the FFmpeg developers built on Jul 26 2013 01:58:02 with gcc 4.4.7 20120313 (Red Hat 4.4.7-3)
    configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-libvorbis
    --enable-libopencore-amrnb --enable-libopencore-amrwb libavutil 50. 43. 0 / 50. 43. 0 libavcodec 52.123. 0 / 52.123. 0 libavformat 52.111. 0 / 52.111. 0
    libavdevice 52. 5. 0 / 52. 5. 0 libavfilter 1. 80. 0 / 1. 80. 0 libswscale 0. 14. 1 / 0. 14. 1 libpostproc 51. 2. 0 / 51. 2. 0
    Seems stream 0 codec frame rate differs from container frame rate: 2997.00 (2997/1) -> 14.99 (15000/1001)
    Input #0, avi, from 'uploads/v_37.avi':
    Metadata: title : AJ McLean - Teenage Wildlife encoder : Lavf52.16.0
    Duration: 00:04:17.19, start: 0.000000, bitrate: 470 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 14.98 fps, 14.99 tbr, 14.99 tbn, 2997 tbc
    Stream #0.1: Audio: mp3, 22050 Hz, stereo, s16, 128 kb/s
    WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
    [buffer @ 0x2137ae0] w:640 h:480 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param: [scale @ 0x2139da0] w:640 h:480 fmt:yuv420p -> w:320 h:240 fmt:yuv420p flags:0x4
    Output #0, flv, to 'uploads/aaa.flv': Metadata: title : AJ McLean - Teenage Wildlife encoder : Lavf52.111.0
    Stream #0.0: Video: flv, yuv420p, 320x240 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 1k tbn, 14.99 tbc Stream #0.1: Audio: libmp3lame, 22050 Hz, stereo, s16, 0 kb/s
    Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1
    Press [q] to stop, [?] for help
    frame= 26 fps= 0 q=2.0 Lsize= 80kB time=00:00:01.73 bitrate= 375.7kbits/s video:64kB audio:14kB global headers:0kB muxing overhead 2.339835%

    last line is : muxing overhead 2.339835%

    the final file is a 1 second video ( it doesn’t make any different how long is the video , all of them become a 1 second video )

    What is the problem ?
    this is the ffmpeg code that convert the video :

    echo passthru("$ffmpegpath -i uploads/$file -ar 22050 -ab 32 -f flv -s 320×240 uploads/aaa.flv 2>&amp;1");

    Thanks

    thanks

  • optimizing ffmpeg in windows platform for processing with web-cam

    22 août 2013, par user2320537

    I have to develop a tool in java that will capture frames from webcam, Now what I have done for that is, I have used Runtime class to run ffmpeg and other commands, when it starts capturing frames from my web-cam,
    I am using following method for that.

    public class FFMPEGClass {

       private String ffmpegExeLocation, line;
       private final String FRAME_DIGITS = "010";

       public FFMPEGClass(String capturingDName, String outputImagesLocation, int framesPerSecond) {
           ffmpegExeLocation = System.getProperty("user.dir") + "\\bin\\";
           System.out.println(ffmpegExeLocation);
           try {            
               System.out.println(ffmpegExeLocation + "ffmpeg -t 100000 "
                       + "-f vfwcap -s 640x480 -i 0 -r 1/" + framesPerSecond + " -f image2 " + outputImagesLocation + "\\camera%"+FRAME_DIGITS+"d.jpg");
               Process pp = Runtime.getRuntime().exec(ffmpegExeLocation + "ffmpeg -t 100000 "
                       + "-f vfwcap -s 640x480 -i 0 -r 1/" + framesPerSecond + " -f image2 " + outputImagesLocation + "\\camera%"+FRAME_DIGITS+"d.jpg");
               BufferedReader br = new BufferedReader(new InputStreamReader(pp.getErrorStream()));
               while((line = br.readLine()) != null){
                    System.out.println(line);
               }
           } catch (Exception ex) {
               ex.printStackTrace();
           }
       }
    }

    In my case capturingDName is USB2.0 UVC VGA WebCam
    outputImagesLocation is e :\myfolder\frames and
    framesPerSecond is 10

    This code works well but it is unable to capture frames efficiently, In other words I want to say that its processing is very slow, can anyone please tell that how can I optimize it so that it can capture frames very fastly.

    I have Intel Core i3 processor with 6 GB of RAM

    I have already checked many answers from google and stackoverflow but these are not working in my case