Recherche avancée

Médias (91)

Autres articles (37)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • 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 (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 is the first MediaSPIP stable release.
    Its official release date is June 21, 2013 and is announced here.
    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 (...)

Sur d’autres sites (3924)

  • Fast Video Compression on Android

    7 avril 2017, par Asif Aminur Rashid

    I want to upload video files to server and compress before uploading. I’m using ffmpeg libx264. I have seen viber can upload 30 second video file of size 78MB within a minute [reduce it’s down to 2.3MB]. I want to know how do they do it so fast ?

    What I have tried so far -

    FFMPEG version :  n2.4.2
    Built with gcc 4.8

    Build Configuraiton : --target-os=linux --cross-prefix=/home/sb/Source-Code/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/sb/Source-Code/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/sb/Source-Code/ffmpeg-android/build/armeabi-v7a-neon --extra-cflags='-I/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -mfpu=neon' --extra-ldflags='-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=

    Command :

    ffmpeg -y -i /storage/emulated/0/main.mp4 -s 480x320 -r 20 -c:v libx264 -preset ultrafast -c:a copy -me_method zero -tune fastdecode -tune zerolatency -strict -2 -b:v 1000k -pix_fmt yuv420p /storage/emulated/0/output.mp4

    The result so far is, a 30second 78MB file gets compressed to 4.3MB which takes around 1min 28seconds. Here is the console dump - http://pastebin.com/rn81acGx . I mainly want to reduce the time it takes to compress. How can I achieve this ?

    Thanks in advance.

  • How to reduce conversion/compression time in FFmpeg and How to merge command ?

    18 mai 2017, par Patel Pinkal

    I want to reduce time taken to create new video after adding text in original video using FFmpeg
    I had tried to search and I found this code given below for reducing time.

    -y -i /sdcard/videokit/in.mp4 -strict experimental -vcodec libx264 -preset ultrafast -crf 24 -acodec aac -ar 44100 -ac 2 -b 36000k -s 1280x720 -aspect 16:9 -metadata:s:v:0 rotate=0 /sdcard/videokit/out3.mp4

    Now, I want to add text in video and it is done in FFmpeg, by this command and its 100% working.

     String[] addTextCommand = {
               "-i",
               "" + realFilePath,
               "-vf",
               "drawtext=fontsize=50:fontfile=/storage/emulated/0/Download/Cerbetica-regular.ttf:fontcolor=red:text='"
                       + strText +
                       "':x=0:y=0: box=1: boxcolor=black@0.5:boxborderw=10: x=0: y=(h-text_h)/2",
               "-strict",
               "-2",
               outputFilePath};

    Now my problem is how do I merge this two code and make one single command to make an edited video and also take less time to create a new video. In this, I have tried this command but it’s not working.

      String[] addTextCommand = {
               "-i",
               "" + realVideoPath,
               "-vf",
               "-c:v", "libx264",
               "-preset", "ultrafast",
               "-crf", "24",
               "-acodec", "aac",
               "-ar", "44100",
               "-ac", "2",
               "-b", "36000k",
               "-s", "1280x720",
               "-aspect", "16:9",
               "-metadata:s:v:0 rotate=0",
               "drawtext=fontsize=50:fontfile=/storage/emulated/0/Download/Cerbetica-regular.ttf:fontcolor=red:text='"
                       + strText +
                       "':x=0:y=0: box=1: boxcolor=black@0.5:boxborderw=10: x=0: y=(h-text_h)/2",
               "-strict",
               "-2",
               outputFilePath};

    If anyone has an idea how to make command of FFmpeg please describe it and explain how to use it.

    Using command of @Mulvya I got this in the console.

        D/MainActivity: FAILED with output : WARNING: linker: /data/user/0/com.inheritx.videoprocessing/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
                      ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
                        built with gcc 4.8 (GCC)
                        configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/i686-linux-android- --arch=x86 --cpu=i686 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/x86 --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -march=i686' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
                        libavutil      55. 17.103 / 55. 17.103
                        libavcodec     57. 24.102 / 57. 24.102
                        libavformat    57. 25.100 / 57. 25.100
                        libavdevice    57.  0.101 / 57.  0.101
                        libavfilter     6. 31.100 /  6. 31.100
                        libswscale      4.  0.100 /  4.  0.100
                        libswresample   2.  0.101 /  2.  0.101
                        libpostproc    54.  0.100 / 54.  0.100
                      Unrecognized option '2'.
                      Error splitting the argument list: Option not found
      D/MainActivity: Finished command : ffmpeg -i
      D/MainActivity: Finished command : ffmpeg /storage/emulated/0/Download/spacetestSMALL_512kb.mp4
      D/MainActivity: Finished command : ffmpeg -vf
      D/MainActivity: Finished command : ffmpeg drawtext=fontsize=50:fontfile=/system/fonts/DroidSans.ttf:fontcolor=red:text='Hello':x=0:y=0: box=1: boxcolor=black@0.5:boxborderw=10: x=0: y=(h-text_h)/2
      D/MainActivity: Finished command : ffmpeg -c:v
      D/MainActivity: Finished command : ffmpeg libx264
      D/MainActivity: Finished command : ffmpeg -preset
      D/MainActivity: Finished command : ffmpeg ultrafast
      D/MainActivity: Finished command : ffmpeg -crf
      D/MainActivity: Finished command : ffmpeg 24
      D/MainActivity: Finished command : ffmpeg -acodec
      D/MainActivity: Finished command : ffmpeg aac
      D/MainActivity: Finished command : ffmpeg -ar
      D/MainActivity: Finished command : ffmpeg 44100
      D/MainActivity: Finished command : ffmpeg -s
      D/MainActivity: Finished command : ffmpeg 1280x720
      D/MainActivity: Finished command : ffmpeg -aspect
      D/MainActivity: Finished command : ffmpeg 16:9
      D/MainActivity: Finished command : ffmpeg -metadata:s:v:0 rotate=0
      D/MainActivity: Finished command : ffmpeg -strict
      D/MainActivity: Finished command : ffmpeg -2
      D/MainActivity: Finished command : ffmpeg /storage/emulated/0/Movies/add_text25.mp4
  • Video file compression in swift [duplicate]

    9 avril 2017, par pooja_1205

    This question already has an answer here :

    I m recording a video and converting it to base64 string to send it to server.But uploading of video is taking a lot of time.
    Is there any compression library that can be used with swift.
    I tried bridging ffmpeg but that is creating a lot of issue of missing files. AVURLAsset is not working for me.
    Any suggestions on how to compress audio and video files.

    func imagePickerControllerDidCancel(picker: UIImagePickerController) {
           self.imagePickerController.dismissViewControllerAnimated(true, completion: nil)
       }

       func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
           let mediaType = info[UIImagePickerControllerMediaType] as! NSString
           self.imagePickerController.dismissViewControllerAnimated(true) {
               // 3
               if mediaType == kUTTypeMovie {

                   guard let path = (info[UIImagePickerControllerMediaURL] as! NSURL).path else { return }

                   if UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(path) {
                       UISaveVideoAtPathToSavedPhotosAlbum(path,    self, #selector(GalleryView.video(_:didFinishSavingWithError:contextInfo:)), nil)

                   }
               }else{
                   //Image
                   let selectedImage = info[UIImagePickerControllerOriginalImage] as! UIImage
                   let imageData:NSData = UIImageJPEGRepresentation(selectedImage,0.5)!
                   var strBase64:String = imageData.base64EncodedStringWithOptions(.EncodingEndLineWithLineFeed)
                   strBase64 = strBase64.stringByReplacingOccurrencesOfString("+", withString: "%2B")
                   self.uploadGalleryDataInServer("1", ext: "jpeg", content: strBase64)
               }
           }
       }

       func video(videoPath: NSString, didFinishSavingWithError error: NSError?, contextInfo info: AnyObject) {
           if let _ = error {
           }else{
              print("videoPath = \(videoPath)")
               let data = NSData(contentsOfFile: videoPath as String)

               var strBase64:String = NSData(contentsOfFile: videoPath as String)!.base64EncodedStringWithOptions(.EncodingEndLineWithLineFeed)
               strBase64 = strBase64.stringByReplacingOccurrencesOfString("+", withString: "%2B")


               self.uploadGalleryDataInServer("2", ext: ".mp4", content: strBase64)
           }
       }