Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (54)

  • 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

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (11030)

  • How to cut and merge avi videos with java

    17 août 2017, par Monticle

    I want to cut and merge some avi videos(same codec, same resolution, same fps) using java library.

    Now I am trying this using Humble video(https://github.com/artclarke/humble-video), which is based on ffmpeg.

    I want to use the seek function to cut the input video first, but the result is not correct.

    this is my code.

    public void cutjob(String input, String output, int starttime) {
           final Demuxer demuxer = Demuxer.make();
           final Muxer muxer = Muxer.make(output, null, "avi");
           try {
               demuxer.open(input, null, false, true, null, null);
               final MuxerFormat format = MuxerFormat.guessFormat("avi", null, null);
               int n = demuxer.getNumStreams();
               final Decoder[] decoders = new Decoder[n];
               for (int i = 0; i < n; i++) {
                   final DemuxerStream ds = demuxer.getStream(i);
                   decoders[i] = ds.getDecoder();
                   final Decoder d = decoders[i];
                   if (d != null) {
                       if (format.getFlag(MuxerFormat.Flag.GLOBAL_HEADER))
                           d.setFlag(Coder.Flag.FLAG_GLOBAL_HEADER, true);
                       d.open(null, null);
                       muxer.addNewStream(d);
                   }
               }
               muxer.open(null, null);

               demuxer.seek(-1, Long.MIN_VALUE, (long)starttime* Global.getDefaultTimeBase().getDenominator(), Long.MAX_VALUE, Demuxer.SeekFlag.SEEK_ANY.swigValue());
               final MediaPacket packet = MediaPacket.make();
               long dts = -1;
               while (demuxer.read(packet) >= 0) {
                   System.out.println("dts:"+packet.getDts() + ",pts:"+packet.getPts());
                   final Decoder d = decoders[packet.getStreamIndex()];
                   if (packet.isComplete() && d != null) {
                       dts = dts == -1 ? packet.getDts() : dts;

                       packet.setDts(packet.getDts() - dts);
                       packet.setPosition(-1);
                       muxer.write(packet, false);

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

    The video source is about 190 seconds long, and I set the "starttime" as 180,
    want to cut the last 10 seconds and write to a new avi file.

    The output avi file is 10 seconds long, but only the last 5s of the video is correct, the first 5s seems no data.

    Is there any wrong in my code.
    Thanks.

  • What can cause the CPU usage drop in the script moviepy FFMPEG

    26 juin 2017, par Frikkie Maritz

    What would cause the exporting rate to drop or cpu usage to drop between these 2 scripts

    This one exports with a rate of 15bit/s

    clip1 = VideoFileClip("C:/TBD/TBD/#Frikkie/T1234567/Export/01.mp4")
    clip2 = VideoFileClip("C:/TBD/TBD/#Frikkie/T1234567/Export/02.mp4")
    clip3 = VideoFileClip("C:/TBD/TBD/#Frikkie/T1234567/Export/03.mp4")

    final = concatenate([clip1,
                        clip2.crossfadein(1),
                        clip3.crossfadein(1)],
                padding=-1, method="compose")

    final.write_videofile('myvideo.mp4')

    This one drops down to only 3 bit/s

    path = "C:\TBD\TBD\#Frikkie\T1234567\Export"
    videolist = []

    for clips in glob.glob(os.path.join(path, '**')):
       print(clips)

       if ".mp4" in clips:

           videolist.append(VideoFileClip(clips).crossfadein(1))

    print(videolist)
    final = concatenate(videolist, padding=-1, method="compose")
    final.write_videofile('myvideo.mp4')
  • Realtime video processing with javacv on Android

    7 août 2014, par moonie

    I wish to do realtime video processing on Android using opencv/javacv. My basic approach can be summarized as follow :

    onCreate(), generating a new JavaCameraView

    mCameraView = new JavaCameraView(this, mCameraIndex);
    mCameraView.setCvCameraViewListener(this);  
    setContentView(mCameraView);

    when the user clicks a button, a ffmpegframe recorder is created

    try{
               final long currentTimeMillis = System.currentTimeMillis();
               final String appName=getString(R.string.app_name);
               final String galleryPath=Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).toString();
               final String albumPath=galleryPath+"/"+appName;
               final String photoPath=albumPath+"/"+currentTimeMillis+".avi";
               FFmpegFrameRecorder recorder=FFmpegFrameRecorder.createDefault(photoPath, 640, 360);
               recorder.setFrameRate(30);
               recorder.start();
               }catch(FrameRecorder.Exception e){
               e.printStackTrace();
               }

    then for each CameraFrame, use the following code to process and save the frame

       public Mat onCameraFrame(final CvCameraViewFrame inputFrame){
       final Mat rgba = inputFrame.rgba();
       //...apply some filters on rgba
       if(mIsTakingVideo){
           try{
             recorder.record(MatToIplImage(rgba,640,320));          
           }catch(FrameRecorder.Exception {
               e.printStackTrace();
               }      
       }
       return rgba;
    }

    public IplImage MatToIplImage(Mat m){
     Bitmap bmp=Bitmap.createBitmap(m.width(), m.height(), Config.ARGB_8888);
     Utils.matToBitmap(m, bmp);
     IplImage image=IplImage.create(m.width(),m.height(),IPL_DEPTH_8U,1);
     bmp.copyPixelsToBuffer(image.getByteBuffer());
     return image;}

    When the user clicks the button again, the recorder is stopped and released. However the video I create is an empty video. Any idea why ?

    EDIT :
    The video was empty because the format avi is not supported on my test phone...
    Now the video is not empty but it has the following errors

    1. The recorded video has two split windows instead of just one window
    2. The color is very different from the object I recorded
    3. The play rate is too fast.