Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (91)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (6933)

  • How to take thumbnail image from video bytes[] using java ?

    14 mai 2021, par Sreeraj S

    My requirement is, i want to show video thumbnail in fancybox. But unfortunatly its not showing thumbnail. its required seperate image for thumbnail.

    


    Sample fancybox code

    


    <a data-fancybox="data-fancybox" data-type="iframe" data-width="640" data-height="360" href="http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4">&#xA;    <img class='card-img-top img-fluid' src="local/cache-vignettes/L300xH169/bird1jpg-6986985-13aa4.jpg?1620994482" width='300' height='169' />&#xA;</a>&#xA;

    &#xA;

    So i decided to maintain two url

    &#xA;

    one for video and other for video thumbnail.

    &#xA;

      &#xA;
    1. http://localhost:8080/resources?resourceId=126 -> it will return video
    2. &#xA;

    3. http://localhost:8080/resources?resourceId=126&thumbnail=true -> it will return thumbnail image
    4. &#xA;

    &#xA;

    I haven't any idea about this but I had tried for video thumbnail with https://github.com/bytedeco/javacv. But i got 'OutofMemory' exception

    &#xA;

    pom.xml

    &#xA;

    <dependency>&#xA;    <groupid>org.bytedeco</groupid>&#xA;    <artifactid>javacv-platform</artifactid>&#xA;    <version>1.5.5</version>&#xA;  </dependency>&#xA;

    &#xA;

    My java servlet code for thumbnail image is as follows

    &#xA;

    Java2DFrameConverter converter = new Java2DFrameConverter();&#xA;BufferedImage current;&#xA;BufferedImage next;&#xA;byte[] videoBytes = //video byte array fetched from db&#xA;ByteArrayOutputStream baos = new ByteArrayOutputStream();&#xA;&#xA;FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber(new ByteArrayInputStream(videoBytes));&#xA;frameGrabber.start();&#xA;try {&#xA;    Frame frame = frameGrabber.grab();&#xA;    next = converter.convert(frame);&#xA;&#xA;    current = new BufferedImage(next.getWidth(), next.getHeight(), next.getType());&#xA;    ImageIO.write(current, "png", baos);&#xA;    byte[] bytes = baos.toByteArray();&#xA;    frameGrabber.stop();&#xA;&#xA;&#xA;    response.setContentType("image/png");&#xA;    try (OutputStream o = response.getOutputStream()) {&#xA;        o.write(bytes);&#xA;        o.flush();&#xA;    }&#xA;

    &#xA;

    Edit

    &#xA;

    Video section is working fine. i.e. can able to view video from this url http://localhost:8080/resources?resourceId=126

    &#xA;

  • Hardware acceleration FFMPEG not speeding up rendering at the moment

    13 août 2021, par AlphaDjango

    I currently have ffmpeg running on a computer (ubuntu server 20.04) with a nvidia MSI GTX 1660 6GB GAMING X TWIN FORZ 7 GRAPHICS CARD and a Ryzen 5 3600 cpu. I have installed the nvidia drivers for linux for it.

    &#xA;

    Currently when enabling and disabling hardware acceleration the rendering takes the same amount of time which is around 1 minute to render per 1 minute of footage.

    &#xA;

    When using a similar setup in davinci resolve it takes 1/4 of the time to apply similar background effects and concating the clips which makes me question if I am using hardware acceleration of if my ffmpeg command is not optimised for it ?

    &#xA;

    This is the code which takes in around 50 mp4 clips and joins them together, scales them in size and applies a background blur on the sides of clips

    &#xA;

    ffmpeg  -hwaccel cuda  -f concat -safe 0 -i /home/anon/project/MEDIAFILES/work_ffmpeg_space/concat_file_user_root_projectId_1.txt  -s 1920x1080 -filter_complex &#x27;[0:v]scale=ih*16/9:-1:flags=bicubic,boxblur=luma_radius=min(h\,w)/20:luma_power=2:chroma_radius=min(cw\,ch)/20:chroma_power=1[bg];[bg][0:v]overlay=(W-w)/2:(H-h)/2,crop=h=iw*9/16&#x27; -af aselect=concatdec_select,aresample=async=1  /home/anon/project/MEDIAFILES/created_videos/finalvideo_user_root_projectId_1.mp4&#xA;

    &#xA;

    Any tips or ways to optimise the code to use hardware acceleration will be greatly appreciated !

    &#xA;

    This is my ffmpeg configuration

    &#xA;

      ffmpeg version N-103221-gc3ef9e0277 Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)&#xA;  configuration: --pkg-config-flags=--static --enable-nonfree --enable-gpl --enable-version3 --enable-libmp3lame --enable-libvpx --enable-libopus --enable-opencl --enable-libxcb --enable-opengl --enable-nvenc --enable-vaapi --enable-vdpau --enable-ffplay --enable-ffprobe --enable-libxvid --enable-libx264 --enable-libx265 --enable-openal --enable-openssl --enable-cuda-nvcc --enable-cuvid --extra-cflags=-I/usr/lcal/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --extra-libs=-lpthread&#xA;  libavutil      57.  3.100 / 57.  3.100&#xA;  libavcodec     59.  4.101 / 59.  4.101&#xA;  libavformat    59.  4.101 / 59.  4.101&#xA;  libavdevice    59.  0.100 / 59.  0.100&#xA;  libavfilter     8.  1.103 /  8.  1.103&#xA;  libswscale      6.  0.100 /  6.  0.100&#xA;  libswresample   4.  0.100 /  4.  0.100&#xA;  libpostproc    56.  0.100 / 56.  0.100&#xA;

    &#xA;

  • playing video in android using javacv ffmpeg

    20 février 2017, par d91

    I’m trying to play a video stored in sd card using javacv. Following is my code

    public class MainActivity extends AppCompatActivity {

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

       protected void playthevideo() {

          String imageInSD = "/storage/080A-0063/dama/" + "test3.mp4";

          FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(imageInSD);

          AndroidFrameConverter converterToBitmap = new AndroidFrameConverter();

          OpenCVFrameConverter.ToIplImage converterToipi = new OpenCVFrameConverter.ToIplImage();

              try {
                  Log.d("Tag", "try");
                  grabber.start();
                  Log.d("Tag", "started");

                  int i = 0;
                  IplImage grabbedImage = null;

                  ImageView mimg = (ImageView) findViewById(R.id.a);

                  grabber.setFrameRate(grabber.getFrameRate());
                  ArrayList<bitmap> bitmapArray = new ArrayList<bitmap>();
                  while (((grabbedImage = converterToipi.convert(grabber.grabImage())) != null)) {

                      Log.d("Tag", String.valueOf(i));

                      int width = grabbedImage.width();

                      int height = grabbedImage.height();

                      if (grabbedImage == null) {
                          Log.d("Tag", "error");
                      }

                      IplImage container = IplImage.create(width, height, IPL_DEPTH_8U, 4);

                      cvCvtColor(grabbedImage, container, CV_BGR2RGBA);

                      Bitmap bitmapnew = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);

                      bitmapnew.copyPixelsFromBuffer(container.getByteBuffer());

                      if (bitmapnew == null) {
                          Log.d("Tag", "bit error");
                      }

                      mimg.setImageBitmap(bitmapnew);

                      mimg.requestFocus();

                      i++;
                  }

                  Log.d("Tag", "go");

              }
              catch(Exception e) {

             }
        }
    }
    </bitmap></bitmap>

    just ignore the tags because those are only for my testing purposes..
    When I run this code the main activity layout is still loading while android monitor shows the value of "i" (which is current frame number) and suddenly after frame number 3671 code exits the while loop and the imageview shows a frame which is not the end frame of that video(it somewhere around staring of the video).
    I was unable to find a way to show the grabbed frames from ffmpegframegrabber so i decided to show the image in imageview in this way. Can anybody tell me why I’m getting this error or another error non path to play and show the video in android activity ?
    BTW javacv 1.3.1 is imported correctly into my android dev environment. Thanks.